From 2873d72f6cac6f53b47a016f61170cbbe624faa4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:18:50 +0000 Subject: [PATCH 1/6] Make -d flag optional; default to default config when neither -c nor -d is supplied Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/3f67a849-04c8-4ca6-b69f-2c18366a0dfe Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- qc_ositrace/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qc_ositrace/main.py b/qc_ositrace/main.py index 2babddb..ad8583a 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -18,7 +18,7 @@ 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 = parser.add_mutually_exclusive_group(required=False) group.add_argument("-d", "--default_config", action="store_true") group.add_argument("-c", "--config_path") @@ -95,7 +95,7 @@ def main(): logging.info("Initializing checks") config = Configuration() - if args.default_config: + if args.default_config or not args.config_path: logging.info("Using default configuration") config.register_checker_bundle(checker_bundle_name=constants.BUNDLE_NAME) else: From a890a66b67adce3436769965df1df4c9ec3fc0c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:19:33 +0000 Subject: [PATCH 2/6] Use explicit None check for config_path to avoid empty string edge case Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/3f67a849-04c8-4ca6-b69f-2c18366a0dfe Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- qc_ositrace/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qc_ositrace/main.py b/qc_ositrace/main.py index ad8583a..5820bb0 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -95,7 +95,7 @@ def main(): logging.info("Initializing checks") config = Configuration() - if args.default_config or not args.config_path: + if args.default_config or args.config_path is None: logging.info("Using default configuration") config.register_checker_bundle(checker_bundle_name=constants.BUNDLE_NAME) else: From 68d95f32b62d30067f7323f63e0e04ed1b5e2268 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:28:11 +0000 Subject: [PATCH 3/6] Simplify to args.config_path is None, remove -d flag, update README Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/913b681d-c5fd-413a-9cbe-52253a4d5a3e Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- README.md | 8 +++----- qc_ositrace/main.py | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f5359d0..d1ee827 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] [-c CONFIG_PATH] [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] [--osiVersion OSIVERSION] [--osiRulesFile OSIRULESFILE] [-r RESULT_FILE] [--output_config OUTPUT_CONFIG] @@ -58,7 +58,6 @@ 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 -c, --config_path CONFIG_PATH -i, --input_file INPUT_FILE Path to the input OSI Trace file. @@ -77,7 +76,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 +143,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] [-c CONFIG_PATH] [-i INPUT_FILE] [--osiTopic OSITOPIC] [--osiType OSITYPE] [--osiVersion OSIVERSION] [--osiRulesFile OSIRULESFILE] [-r RESULT_FILE] [--output_config OUTPUT_CONFIG] @@ -152,7 +151,6 @@ 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 -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 5820bb0..49e3599 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -18,9 +18,7 @@ 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=False) - group.add_argument("-d", "--default_config", action="store_true") - group.add_argument("-c", "--config_path") + parser.add_argument("-c", "--config_path") parser.add_argument( "-i", @@ -95,7 +93,7 @@ def main(): logging.info("Initializing checks") config = Configuration() - if args.default_config or args.config_path is None: + if args.config_path is None: logging.info("Using default configuration") config.register_checker_bundle(checker_bundle_name=constants.BUNDLE_NAME) else: From 6a93489d7ca245bc04c12b02ba02c86e8198380d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:30:04 +0000 Subject: [PATCH 4/6] Re-add -d flag for backward compatibility; mark as deprecated Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/07cce862-6700-4593-b24a-de169832d348 Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- README.md | 8 ++++++-- qc_ositrace/main.py | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1ee827..6111b31 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] [-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,6 +58,8 @@ 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 Deprecated. Retained for backward compatibility. 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. @@ -143,7 +145,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] [-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] @@ -151,6 +153,8 @@ 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 Deprecated. Retained for backward compatibility. 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 49e3599..528499a 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -18,6 +18,12 @@ def args_entrypoint() -> argparse.Namespace: description="ASAM QC checker bundle for checking the validity of OSI Trace (.osi/.mcap) files.", ) + parser.add_argument( + "-d", + "--default_config", + action="store_true", + help="Deprecated. Retained for backward compatibility. Default configuration is used whenever -c is omitted.", + ) parser.add_argument("-c", "--config_path") parser.add_argument( From 6bcec754a80fc2168c3c7be3cdc70174a778db28 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:33:23 +0000 Subject: [PATCH 5/6] Restore mutually exclusive group for -d and -c flags Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/90a7ce78-e1a1-4394-b865-888b578fb083 Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- README.md | 4 ++-- qc_ositrace/main.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6111b31..27878f6 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] @@ -145,7 +145,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] diff --git a/qc_ositrace/main.py b/qc_ositrace/main.py index 528499a..f145b35 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -18,13 +18,14 @@ def args_entrypoint() -> argparse.Namespace: description="ASAM QC checker bundle for checking the validity of OSI Trace (.osi/.mcap) files.", ) - parser.add_argument( + config_group = parser.add_mutually_exclusive_group() + config_group.add_argument( "-d", "--default_config", action="store_true", help="Deprecated. Retained for backward compatibility. Default configuration is used whenever -c is omitted.", ) - parser.add_argument("-c", "--config_path") + config_group.add_argument("-c", "--config_path") parser.add_argument( "-i", From b65e2b461b41cb7813d63405f845a1a005b3c4bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 19:41:09 +0000 Subject: [PATCH 6/6] Shorten -d help text per review suggestions Agent-Logs-Url: https://github.com/OpenSimulationInterface/qc-osi-trace/sessions/c0098133-f301-4796-937e-2707f09699e0 Co-authored-by: pmai <91502+pmai@users.noreply.github.com> --- README.md | 6 ++---- qc_ositrace/main.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 27878f6..d25c2fd 100644 --- a/README.md +++ b/README.md @@ -58,8 +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 Deprecated. Retained for backward compatibility. Default configuration is used whenever -c is - omitted. + -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. @@ -153,8 +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 Deprecated. Retained for backward compatibility. Default configuration is used whenever -c is - omitted. + -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 f145b35..473170b 100644 --- a/qc_ositrace/main.py +++ b/qc_ositrace/main.py @@ -23,7 +23,7 @@ def args_entrypoint() -> argparse.Namespace: "-d", "--default_config", action="store_true", - help="Deprecated. Retained for backward compatibility. Default configuration is used whenever -c is omitted.", + help="Deprecated. Default configuration is used whenever -c is omitted.", ) config_group.add_argument("-c", "--config_path")