diff --git a/CHANGES.md b/CHANGES.md index 37bb2e6..7b2d707 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,8 +14,8 @@ * Fix bug where logger setup failed * Simplify CLI argument constructor code (for cleaner and more testable code) * Add tests for CLI and implementations when invoked through the CLI -* Refactored code dealing with requests and authentication to the `requests.py` file -* Add `--log_file` command line option to specify a non-default location to write log files to +* Refactored code dealing with requests and authentication to the `STACpopulator/requests.py` file +* Add `--log-file` command line option to specify a non-default location to write log files to ## [0.6.0](https://github.com/crim-ca/stac-populator/tree/0.6.0) (2024-02-22) diff --git a/STACpopulator/cli.py b/STACpopulator/cli.py index 44a295a..11ed00f 100644 --- a/STACpopulator/cli.py +++ b/STACpopulator/cli.py @@ -23,7 +23,7 @@ def add_parser_args(parser: argparse.ArgumentParser) -> dict[str, Callable]: ) parser.add_argument("--debug", action="store_const", const=logging.DEBUG, help="set logger level to debug") parser.add_argument( - "--log_file", help="file to write log output to. By default logs will be written to the current directory." + "--log-file", help="file to write log output to. By default logs will be written to the current directory." ) commands_subparser = parser.add_subparsers( title="command", dest="command", description="STAC populator command to execute.", required=True diff --git a/STACpopulator/implementations/CMIP6_UofT/add_CMIP6.py b/STACpopulator/implementations/CMIP6_UofT/add_CMIP6.py index 5ed3fd8..7db2d53 100644 --- a/STACpopulator/implementations/CMIP6_UofT/add_CMIP6.py +++ b/STACpopulator/implementations/CMIP6_UofT/add_CMIP6.py @@ -128,6 +128,7 @@ def runner(ns: argparse.Namespace) -> int: def main(*args: str) -> int: parser = argparse.ArgumentParser() + add_parser_args(parser) ns = parser.parse_args(args or None) return runner(ns) diff --git a/STACpopulator/implementations/DirectoryLoader/__init__.py b/STACpopulator/implementations/DirectoryLoader/__init__.py index ee80e45..6940723 100644 --- a/STACpopulator/implementations/DirectoryLoader/__init__.py +++ b/STACpopulator/implementations/DirectoryLoader/__init__.py @@ -1,3 +1,3 @@ -from .crawl_directory import add_parser_args, runner +from STACpopulator.implementations.DirectoryLoader.crawl_directory import add_parser_args, runner __all__ = ["add_parser_args", "runner"]