diff --git a/README.md b/README.md index f5359d0..d25c2fd 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ from qc_ositrace.checks.deserialization import deserialization_checker ```bash qc_ositrace --help -usage: QC OSI Trace Checker [-h] (-d | -c CONFIG_PATH) [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] +usage: QC OSI Trace Checker [-h] [-d | -c CONFIG_PATH] [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] [--osiVersion OSIVERSION] [--osiRulesFile OSIRULESFILE] [-r RESULT_FILE] [--output_config OUTPUT_CONFIG] @@ -58,7 +58,7 @@ ASAM QC checker bundle for checking the validity of OSI Trace (.osi/.mcap) files options: -h, --help show this help message and exit - -d, --default_config + -d, --default_config Deprecated. Default configuration is used whenever -c is omitted. -c, --config_path CONFIG_PATH -i, --input_file INPUT_FILE Path to the input OSI Trace file. @@ -77,7 +77,7 @@ options: Example checking a simple SensorData trace file against version 3.7.0 rules using default configuration: ```bash -qc_ositrace -d -r results.xqar --osiType SensorData --osiVersion 3.7.0 -i 20210818T150542Z_sd_370_300_1523_example_sensordata_trace.osi +qc_ositrace -r results.xqar --osiType SensorData --osiVersion 3.7.0 -i 20210818T150542Z_sd_370_300_1523_example_sensordata_trace.osi ``` ### Example output @@ -144,7 +144,7 @@ It is also possible to execute the qc_ositrace application using Poetry: ```bash poetry run qc_ositrace --help -usage: QC OSI Trace Checker [-h] (-d | -c CONFIG_PATH) [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] +usage: QC OSI Trace Checker [-h] [-d | -c CONFIG_PATH] [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] [--osiVersion OSIVERSION] [--osiRulesFile OSIRULESFILE] [-r RESULT_FILE] [--output_config OUTPUT_CONFIG] @@ -152,7 +152,7 @@ ASAM QC checker bundle for checking the validity of OSI Trace (.osi/.mcap) files options: -h, --help show this help message and exit - -d, --default_config + -d, --default_config Deprecated. Default configuration is used whenever -c is omitted. -c, --config_path CONFIG_PATH -i, --input_file INPUT_FILE Path to the input OSI Trace file. diff --git a/qc_ositrace/main.py b/qc_ositrace/main.py index 2babddb..473170b 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -18,9 +18,14 @@ def args_entrypoint() -> argparse.Namespace: description="ASAM QC checker bundle for checking the validity of OSI Trace (.osi/.mcap) files.", ) - group = parser.add_mutually_exclusive_group(required=True) - group.add_argument("-d", "--default_config", action="store_true") - group.add_argument("-c", "--config_path") + config_group = parser.add_mutually_exclusive_group() + config_group.add_argument( + "-d", + "--default_config", + action="store_true", + help="Deprecated. Default configuration is used whenever -c is omitted.", + ) + config_group.add_argument("-c", "--config_path") parser.add_argument( "-i", @@ -95,7 +100,7 @@ def main(): logging.info("Initializing checks") config = Configuration() - if args.default_config: + if args.config_path is None: logging.info("Using default configuration") config.register_checker_bundle(checker_bundle_name=constants.BUNDLE_NAME) else: