Skip to content

Enabling warning redirection for ALARAJOYWrapper#280

Open
eitan-weinstein wants to merge 2 commits into
svalinn:mainfrom
eitan-weinstein:warning_redirection
Open

Enabling warning redirection for ALARAJOYWrapper#280
eitan-weinstein wants to merge 2 commits into
svalinn:mainfrom
eitan-weinstein:warning_redirection

Conversation

@eitan-weinstein
Copy link
Copy Markdown
Contributor

This PR introduces a small update to ALARAJOYWrapper to allow the user to redirect non-fatal warnings to a log file to avoid cluttering the terminal printouts.

@gonuke
Copy link
Copy Markdown
Member

gonuke commented May 24, 2026

Maybe take a look at the pythons logging module?

# Run NJOY
result = subprocess.run(['njoy'], input=open(INPUT).read(),
text=True, capture_output=True)
with open(INPUT, 'r') as f:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logger was capturing a ResourceWarning from the previous way we were opening the input, so this change is simply to done to resolve that because it was unnecessary to have in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants