The arguments for the three matchmaps utilities are largely overlapping (and for matchmaps and matchmaps.mr, identical!!) but they all existed separately in the code base. This made adding or changing arguments time-intensive and error-prone. Inspired by careless, I have refactored things extensively. In this PR, I:
add a file _args.py which declares the description for each function, a dictionary of base/mr args, a dictionary of ncs args, and a dictionary of common args
add a file _parsers.py which imports the above from _args.py and declares an argparse.ArgumentParser object for each utility
delete the parse_arguments() function from each utility script, and instead just import the relevant parser from _parsers.py
change cli.md to point towards the new locations of the parsers
The arguments for the three matchmaps utilities are largely overlapping (and for
matchmaps
andmatchmaps.mr
, identical!!) but they all existed separately in the code base. This made adding or changing arguments time-intensive and error-prone. Inspired bycareless
, I have refactored things extensively. In this PR, I:_args.py
which declares the description for each function, a dictionary of base/mr args, a dictionary of ncs args, and a dictionary of common args_parsers.py
which imports the above from_args.py
and declares anargparse.ArgumentParser
object for each utilityparse_arguments()
function from each utility script, and instead just import the relevant parser from_parsers.py
cli.md
to point towards the new locations of the parsers