diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 777347f..a087da8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ default_install_hook_types: [commit-msg, pre-commit] default_stages: [commit, merge-commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -26,28 +26,28 @@ repos: - id: fix-byte-order-marker - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/PyCQA/docformatter - rev: v1.5.0 + rev: v1.7.5 hooks: - id: docformatter additional_dependencies: - docformatter[tomli] - repo: https://github.com/PyCQA/pydocstyle - rev: 6.1.1 + rev: 6.3.0 hooks: - id: pydocstyle exclude: '^tests/' additional_dependencies: - pydocstyle[toml] - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.13 + rev: v1.5.5 hooks: - id: insert-license name: Insert license headers (shell-style comments) @@ -90,10 +90,6 @@ repos: - --comment-style - '..| |' - repo: https://github.com/fsfe/reuse-tool - rev: v1.0.0 + rev: v4.0.3 hooks: - id: reuse - - repo: https://github.com/qoomon/git-conventional-commits - rev: v2.1.1 - hooks: - - id: conventional-commits diff --git a/git-conventional-commits.json b/git-conventional-commits.json deleted file mode 100644 index 1da947a..0000000 --- a/git-conventional-commits.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "convention" : { - "commitTypes": [ - "build", - "chore", - "ci", - "docs", - "feat", - "fix", - "merge", - "perf", - "refactor", - "revert", - "test", - - "lint" - ], - "commitScopes": [] - } -} diff --git a/git-conventional-commits.json.license b/git-conventional-commits.json.license deleted file mode 100644 index 1b58a49..0000000 --- a/git-conventional-commits.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: Copyright DB Netz AG and the raillabel-providerkit contributors -SPDX-License-Identifier: Apache-2.0 diff --git a/raillabel_providerkit/convert/loader_classes/__init__.py b/raillabel_providerkit/convert/loader_classes/__init__.py index 2320940..72a3266 100644 --- a/raillabel_providerkit/convert/loader_classes/__init__.py +++ b/raillabel_providerkit/convert/loader_classes/__init__.py @@ -11,7 +11,7 @@ # iterate through the modules in the current package package_dir = str(Path(__file__).resolve().parent) -for (_, module_name, _) in iter_modules([package_dir]): +for _, module_name, _ in iter_modules([package_dir]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}") diff --git a/raillabel_providerkit/validation/validate_empty_frames/__init__.py b/raillabel_providerkit/validation/validate_empty_frames/__init__.py new file mode 100644 index 0000000..3f71fbc --- /dev/null +++ b/raillabel_providerkit/validation/validate_empty_frames/__init__.py @@ -0,0 +1,3 @@ +# Copyright DB Netz AG and contributors +# SPDX-License-Identifier: Apache-2.0 +"""Package for validating a scene for empty frames.""" diff --git a/raillabel_providerkit/validation/validate_empty_frames/validate_empty_frames.py b/raillabel_providerkit/validation/validate_empty_frames/validate_empty_frames.py new file mode 100644 index 0000000..1bdc2e9 --- /dev/null +++ b/raillabel_providerkit/validation/validate_empty_frames/validate_empty_frames.py @@ -0,0 +1,33 @@ +# Copyright DB Netz AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from typing import List + +import raillabel + + +def validate_empty_frames(scene: raillabel.Scene) -> List[str]: + """Validate whether all frames of a scene have at least one annotation. + + Parameters + ---------- + scene : raillabel.Scene + Scene, that should be validated. + + Returns + ------- + list[str] + list of all empty frame errors in the scene. If an empty list is returned, then there are no + errors present. + """ + errors: List[str] = [] + + for frame_uid, frame in scene.frames.items(): + if _is_frame_empty(frame): + errors.append("Frame " + str(frame_uid) + " has no annotations!") + + return errors + + +def _is_frame_empty(frame: raillabel.format.Frame) -> bool: + return len(frame.annotations) == 0 diff --git a/raillabel_providerkit/validation/validate_onthology/_onthology_classes/_attributes/_attribute_abc.py b/raillabel_providerkit/validation/validate_onthology/_onthology_classes/_attributes/_attribute_abc.py index 6edebc5..04e45d6 100644 --- a/raillabel_providerkit/validation/validate_onthology/_onthology_classes/_attributes/_attribute_abc.py +++ b/raillabel_providerkit/validation/validate_onthology/_onthology_classes/_attributes/_attribute_abc.py @@ -38,7 +38,7 @@ def _collect_attribute_classes(): global ATTRIBUTE_CLASSES package_dir = str(Path(__file__).resolve().parent) - for (_, module_name, _) in iter_modules([package_dir]): + for _, module_name, _ in iter_modules([package_dir]): module = import_module( f"raillabel_providerkit.validation.validate_onthology._onthology_classes._attributes.{module_name}" diff --git a/tests/conftest.py b/tests/conftest.py index f2f58e4..bc49225 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,13 +3,11 @@ import glob import json -import sys import typing as t from pathlib import Path import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent)) +import raillabel json_data_directories = [ Path(__file__).parent / "__test_assets__", @@ -68,3 +66,48 @@ def _load_json_data(path: Path) -> dict: with path.open() as f: json_data = json.load(f) return json_data + +@pytest.fixture +def empty_scene() -> raillabel.Scene: + return raillabel.Scene( + metadata=raillabel.format.Metadata(schema_version="1.0.0"), + sensors={}, + objects={}, + frames={}, + ) + +@pytest.fixture +def default_frame(empty_annotation) -> raillabel.format.Frame: + return raillabel.format.Frame( + uid=0, + timestamp=None, + sensors={}, + frame_data={}, + annotations={ + "0fb4fc0b-3eeb-443a-8dd0-2caf9912d016": empty_annotation + } + ) + +@pytest.fixture +def empty_frame() -> raillabel.format.Frame: + return raillabel.format.Frame( + uid=0, + timestamp=None, + sensors={}, + frame_data={}, + annotations={} + ) + +@pytest.fixture +def empty_annotation() -> raillabel.format.Bbox: + return raillabel.format.Bbox( + uid="1f654afe-0a18-497f-9db8-afac360ce94c", + object=raillabel.format.Object( + uid="7df959d7-0ec2-4722-8b62-bb2e529de2ec", + name="person0000", + type="person", + ), + sensor=None, + pos=raillabel.format.Point2d(0.0, 0.0), + size=raillabel.format.Size2d(0.0, 0.0), + ) diff --git a/tests/test_raillabel_providerkit/_util/test_warning.py b/tests/test_raillabel_providerkit/_util/test_warning.py index e8d9cbc..5d98cd6 100644 --- a/tests/test_raillabel_providerkit/_util/test_warning.py +++ b/tests/test_raillabel_providerkit/_util/test_warning.py @@ -1,14 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import os -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent)) - from raillabel._util._warning import _warning, _WarningsLogger @@ -21,12 +14,12 @@ def test_issue_warning(): ] def test_handover_exception(): - with pytest.raises(RuntimeError) as error: - with _WarningsLogger() as logger: + with pytest.raises(RuntimeError): + with _WarningsLogger(): raise RuntimeError("weewoo something went wrong") def test_clear_warnings(): - with _WarningsLogger() as logger1: + with _WarningsLogger(): _warning("lorem ipsum") with _WarningsLogger() as logger2: @@ -36,5 +29,4 @@ def test_clear_warnings(): if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear", "-v"]) diff --git a/tests/test_raillabel_providerkit/convert/loader_classes/test_loader_understand_ai.py b/tests/test_raillabel_providerkit/convert/loader_classes/test_loader_understand_ai.py index 4eba35c..2d26cd8 100644 --- a/tests/test_raillabel_providerkit/convert/loader_classes/test_loader_understand_ai.py +++ b/tests/test_raillabel_providerkit/convert/loader_classes/test_loader_understand_ai.py @@ -2,13 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 import os -import sys -from pathlib import Path import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel @@ -115,5 +110,4 @@ def test_raillabel_loader_warnings(loader): # Executes the test if the file is called if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear"]) diff --git a/tests/test_raillabel_providerkit/convert/test_convert.py b/tests/test_raillabel_providerkit/convert/test_convert.py index 1184caf..79e8709 100644 --- a/tests/test_raillabel_providerkit/convert/test_convert.py +++ b/tests/test_raillabel_providerkit/convert/test_convert.py @@ -7,8 +7,6 @@ import pytest -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent)) - import raillabel_providerkit @@ -26,5 +24,4 @@ def test_convert_uai_provide_class(json_data): # Executes the test if the file is called if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear"]) diff --git a/tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py b/tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py index 83d7baf..ad8102d 100644 --- a/tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py +++ b/tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py @@ -30,5 +30,4 @@ def test_sample_data_validation_superschema(json_data): # Executes the test if the file is called if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear"]) diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_2d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_2d.py index be81c2e..16d97e4 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_2d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_2d.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path from uuid import UUID import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel.format.understand_ai._translation import translate_class_id diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_3d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_3d.py index 90b9ff5..5833e8e 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_3d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_bounding_box_3d.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path from uuid import UUID import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel.format.understand_ai._translation import translate_class_id diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_coordinate_system.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_coordinate_system.py index b217928..10afa7d 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_coordinate_system.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_coordinate_system.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_frame.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_frame.py index 6c639aa..4caa59c 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_frame.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_frame.py @@ -1,14 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path -from uuid import UUID - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel._util._warning import _WarningsLogger diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_metadata.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_metadata.py index c7ed6d6..e49ae76 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_metadata.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_metadata.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_point_3d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_point_3d.py index 764c148..a234e22 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_point_3d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_point_3d.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polygon_2d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polygon_2d.py index d1b5bfb..b004c82 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polygon_2d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polygon_2d.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path from uuid import UUID import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel.format.understand_ai._translation import translate_class_id diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polyline_2d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polyline_2d.py index 7655896..5857eb0 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polyline_2d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_polyline_2d.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path from uuid import UUID import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel.format.understand_ai._translation import translate_class_id diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_quaternion.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_quaternion.py index b19c8ed..7ba5b4c 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_quaternion.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_quaternion.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_scene.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_scene.py index 401300f..bdbc825 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_scene.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_scene.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel._util._warning import _WarningsLogger diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_segmentation_3d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_segmentation_3d.py index 2ddde2d..4371fac 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_segmentation_3d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_segmentation_3d.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path from uuid import UUID import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format from raillabel.format.understand_ai._translation import translate_class_id diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_sensor_reference.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_sensor_reference.py index 1bcd210..2b7af86 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_sensor_reference.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_sensor_reference.py @@ -1,14 +1,9 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys from decimal import Decimal -from pathlib import Path import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_size_3d.py b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_size_3d.py index 680b047..1a5194c 100644 --- a/tests/test_raillabel_providerkit/format/understand_ai/test_uai_size_3d.py +++ b/tests/test_raillabel_providerkit/format/understand_ai/test_uai_size_3d.py @@ -1,13 +1,7 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import sys -from pathlib import Path - import pytest - -sys.path.insert(1, str(Path(__file__).parent.parent.parent.parent.parent)) - import raillabel.format.understand_ai as uai_format # == Fixtures ========================= diff --git a/tests/test_raillabel_providerkit/validation/test_validate.py b/tests/test_raillabel_providerkit/validation/test_validate.py index e3ce73d..126024b 100644 --- a/tests/test_raillabel_providerkit/validation/test_validate.py +++ b/tests/test_raillabel_providerkit/validation/test_validate.py @@ -1,16 +1,8 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import os -import sys -import typing as t -from pathlib import Path -from uuid import uuid4 - import pytest -import raillabel -sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent)) from raillabel_providerkit import validate # == Tests ============================ @@ -23,5 +15,4 @@ def test_onthology_errors(demo_onthology, invalid_onthology_scene): if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear", "-v"]) diff --git a/tests/test_raillabel_providerkit/validation/validate_empty_frame/test_validate_empty_frames.py b/tests/test_raillabel_providerkit/validation/validate_empty_frame/test_validate_empty_frames.py new file mode 100644 index 0000000..b0c5274 --- /dev/null +++ b/tests/test_raillabel_providerkit/validation/validate_empty_frame/test_validate_empty_frames.py @@ -0,0 +1,66 @@ +# Copyright DB Netz AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +import pytest +import raillabel + +from raillabel_providerkit.validation.validate_empty_frames.validate_empty_frames import ( + _is_frame_empty, + validate_empty_frames, +) + + +def test_is_frame_empty__true(): + frame = raillabel.format.Frame(uid=0, annotations={}) + assert _is_frame_empty(frame) + +def test_is_frame_empty__false(empty_annotation, empty_frame): + frame = empty_frame + frame.annotations["581b0df1-c4cf-4a97-828e-13dd740defe5"] = empty_annotation + + assert not _is_frame_empty(frame) + +def test_validate_empty_frames__no_error(default_frame, empty_scene): + scene = empty_scene + scene.frames = { + 0: default_frame, + 1: default_frame, + 2: default_frame, + } + + assert len(validate_empty_frames(scene)) == 0 + +def test_validate_empty_frames__one_error(default_frame, empty_frame, empty_scene): + scene = empty_scene + scene.frames = { + 0: default_frame, + 1: empty_frame, + 2: default_frame, + } + + assert len(validate_empty_frames(scene)) == 1 + +def test_validate_empty_frames__two_errors(default_frame, empty_frame, empty_scene): + scene = empty_scene + scene.frames = { + 0: empty_frame, + 1: default_frame, + 2: empty_frame, + } + + assert len(validate_empty_frames(scene)) == 2 + +def test_validate_empty_frames__error_message_contains_indentifying_info(empty_frame, empty_scene): + scene = empty_scene + scene.frames = { + 0: empty_frame, + } + + error_message = validate_empty_frames(scene)[0].lower() + assert "frame" in error_message + assert "0" in error_message + assert "empty" in error_message or "no annotations" in error_message + + +if __name__ == "__main__": + pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear", "-v"]) diff --git a/tests/test_raillabel_providerkit/validation/validate_onthology/test_onthology_schema_v1.py b/tests/test_raillabel_providerkit/validation/validate_onthology/test_onthology_schema_v1.py index 8d9ad12..adaf511 100644 --- a/tests/test_raillabel_providerkit/validation/validate_onthology/test_onthology_schema_v1.py +++ b/tests/test_raillabel_providerkit/validation/validate_onthology/test_onthology_schema_v1.py @@ -193,5 +193,4 @@ def test_sensor_type_attributes(validator): if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear", "-v"]) diff --git a/tests/test_raillabel_providerkit/validation/validate_onthology/test_validate_onthology.py b/tests/test_raillabel_providerkit/validation/validate_onthology/test_validate_onthology.py index 53baa7f..926a26d 100644 --- a/tests/test_raillabel_providerkit/validation/validate_onthology/test_validate_onthology.py +++ b/tests/test_raillabel_providerkit/validation/validate_onthology/test_validate_onthology.py @@ -1,16 +1,12 @@ # Copyright DB Netz AG and contributors # SPDX-License-Identifier: Apache-2.0 -import os -import sys import typing as t -from pathlib import Path from uuid import uuid4 import pytest import raillabel -sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent)) from raillabel_providerkit import exceptions from raillabel_providerkit.validation import validate_onthology @@ -730,5 +726,4 @@ def test_invalid_sensor_type_attributes_and_attributes(sensors, object_person): if __name__ == "__main__": - os.system("clear") pytest.main([__file__, "--disable-pytest-warnings", "--cache-clear", "-v"])