• David Runge's avatar
    Add ArgumentParser factory · 9bb539dd
    David Runge authored
    repo_management/argparse.py:
    Add `ArgParseFactory`, which serves as an argparse.ArgumentParser
    factory (new variants are implemented as classmethods).
    The class provides a generic constructor, that offers a default parser
    with a verbose argument and a description, alongside a specific one for
    the db2json script.
    Additionally, helper methods are provided to transform strings to Path
    instances, while ensuring that they are either an existing file or
    directory.
    
    tests/test_argparse.py:
    Add tests for all of `ArgParseFactory`.
    9bb539dd
argparse.py 2.94 KB