You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
summary_run -h crashes: '-h' parsed as 'patch' positional #711
$ summary_run -h
summary v1.5
Set job info for patch -h
Traceback (most recent call last):
File "/usr/local/bin/summary_run", line 22, in main
jobs, list_tile_IDs_dot = set_jobs_v2_pre_v2(patch, verbose)
File ".../summary_params_pre_v2.py", line 17, in set_jobs_v2_pre_v2
os.mkdir(path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/.../pre_v2/psfex/-h/summary'
Root cause
summary_run consumes sys.argv[1] as the patch positional without argparse. -h is treated as a patch name, the code then tries to create .../-h/summary/ which fails.
Fix
Adopt argparse (or check sys.argv[1] in {"-h", "--help"} first) in scripts/python/summary_run.py. Minor behavioural change — users who somehow relied on a patch literally named -h would need to pass -- separator, but that's a sane outcome.
Caught by
tests/unit/test_entrypoints.py::test_entrypoint_help[summary_run] (xfailed in #708).
Activity
fix: add argparse to summary_run so -h shows help
fix: small develop bugs (CosmoStat#709, CosmoStat#711) (CosmoStat#714)