Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ 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]

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.
Expand All @@ -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
Expand Down Expand Up @@ -144,15 +144,15 @@ 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]

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.
Expand Down
13 changes: 9 additions & 4 deletions qc_ositrace/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:
Expand Down
Loading