From 559ac11b65ec1001b35c6cba384a6bf867b2d7c4 Mon Sep 17 00:00:00 2001 From: hoangtungdinh <11166240+hoangtungdinh@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:57:23 +0100 Subject: [PATCH 1/2] Add copyright, license header and SPDX-License-Identifier Signed-off-by: hoangtungdinh <11166240+hoangtungdinh@users.noreply.github.com> --- LICENSE | 3 +++ qc_openscenario/__init__.py | 6 ++++++ qc_openscenario/__main__.py | 6 ++++++ qc_openscenario/basic_preconditions.py | 6 ++++++ qc_openscenario/checks/__init__.py | 6 ++++++ qc_openscenario/checks/basic_checker/__init__.py | 6 ++++++ .../checks/basic_checker/fileheader_is_present.py | 7 ++++++- .../checks/basic_checker/root_tag_is_openscenario.py | 7 ++++++- .../checks/basic_checker/valid_xml_document.py | 7 ++++++- .../checks/basic_checker/version_is_defined.py | 7 ++++++- qc_openscenario/checks/data_type_checker/__init__.py | 6 ++++++ .../checks/data_type_checker/allowed_operators.py | 6 ++++++ .../non_negative_transition_time_in_light_state_action.py | 6 ++++++ .../data_type_checker/positive_duration_in_phase.py | 6 ++++++ qc_openscenario/checks/models.py | 6 ++++++ qc_openscenario/checks/parameters_checker/__init__.py | 6 ++++++ .../valid_parameter_declaration_in_catalogs.py | 8 ++++++-- qc_openscenario/checks/reference_checker/__init__.py | 6 ++++++ .../reference_checker/resolvable_entity_references.py | 6 ++++++ ...resolvable_signal_id_in_traffic_signal_state_action.py | 6 ++++++ .../resolvable_storyboard_element_reference.py | 6 ++++++ ..._signal_controller_by_traffic_signal_controller_ref.py | 6 ++++++ .../reference_checker/resolvable_variable_reference.py | 6 ++++++ .../unique_element_names_on_same_level.py | 6 ++++++ .../uniquely_resolvable_entity_references.py | 6 ++++++ .../valid_actor_reference_in_private_actions.py | 7 ++++++- qc_openscenario/checks/schema_checker/__init__.py | 6 ++++++ qc_openscenario/checks/schema_checker/valid_schema.py | 7 ++++++- qc_openscenario/checks/utils.py | 6 ++++++ qc_openscenario/constants.py | 6 ++++++ qc_openscenario/main.py | 6 ++++++ qc_openscenario/schema/__init__.py | 6 ++++++ qc_openscenario/schema/schema_files.py | 6 ++++++ tests/test_basic_checks.py | 6 ++++++ tests/test_data_type_checks.py | 6 ++++++ tests/test_main_executor.py | 6 ++++++ tests/test_parameters_checks.py | 6 ++++++ tests/test_reference_checks.py | 6 ++++++ tests/test_schema_checks.py | 6 ++++++ tests/test_utils.py | 6 ++++++ 40 files changed, 237 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index a612ad9..ca9b8a0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,9 @@ Mozilla Public License Version 2.0 ================================== +Copyright (C) 2023 CARIAD +Copyright (C) 2024 ASAM e.V. + 1. Definitions -------------- diff --git a/qc_openscenario/__init__.py b/qc_openscenario/__init__.py index 0dc6a13..d071e3b 100644 --- a/qc_openscenario/__init__.py +++ b/qc_openscenario/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import constants as constants from . import checks as checks from . import basic_preconditions as basic_preconditions diff --git a/qc_openscenario/__main__.py b/qc_openscenario/__main__.py index 58212bb..9e124ba 100644 --- a/qc_openscenario/__main__.py +++ b/qc_openscenario/__main__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from qc_openscenario import main main.main() diff --git a/qc_openscenario/basic_preconditions.py b/qc_openscenario/basic_preconditions.py index cbb96ac..1148363 100644 --- a/qc_openscenario/basic_preconditions.py +++ b/qc_openscenario/basic_preconditions.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from qc_openscenario.checks.basic_checker import ( valid_xml_document, root_tag_is_openscenario, diff --git a/qc_openscenario/checks/__init__.py b/qc_openscenario/checks/__init__.py index 20512d6..4387b6c 100644 --- a/qc_openscenario/checks/__init__.py +++ b/qc_openscenario/checks/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import schema_checker as schema_checker from . import basic_checker as basic_checker from . import reference_checker as reference_checker diff --git a/qc_openscenario/checks/basic_checker/__init__.py b/qc_openscenario/checks/basic_checker/__init__.py index 404da2f..b70718e 100644 --- a/qc_openscenario/checks/basic_checker/__init__.py +++ b/qc_openscenario/checks/basic_checker/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import valid_xml_document as valid_xml_document from . import root_tag_is_openscenario as root_tag_is_openscenario from . import fileheader_is_present as fileheader_is_present diff --git a/qc_openscenario/checks/basic_checker/fileheader_is_present.py b/qc_openscenario/checks/basic_checker/fileheader_is_present.py index 014fc57..5bab4b6 100644 --- a/qc_openscenario/checks/basic_checker/fileheader_is_present.py +++ b/qc_openscenario/checks/basic_checker/fileheader_is_present.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity @@ -40,7 +46,6 @@ def check_rule(checker_data: models.CheckerData) -> None: is_valid = False if not is_valid: - issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, checker_id=CHECKER_ID, diff --git a/qc_openscenario/checks/basic_checker/root_tag_is_openscenario.py b/qc_openscenario/checks/basic_checker/root_tag_is_openscenario.py index e822dff..009dc6d 100644 --- a/qc_openscenario/checks/basic_checker/root_tag_is_openscenario.py +++ b/qc_openscenario/checks/basic_checker/root_tag_is_openscenario.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity @@ -32,7 +38,6 @@ def check_rule(checker_data: models.CheckerData) -> None: is_valid = False if not is_valid: - issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, checker_id=CHECKER_ID, diff --git a/qc_openscenario/checks/basic_checker/valid_xml_document.py b/qc_openscenario/checks/basic_checker/valid_xml_document.py index 2e2b7c3..889d5f0 100644 --- a/qc_openscenario/checks/basic_checker/valid_xml_document.py +++ b/qc_openscenario/checks/basic_checker/valid_xml_document.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from lxml import etree @@ -37,7 +43,6 @@ def check_rule(checker_data: models.CheckerData) -> None: is_valid, error_location = _is_xml_doc(checker_data.xml_file_path) if not is_valid: - issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, checker_id=CHECKER_ID, diff --git a/qc_openscenario/checks/basic_checker/version_is_defined.py b/qc_openscenario/checks/basic_checker/version_is_defined.py index 0fd8e09..cb24097 100644 --- a/qc_openscenario/checks/basic_checker/version_is_defined.py +++ b/qc_openscenario/checks/basic_checker/version_is_defined.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType @@ -69,7 +75,6 @@ def check_rule(checker_data: models.CheckerData) -> None: is_valid = False if not is_valid: - issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, checker_id=CHECKER_ID, diff --git a/qc_openscenario/checks/data_type_checker/__init__.py b/qc_openscenario/checks/data_type_checker/__init__.py index 7338e41..49b624c 100644 --- a/qc_openscenario/checks/data_type_checker/__init__.py +++ b/qc_openscenario/checks/data_type_checker/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import allowed_operators as allowed_operators from . import ( non_negative_transition_time_in_light_state_action as non_negative_transition_time_in_light_state_action, diff --git a/qc_openscenario/checks/data_type_checker/allowed_operators.py b/qc_openscenario/checks/data_type_checker/allowed_operators.py index cbb68c2..f7d39e9 100644 --- a/qc_openscenario/checks/data_type_checker/allowed_operators.py +++ b/qc_openscenario/checks/data_type_checker/allowed_operators.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from dataclasses import dataclass diff --git a/qc_openscenario/checks/data_type_checker/non_negative_transition_time_in_light_state_action.py b/qc_openscenario/checks/data_type_checker/non_negative_transition_time_in_light_state_action.py index 4fc7561..e4e4c25 100644 --- a/qc_openscenario/checks/data_type_checker/non_negative_transition_time_in_light_state_action.py +++ b/qc_openscenario/checks/data_type_checker/non_negative_transition_time_in_light_state_action.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/data_type_checker/positive_duration_in_phase.py b/qc_openscenario/checks/data_type_checker/positive_duration_in_phase.py index e901a2f..9bc2bfd 100644 --- a/qc_openscenario/checks/data_type_checker/positive_duration_in_phase.py +++ b/qc_openscenario/checks/data_type_checker/positive_duration_in_phase.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/models.py b/qc_openscenario/checks/models.py index f171f57..76e6f3c 100644 --- a/qc_openscenario/checks/models.py +++ b/qc_openscenario/checks/models.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from dataclasses import dataclass from lxml import etree from typing import Optional diff --git a/qc_openscenario/checks/parameters_checker/__init__.py b/qc_openscenario/checks/parameters_checker/__init__.py index 8c8e504..a2299a0 100644 --- a/qc_openscenario/checks/parameters_checker/__init__.py +++ b/qc_openscenario/checks/parameters_checker/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import ( valid_parameter_declaration_in_catalogs as valid_parameter_declaration_in_catalogs, ) diff --git a/qc_openscenario/checks/parameters_checker/valid_parameter_declaration_in_catalogs.py b/qc_openscenario/checks/parameters_checker/valid_parameter_declaration_in_catalogs.py index 8b22c3e..a123248 100644 --- a/qc_openscenario/checks/parameters_checker/valid_parameter_declaration_in_catalogs.py +++ b/qc_openscenario/checks/parameters_checker/valid_parameter_declaration_in_catalogs.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging @@ -55,7 +61,6 @@ def check_rule(checker_data: models.CheckerData) -> None: logging.debug(f"catalogs_node : {catalogs_node}") for catalog_node in catalogs_node: - parameter_declaration_nodes = catalog_node.find(".//ParameterDeclarations") logging.debug(f"parameter_declaration_nodes : {parameter_declaration_nodes}") # Get parameters declarations and check if they have default value @@ -92,7 +97,6 @@ def check_rule(checker_data: models.CheckerData) -> None: == models.AttributeType.PARAMETER and attr_value[1:] not in defined_parameters_with_default ): - issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, checker_id=CHECKER_ID, diff --git a/qc_openscenario/checks/reference_checker/__init__.py b/qc_openscenario/checks/reference_checker/__init__.py index b3abddd..2519f87 100644 --- a/qc_openscenario/checks/reference_checker/__init__.py +++ b/qc_openscenario/checks/reference_checker/__init__.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import ( uniquely_resolvable_entity_references as uniquely_resolvable_entity_references, ) diff --git a/qc_openscenario/checks/reference_checker/resolvable_entity_references.py b/qc_openscenario/checks/reference_checker/resolvable_entity_references.py index a3e9009..8c6f0eb 100644 --- a/qc_openscenario/checks/reference_checker/resolvable_entity_references.py +++ b/qc_openscenario/checks/reference_checker/resolvable_entity_references.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/reference_checker/resolvable_signal_id_in_traffic_signal_state_action.py b/qc_openscenario/checks/reference_checker/resolvable_signal_id_in_traffic_signal_state_action.py index 273e97c..d4371c2 100644 --- a/qc_openscenario/checks/reference_checker/resolvable_signal_id_in_traffic_signal_state_action.py +++ b/qc_openscenario/checks/reference_checker/resolvable_signal_id_in_traffic_signal_state_action.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/reference_checker/resolvable_storyboard_element_reference.py b/qc_openscenario/checks/reference_checker/resolvable_storyboard_element_reference.py index 1f857a1..d477045 100644 --- a/qc_openscenario/checks/reference_checker/resolvable_storyboard_element_reference.py +++ b/qc_openscenario/checks/reference_checker/resolvable_storyboard_element_reference.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/reference_checker/resolvable_traffic_signal_controller_by_traffic_signal_controller_ref.py b/qc_openscenario/checks/reference_checker/resolvable_traffic_signal_controller_by_traffic_signal_controller_ref.py index dfc4a4d..6ec7522 100644 --- a/qc_openscenario/checks/reference_checker/resolvable_traffic_signal_controller_by_traffic_signal_controller_ref.py +++ b/qc_openscenario/checks/reference_checker/resolvable_traffic_signal_controller_by_traffic_signal_controller_ref.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from qc_baselib import IssueSeverity, StatusType diff --git a/qc_openscenario/checks/reference_checker/resolvable_variable_reference.py b/qc_openscenario/checks/reference_checker/resolvable_variable_reference.py index cc01209..a4303f3 100644 --- a/qc_openscenario/checks/reference_checker/resolvable_variable_reference.py +++ b/qc_openscenario/checks/reference_checker/resolvable_variable_reference.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging diff --git a/qc_openscenario/checks/reference_checker/unique_element_names_on_same_level.py b/qc_openscenario/checks/reference_checker/unique_element_names_on_same_level.py index 95dc937..cea778b 100644 --- a/qc_openscenario/checks/reference_checker/unique_element_names_on_same_level.py +++ b/qc_openscenario/checks/reference_checker/unique_element_names_on_same_level.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from dataclasses import dataclass diff --git a/qc_openscenario/checks/reference_checker/uniquely_resolvable_entity_references.py b/qc_openscenario/checks/reference_checker/uniquely_resolvable_entity_references.py index 907b053..5187eeb 100644 --- a/qc_openscenario/checks/reference_checker/uniquely_resolvable_entity_references.py +++ b/qc_openscenario/checks/reference_checker/uniquely_resolvable_entity_references.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging from typing import List diff --git a/qc_openscenario/checks/reference_checker/valid_actor_reference_in_private_actions.py b/qc_openscenario/checks/reference_checker/valid_actor_reference_in_private_actions.py index e439379..e2d2026 100644 --- a/qc_openscenario/checks/reference_checker/valid_actor_reference_in_private_actions.py +++ b/qc_openscenario/checks/reference_checker/valid_actor_reference_in_private_actions.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import logging @@ -54,7 +60,6 @@ def check_rule(checker_data: models.CheckerData) -> None: return for maneuver_group in maneuver_groups: - private_actions = maneuver_group.findall(".//PrivateAction") entity_refs = maneuver_group.findall(".//EntityRef") diff --git a/qc_openscenario/checks/schema_checker/__init__.py b/qc_openscenario/checks/schema_checker/__init__.py index 660fc3a..0050df8 100644 --- a/qc_openscenario/checks/schema_checker/__init__.py +++ b/qc_openscenario/checks/schema_checker/__init__.py @@ -1 +1,7 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import valid_schema as valid_schema diff --git a/qc_openscenario/checks/schema_checker/valid_schema.py b/qc_openscenario/checks/schema_checker/valid_schema.py index e3bf782..61f3c11 100644 --- a/qc_openscenario/checks/schema_checker/valid_schema.py +++ b/qc_openscenario/checks/schema_checker/valid_schema.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import importlib.resources import logging @@ -90,7 +96,6 @@ def check_rule(checker_data: models.CheckerData) -> None: ) if not schema_compliant: - for error in errors: issue_id = checker_data.result.register_issue( checker_bundle_name=constants.BUNDLE_NAME, diff --git a/qc_openscenario/checks/utils.py b/qc_openscenario/checks/utils.py index 7d56ce0..4c9d52a 100644 --- a/qc_openscenario/checks/utils.py +++ b/qc_openscenario/checks/utils.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from lxml import etree from io import BytesIO from typing import Union, Optional diff --git a/qc_openscenario/constants.py b/qc_openscenario/constants.py index b54b97f..e6c856a 100644 --- a/qc_openscenario/constants.py +++ b/qc_openscenario/constants.py @@ -1,2 +1,8 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + BUNDLE_NAME = "xoscBundle" BUNDLE_VERSION = "v1.0.0-rc.1" diff --git a/qc_openscenario/main.py b/qc_openscenario/main.py index b1a0299..5c3a1e3 100644 --- a/qc_openscenario/main.py +++ b/qc_openscenario/main.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import argparse import logging from datetime import datetime diff --git a/qc_openscenario/schema/__init__.py b/qc_openscenario/schema/__init__.py index 5791eb4..def821b 100644 --- a/qc_openscenario/schema/__init__.py +++ b/qc_openscenario/schema/__init__.py @@ -1 +1,7 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + from . import schema_files as schema_files diff --git a/qc_openscenario/schema/schema_files.py b/qc_openscenario/schema/schema_files.py index c945c5a..5cc5905 100644 --- a/qc_openscenario/schema/schema_files.py +++ b/qc_openscenario/schema/schema_files.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + SCHEMA_FILES = { "1.0.0": "1.0.0/OpenSCENARIO.xsd", "1.1.0": "1.1.0/OpenSCENARIO.xsd", diff --git a/tests/test_basic_checks.py b/tests/test_basic_checks.py index 88e0c2f..4daa292 100644 --- a/tests/test_basic_checks.py +++ b/tests/test_basic_checks.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_data_type_checks.py b/tests/test_data_type_checks.py index a4eff38..f2a6f51 100644 --- a/tests/test_data_type_checks.py +++ b/tests/test_data_type_checks.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_main_executor.py b/tests/test_main_executor.py index 260a48e..bad3a02 100644 --- a/tests/test_main_executor.py +++ b/tests/test_main_executor.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_parameters_checks.py b/tests/test_parameters_checks.py index d867c87..af2820b 100644 --- a/tests/test_parameters_checks.py +++ b/tests/test_parameters_checks.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_reference_checks.py b/tests/test_reference_checks.py index 8e5ae2b..3d03b54 100644 --- a/tests/test_reference_checks.py +++ b/tests/test_reference_checks.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_schema_checks.py b/tests/test_schema_checks.py index ede6c3a..9595497 100644 --- a/tests/test_schema_checks.py +++ b/tests/test_schema_checks.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import pytest import test_utils diff --git a/tests/test_utils.py b/tests/test_utils.py index 6a23505..0eaa528 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: MPL-2.0 +# Copyright 2024, ASAM e.V. +# This Source Code Form is subject to the terms of the Mozilla +# Public License, v. 2.0. If a copy of the MPL was not distributed +# with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + import os import sys import pytest From 825575bac7571aef72d4222938d15a364fcf4432 Mon Sep 17 00:00:00 2001 From: Hoang Tung Dinh Date: Tue, 29 Oct 2024 09:18:33 +0100 Subject: [PATCH 2/2] Update LICENSE Signed-off-by: Hoang Tung Dinh Co-authored-by: Andreas Kern --- LICENSE | 1 - 1 file changed, 1 deletion(-) diff --git a/LICENSE b/LICENSE index ca9b8a0..d42a0d9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,6 @@ Mozilla Public License Version 2.0 ================================== -Copyright (C) 2023 CARIAD Copyright (C) 2024 ASAM e.V. 1. Definitions