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

allow config files to be specified using argparse #15

Open
MoralCode opened this issue Mar 23, 2021 · 0 comments
Open

allow config files to be specified using argparse #15

MoralCode opened this issue Mar 23, 2021 · 0 comments
Labels
good first issue Good for newcomers

Comments

@MoralCode
Copy link
Contributor

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant