From 83b273bd74dd1dbe3dc45460d208ab57c22bf5cf Mon Sep 17 00:00:00 2001 From: Tobias Klockau Date: Fri, 20 Oct 2023 12:06:46 +0200 Subject: [PATCH] refactor!: move raillabel schema --- .../validate_schema => format}/raillabel_schema.json | 0 .../validate_schema => format}/raillabel_schema.json.license | 0 raillabel_providerkit/format/understand_ai/metadata.py | 5 +---- tests/conftest.py | 2 +- .../validate_schema => format}/test_raillabel_v2_schema.py | 0 5 files changed, 2 insertions(+), 5 deletions(-) rename raillabel_providerkit/{validation/validate_schema => format}/raillabel_schema.json (100%) rename raillabel_providerkit/{validation/validate_schema => format}/raillabel_schema.json.license (100%) rename tests/test_raillabel_providerkit/{validation/validate_schema => format}/test_raillabel_v2_schema.py (100%) diff --git a/raillabel_providerkit/validation/validate_schema/raillabel_schema.json b/raillabel_providerkit/format/raillabel_schema.json similarity index 100% rename from raillabel_providerkit/validation/validate_schema/raillabel_schema.json rename to raillabel_providerkit/format/raillabel_schema.json diff --git a/raillabel_providerkit/validation/validate_schema/raillabel_schema.json.license b/raillabel_providerkit/format/raillabel_schema.json.license similarity index 100% rename from raillabel_providerkit/validation/validate_schema/raillabel_schema.json.license rename to raillabel_providerkit/format/raillabel_schema.json.license diff --git a/raillabel_providerkit/format/understand_ai/metadata.py b/raillabel_providerkit/format/understand_ai/metadata.py index b049237..59b954e 100644 --- a/raillabel_providerkit/format/understand_ai/metadata.py +++ b/raillabel_providerkit/format/understand_ai/metadata.py @@ -82,10 +82,7 @@ def to_raillabel(self) -> dict: def _get_subschema_version(self) -> str: RAILLABEL_SCHEMA_PATH = ( - Path(__file__).parent.parent.parent - / "validation" - / "validate_schema" - / "raillabel_schema.json" + Path(__file__).parent.parent.parent / "format" / "raillabel_schema.json" ) with RAILLABEL_SCHEMA_PATH.open() as schema_file: diff --git a/tests/conftest.py b/tests/conftest.py index 935c63d..f2f58e4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,7 +13,7 @@ json_data_directories = [ Path(__file__).parent / "__test_assets__", - Path(__file__).parent.parent / "raillabel_providerkit" / "validation" / "validate_schema" + Path(__file__).parent.parent / "raillabel_providerkit" / "format" ] @pytest.fixture diff --git a/tests/test_raillabel_providerkit/validation/validate_schema/test_raillabel_v2_schema.py b/tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py similarity index 100% rename from tests/test_raillabel_providerkit/validation/validate_schema/test_raillabel_v2_schema.py rename to tests/test_raillabel_providerkit/format/test_raillabel_v2_schema.py