Skip to content

Clean up output format detection in default regression analysis#6815

Merged
ax3l merged 1 commit intoBLAST-WarpX:developmentfrom
EZoni:cleanup_analysis_default_regression
Apr 28, 2026
Merged

Clean up output format detection in default regression analysis#6815
ax3l merged 1 commit intoBLAST-WarpX:developmentfrom
EZoni:cleanup_analysis_default_regression

Conversation

@EZoni
Copy link
Copy Markdown
Member

@EZoni EZoni commented Apr 28, 2026

Overview

Follow up on #6812 and clean up the code that handles the detection of the output format in the default regression analysis script.

@EZoni EZoni requested a review from ax3l April 28, 2026 16:27
@EZoni EZoni added component: tests Tests and CI cleaning Clean code, improve readability labels Apr 28, 2026
@EZoni EZoni requested a review from lucafedeli88 April 28, 2026 16:29
Copy link
Copy Markdown
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Thanks, yes much simpler! :)

if args.format is None:
raise ValueError(f"Could not detect format for path: {args.path}")
except Exception:
raise ValueError(f"Could not detect format for path: {args.path}") from None
Copy link
Copy Markdown
Member

@ax3l ax3l Apr 28, 2026

Choose a reason for hiding this comment

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

Sweet, just learned about from None to suppress the context of the error raised.

Avoids: "During handling of the above exception, another exception occurred" verbosity

@ax3l ax3l self-assigned this Apr 28, 2026
@ax3l ax3l enabled auto-merge (squash) April 28, 2026 16:43
@ax3l ax3l merged commit ea4e286 into BLAST-WarpX:development Apr 28, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning Clean code, improve readability component: tests Tests and CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants