Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

allow config files to be specified using argparse #15

@MoralCode

Description

@MoralCode

as GeoCompare is meant to be used as a command-line program, being able to pass in a different filename using --config parameter to allow reading a config file from a custom file/path would be nice to have.

This shoulld be relatively simple and should just involve:

  1. uncommenting the import argparse line in main.py
  2. looking at the extensive documentation for argparse
  3. adding the correct method calls to define and parse arguments immediately after if __name__ == "__main__":
  4. update the configfile = Config.from_file('./config.json') line to use the values from argparse instead of a hardcoded filename
  5. set the old hardcoded filename as the default value for argparse so that the default config file is used if a custom one is not specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions