Turn LEX analyses into a class
This would allow us to define some default functions(methods) that users could choose to over-ride.
For example, we could have a default parse_config
function that looks like:
def parse_config(config: dict) -> argparse.Namespace:
"""Generate an arguments Namespace from the analysis config file"""
test_args = test_args = OrderedDict([(k.replace('-', '_'), v) for k, v in config.items()])
test_args = argparse.Namespace(**test_args)
return test_args
Which spoofs the user defining a parse_args
function and parsing command-line options with argparse.