Symptom
$ 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).
Symptom
Root cause
summary_runconsumessys.argv[1]as thepatchpositional without argparse.-his treated as a patch name, the code then tries to create.../-h/summary/which fails.Fix
Adopt
argparse(or checksys.argv[1] in {"-h", "--help"}first) inscripts/python/summary_run.py. Minor behavioural change — users who somehow relied on a patch literally named-hwould 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).