VacFind / GeoCompare

A tool designed to help the creators of vaccine finder tools easily manipulate, combine, and move data to allow everyone to have better access to data about vaccination sites during the pandemic
https://vacfind.github.io/GeoCompare/
MIT License
0 stars 3 forks source link

allow config files to be specified using argparse #15

Open MoralCode opened 3 years ago

MoralCode commented 3 years ago

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