Skip to content

Commit

Permalink
Merge pull request nuclear-multimessenger-astronomy#249 from bfhealy/…
Browse files Browse the repository at this point in the history
…analysis_slurm_fix

This PR allows analysis_slurm.py to handle a mix of slurm and analysis.py arguments.
  • Loading branch information
mcoughlin authored Sep 26, 2023
2 parents 0e395c8 + 9696b7b commit 4ba9165
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/analysis_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@

# Get analysis.py parser
nmma_parser = get_parser(add_help=False)
nmma_args = nmma_parser.parse_args()
nmma_arg_list = [x for x in vars(nmma_args).keys()]

# Get argument names from nmma_parser
nmma_arg_list = []
for action in nmma_parser._actions:
arg_name = action.option_strings[0]
nmma_arg_list.append(arg_name[2:].replace("-", "_"))

# Create new parser that inherits analysis.py arguments
parser = argparse.ArgumentParser(parents=[nmma_parser])
Expand Down

0 comments on commit 4ba9165

Please sign in to comment.