Skip to content

Migrate AthArgumentParser to master

Jon Burr requested to merge jburr/athena:AthArgumentParser into master

Add in the AthArgumentParser a relatively simple adaption of argparse.ArgumentParser specifically for running in athena, allowing users to specify extra command line options from their job options. This is used in some of the common CP algorithm unit tests at minimum, though will be useful for most 'classic' job options.

This largely duplicates c327ac36. I cleaned up some of the parts from that, removing an unused function and improving the deduction of the name of the calling job option.

I also cleared up a sys.exc_value call. This was deprecated in python 2 and has been removed completely in 3.

I ran a basic test job locally, and confirmed that it also works correctly on the grid.

Tagging @krumnack for info.

One extra note - I included some python3 only syntax here (I think just super() calls). Given that the py2 build of master is not done anymore I think this is OK, but I'm willing to rewrite it in a py2 compatible way if requested.

Edited by Jon Burr

Merge request reports