diff --git a/poetry.lock b/poetry.lock index 5d5e12a..0f62b1f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -29,7 +29,7 @@ pydantic-xml = "^2.11.0" type = "git" url = "https://github.com/asam-ev/qc-baselib-py.git" reference = "develop" -resolved_reference = "f7ea664805bcce456ebd0ede93c852dd389c1944" +resolved_reference = "8ed36cb58c8994b9674f7c6ea74992dacb65bdaf" [[package]] name = "black" @@ -375,13 +375,13 @@ files = [ [[package]] name = "platformdirs" -version = "4.3.2" +version = "4.3.3" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.3.2-py3-none-any.whl", hash = "sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617"}, - {file = "platformdirs-4.3.2.tar.gz", hash = "sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c"}, + {file = "platformdirs-4.3.3-py3-none-any.whl", hash = "sha256:50a5450e2e84f44539718293cbb1da0a0885c9d14adf21b77bae4e66fc99d9b5"}, + {file = "platformdirs-4.3.3.tar.gz", hash = "sha256:d4e0b7d8ec176b341fb03cb11ca12d0276faa8c485f9cd218f613840463fc2c0"}, ] [package.extras] @@ -406,17 +406,17 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pybind11" -version = "2.13.5" +version = "2.13.6" description = "Seamless operability between C++11 and Python" optional = false python-versions = ">=3.7" files = [ - {file = "pybind11-2.13.5-py3-none-any.whl", hash = "sha256:dc35a98b61a0d23ee8599b317664f5be7e259fdc369a3b810b1ebbc3f5674d27"}, - {file = "pybind11-2.13.5.tar.gz", hash = "sha256:ae33f635322f9d9741abde0c5f348bf9373f6c22298883395e586cb43c55574e"}, + {file = "pybind11-2.13.6-py3-none-any.whl", hash = "sha256:237c41e29157b962835d356b370ededd57594a26d5894a795960f0047cb5caf5"}, + {file = "pybind11-2.13.6.tar.gz", hash = "sha256:ba6af10348c12b24e92fa086b39cfba0eff619b61ac77c406167d813b096d39a"}, ] [package.extras] -global = ["pybind11-global (==2.13.5)"] +global = ["pybind11-global (==2.13.6)"] [[package]] name = "pyclothoids" diff --git a/qc_opendrive/checks/basic/version_is_defined.py b/qc_opendrive/checks/basic/version_is_defined.py index 41c7908..3ef39d7 100644 --- a/qc_opendrive/checks/basic/version_is_defined.py +++ b/qc_opendrive/checks/basic/version_is_defined.py @@ -52,6 +52,12 @@ def check_rule(checker_data: models.CheckerData) -> bool: status=StatusType.SKIPPED, ) + checker_data.result.add_checker_summary( + constants.BUNDLE_NAME, + CHECKER_ID, + f"The xml file does not contains the 'header' tag.", + ) + return True # Check if 'header' has the attributes 'revMajor' and 'revMinor' diff --git a/qc_opendrive/checks/schema/valid_schema.py b/qc_opendrive/checks/schema/valid_schema.py index 9fd5b64..557f16f 100644 --- a/qc_opendrive/checks/schema/valid_schema.py +++ b/qc_opendrive/checks/schema/valid_schema.py @@ -109,6 +109,12 @@ def check_rule(checker_data: models.CheckerData) -> None: status=StatusType.SKIPPED, ) + checker_data.result.add_checker_summary( + constants.BUNDLE_NAME, + CHECKER_ID, + f"Cannot find the schema file for ASAM OpenDrive version {schema_version}.", + ) + return xsd_file_path = str( diff --git a/qc_opendrive/main.py b/qc_opendrive/main.py index d554c0c..e3a68d1 100644 --- a/qc_opendrive/main.py +++ b/qc_opendrive/main.py @@ -66,6 +66,12 @@ def execute_checker( status=StatusType.SKIPPED, ) + checker_data.result.add_checker_summary( + constants.BUNDLE_NAME, + checker.CHECKER_ID, + "Preconditions are not satisfied. Skip the check.", + ) + return # Checker definition setting. If not satisfied then set status as SKIPPED and return @@ -82,6 +88,12 @@ def execute_checker( status=StatusType.SKIPPED, ) + checker_data.result.add_checker_summary( + constants.BUNDLE_NAME, + checker.CHECKER_ID, + f"Version {schema_version} is lower than definition setting {definition_setting}. Skip the check.", + ) + return # Execute checker @@ -98,7 +110,7 @@ def execute_checker( checker_id=checker.CHECKER_ID, status=StatusType.COMPLETED, ) - except Exception: + except Exception as e: # If any exception occurs during the check, set the status as ERROR checker_data.result.set_checker_status( checker_bundle_name=constants.BUNDLE_NAME, @@ -106,6 +118,10 @@ def execute_checker( status=StatusType.ERROR, ) + checker_data.result.add_checker_summary( + constants.BUNDLE_NAME, checker.CHECKER_ID, f"Error: {str(e)}." + ) + def run_checks(config: Configuration, result: Result) -> None: checker_data = models.CheckerData( @@ -213,7 +229,8 @@ def main(): result.write_to_file( config.get_checker_bundle_param( checker_bundle_name=constants.BUNDLE_NAME, param_name="resultFile" - ) + ), + generate_summary=True, ) if args.generate_markdown: