diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 681fb42..7e4d9f1 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -58,7 +58,7 @@ jobs: path: dist/ - name: Install built package and test dependencies - run: uv sync --group dev && uv pip install --python .venv dist/schema2validataclass-*.whl --force-reinstall --no-deps + run: uv sync --group dev && uv pip install --python .venv dist/schema2classes-*.whl --force-reinstall --no-deps - name: Run unit tests run: uv run pytest diff --git a/.gitignore b/.gitignore index 84fdbe9..c7d3204 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,5 @@ /output /input -/src/schema2validataclass/_version.py +/src/schema2classes/_version.py /tests/test_schema/output diff --git a/LICENCE.txt b/LICENCE.txt index 90efae3..1a97790 100644 --- a/LICENCE.txt +++ b/LICENCE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 Ernesto Ruge +Copyright (c) 2026 binary butterfly GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 25c7b7e..cf63364 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# schema2validataclass +# schema2classes A Python code generator that transforms [JSON Schema](https://json-schema.org/) definitions into Python [`@validataclass`](https://github.com/binary-butterfly/validataclass)-decorated dataclasses, plain `@dataclass` classes, or [Pydantic](https://docs.pydantic.dev/) `BaseModel` classes, along with Enum classes. @@ -28,20 +28,20 @@ A Python code generator that transforms [JSON Schema](https://json-schema.org/) ## Installation ```bash -uv add schema2validataclass +uv add schema2classes ``` Or with pip: ```bash -pip install schema2validataclass +pip install schema2classes ``` ## Usage ```bash -schema2validataclass +schema2classes ``` **Arguments:** @@ -54,7 +54,7 @@ schema2validataclass **Example:** ```bash -schema2validataclass input/schema.json output/ +schema2classes input/schema.json output/ ``` This reads the schema, recursively resolves all `$ref` references to other schema files, and generates: @@ -160,7 +160,7 @@ detect_looping_references: false The generator can be configured via a YAML file passed with the `-c` / `--config` flag: ```bash -schema2validataclass input/schema.json output/ -c config.yaml +schema2classes input/schema.json output/ -c config.yaml ``` All options have sensible defaults and are optional. Example `config.yaml`: diff --git a/dev/run.py b/dev/run.py index b554fd0..fcd861f 100644 --- a/dev/run.py +++ b/dev/run.py @@ -3,54 +3,12 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -import logging import sys from pathlib import Path sys.path.append(str(Path(Path(__file__).parent.parent, 'src'))) # noqa: E402 -import argparse - -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config - - -def main(): - parser = argparse.ArgumentParser( - prog='schema to validataclass', - description='Transforms schema to validataclasses and Enums', - ) - - parser.add_argument( - 'schema_path', - type=Path, - help='Path to schema file', - ) - - parser.add_argument( - 'output_path', - type=Path, - help='Path to output directory', - ) - - parser.add_argument( - '-c', - '--config', - type=Path, - help='Path to YAML configuration file', - ) - - args = parser.parse_args() - - config = Config.from_yaml(args.config) if args.config else Config() - - logging.basicConfig(stream=sys.stdout, level=logging.INFO) - - app = App(config=config) - schema_uri = URI(file_path=args.schema_path) - app.generate(schema_uri, args.output_path) - +from schema2classes.scripts.schema2classes import main if __name__ == '__main__': main() diff --git a/pyproject.toml b/pyproject.toml index 4a5a41f..837599f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "schema2validataclass" +name = "schema2classes" dynamic = ["version"] authors = [ {name="Ernesto Ruge, binary butterfly GmbH", email="ernesto.ruge@binary-butterfly.de"}, @@ -35,9 +35,9 @@ dependencies = [ ] [project.urls] -Homepage = "https://github.com/datex2-tools/schema2validataclass" -Repository = "git@github.com:datex2-tools/schema2validataclass.git" -Issues = "https://github.com/datex2-tools/schema2validataclass/issues" +Homepage = "https://github.com/datex2-tools/schema2classes" +Repository = "git@github.com:datex2-tools/schema2classes.git" +Issues = "https://github.com/datex2-tools/schema2classes/issues" [dependency-groups] dev = [ @@ -57,7 +57,7 @@ build-backend = "hatchling.build" source = "vcs" [tool.hatch.build.targets.wheel] -packages = ["src/schema2validataclass"] +packages = ["src/schema2classes"] [tool.pytest.ini_options] addopts = "-ra --import-mode=importlib --cov-context=test --cov-report=" @@ -131,7 +131,7 @@ line-length = 120 # Don't require __init__.py files "INP", ] -"src/schema2validataclass/scripts/*" = [ +"src/schema2classes/scripts/*" = [ # Don't require __init__.py files "INP", ] diff --git a/src/schema2validataclass/__init__.py b/src/schema2classes/__init__.py similarity index 100% rename from src/schema2validataclass/__init__.py rename to src/schema2classes/__init__.py diff --git a/src/schema2validataclass/app.py b/src/schema2classes/app.py similarity index 93% rename from src/schema2validataclass/app.py rename to src/schema2classes/app.py index b6fd76d..eae2c32 100644 --- a/src/schema2validataclass/app.py +++ b/src/schema2classes/app.py @@ -10,21 +10,21 @@ from typing import Callable from urllib.request import urlopen -from schema2validataclass.common.helper import to_snake_case -from schema2validataclass.common.uri import URI, UriType -from schema2validataclass.config import Config, OutputFormat, PostProcessing -from schema2validataclass.generator.generator import Generator -from schema2validataclass.output.base_outputs import ( +from schema2classes.common.helper import to_snake_case +from schema2classes.common.uri import URI, UriType +from schema2classes.config import Config, OutputFormat, PostProcessing +from schema2classes.generator.generator import Generator +from schema2classes.output.base_outputs import ( BaseOutput, EnumBaseOutput, ListBaseOutput, NestedObjectBaseOutput, ObjectBaseOutput, ) -from schema2validataclass.output.dataclass_outputs import DATACLASS_OUTPUT_CLASSES, DataclassObjectOutput -from schema2validataclass.output.pydantic_outputs import PYDANTIC_OUTPUT_CLASSES, PydanticObjectOutput -from schema2validataclass.output.validataclass_outputs import VALIDATACLASS_OUTPUT_CLASSES, ValidataclassObjectOutput -from schema2validataclass.schema.models import Array, BaseField, Object, Reference, Schema, get_reference_uris +from schema2classes.output.dataclass_outputs import DATACLASS_OUTPUT_CLASSES, DataclassObjectOutput +from schema2classes.output.pydantic_outputs import PYDANTIC_OUTPUT_CLASSES, PydanticObjectOutput +from schema2classes.output.validataclass_outputs import VALIDATACLASS_OUTPUT_CLASSES, ValidataclassObjectOutput +from schema2classes.schema.models import Array, BaseField, Object, Reference, Schema, get_reference_uris logger = logging.getLogger(__name__) diff --git a/src/schema2validataclass/common/__init__.py b/src/schema2classes/common/__init__.py similarity index 100% rename from src/schema2validataclass/common/__init__.py rename to src/schema2classes/common/__init__.py diff --git a/src/schema2validataclass/common/helper.py b/src/schema2classes/common/helper.py similarity index 100% rename from src/schema2validataclass/common/helper.py rename to src/schema2classes/common/helper.py diff --git a/src/schema2validataclass/common/uri.py b/src/schema2classes/common/uri.py similarity index 100% rename from src/schema2validataclass/common/uri.py rename to src/schema2classes/common/uri.py diff --git a/src/schema2validataclass/config.py b/src/schema2classes/config.py similarity index 100% rename from src/schema2validataclass/config.py rename to src/schema2classes/config.py diff --git a/src/schema2validataclass/generator/__init__.py b/src/schema2classes/generator/__init__.py similarity index 100% rename from src/schema2validataclass/generator/__init__.py rename to src/schema2classes/generator/__init__.py diff --git a/src/schema2validataclass/generator/generator.py b/src/schema2classes/generator/generator.py similarity index 79% rename from src/schema2validataclass/generator/generator.py rename to src/schema2classes/generator/generator.py index b45a448..755f82c 100644 --- a/src/schema2validataclass/generator/generator.py +++ b/src/schema2classes/generator/generator.py @@ -5,13 +5,13 @@ from jinja2 import Environment, PackageLoader, select_autoescape -from schema2validataclass.config import Config, OutputFormat -from schema2validataclass.output.base_outputs import EnumBaseOutput, ObjectBaseOutput +from schema2classes.config import Config, OutputFormat +from schema2classes.output.base_outputs import EnumBaseOutput, ObjectBaseOutput class Generator: def __init__(self, config: Config): - self.env = Environment(loader=PackageLoader('schema2validataclass'), autoescape=select_autoescape()) + self.env = Environment(loader=PackageLoader('schema2classes'), autoescape=select_autoescape()) self.config = config def generate_init(self) -> str: diff --git a/src/schema2validataclass/output/__init__.py b/src/schema2classes/output/__init__.py similarity index 100% rename from src/schema2validataclass/output/__init__.py rename to src/schema2classes/output/__init__.py diff --git a/src/schema2validataclass/output/base_outputs.py b/src/schema2classes/output/base_outputs.py similarity index 98% rename from src/schema2validataclass/output/base_outputs.py rename to src/schema2classes/output/base_outputs.py index aa20f66..f25c442 100644 --- a/src/schema2validataclass/output/base_outputs.py +++ b/src/schema2classes/output/base_outputs.py @@ -9,10 +9,10 @@ from dataclasses import dataclass from typing import Any -from schema2validataclass.common.helper import get_class_name, get_enum_name -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config -from schema2validataclass.schema.models import ( +from schema2classes.common.helper import get_class_name, get_enum_name +from schema2classes.common.uri import URI +from schema2classes.config import Config +from schema2classes.schema.models import ( Array, BaseField, Boolean, diff --git a/src/schema2validataclass/output/dataclass_outputs.py b/src/schema2classes/output/dataclass_outputs.py similarity index 98% rename from src/schema2validataclass/output/dataclass_outputs.py rename to src/schema2classes/output/dataclass_outputs.py index 41338d8..007c09f 100644 --- a/src/schema2validataclass/output/dataclass_outputs.py +++ b/src/schema2classes/output/dataclass_outputs.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from typing import Any -from schema2validataclass.common.helper import to_snake_case +from schema2classes.common.helper import to_snake_case from .base_outputs import ( BooleanBaseOutput, diff --git a/src/schema2validataclass/output/outputs.py b/src/schema2classes/output/outputs.py similarity index 100% rename from src/schema2validataclass/output/outputs.py rename to src/schema2classes/output/outputs.py diff --git a/src/schema2validataclass/output/pydantic_outputs.py b/src/schema2classes/output/pydantic_outputs.py similarity index 99% rename from src/schema2validataclass/output/pydantic_outputs.py rename to src/schema2classes/output/pydantic_outputs.py index a69242c..359b6c7 100644 --- a/src/schema2validataclass/output/pydantic_outputs.py +++ b/src/schema2classes/output/pydantic_outputs.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from typing import Any -from schema2validataclass.common.helper import to_snake_case +from schema2classes.common.helper import to_snake_case from .base_outputs import ( BooleanBaseOutput, diff --git a/src/schema2validataclass/output/validataclass_outputs.py b/src/schema2classes/output/validataclass_outputs.py similarity index 97% rename from src/schema2validataclass/output/validataclass_outputs.py rename to src/schema2classes/output/validataclass_outputs.py index dfc6f20..079cbb1 100644 --- a/src/schema2validataclass/output/validataclass_outputs.py +++ b/src/schema2classes/output/validataclass_outputs.py @@ -8,8 +8,8 @@ from dataclasses import dataclass from typing import Any -from schema2validataclass.common.helper import to_snake_case -from schema2validataclass.config import Config, UnsetValueOutput +from schema2classes.common.helper import to_snake_case +from schema2classes.config import Config, UnsetValueOutput from .base_outputs import ( BooleanBaseOutput, diff --git a/src/schema2validataclass/schema/__init__.py b/src/schema2classes/schema/__init__.py similarity index 100% rename from src/schema2validataclass/schema/__init__.py rename to src/schema2classes/schema/__init__.py diff --git a/src/schema2validataclass/schema/models.py b/src/schema2classes/schema/models.py similarity index 99% rename from src/schema2validataclass/schema/models.py rename to src/schema2classes/schema/models.py index e92ac4d..02e76b4 100644 --- a/src/schema2validataclass/schema/models.py +++ b/src/schema2classes/schema/models.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from typing import Any -from schema2validataclass.common.uri import URI +from schema2classes.common.uri import URI @dataclass(kw_only=True, init=False) diff --git a/src/schema2validataclass/scripts/schema2validataclass.py b/src/schema2classes/scripts/schema2classes.py similarity index 89% rename from src/schema2validataclass/scripts/schema2validataclass.py rename to src/schema2classes/scripts/schema2classes.py index 96bb304..df97a95 100644 --- a/src/schema2validataclass/scripts/schema2validataclass.py +++ b/src/schema2classes/scripts/schema2classes.py @@ -10,9 +10,9 @@ import argparse -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config def main(): diff --git a/src/schema2validataclass/templates/dataclass.jinja2 b/src/schema2classes/templates/dataclass.jinja2 similarity index 100% rename from src/schema2validataclass/templates/dataclass.jinja2 rename to src/schema2classes/templates/dataclass.jinja2 diff --git a/src/schema2validataclass/templates/enum.jinja2 b/src/schema2classes/templates/enum.jinja2 similarity index 100% rename from src/schema2validataclass/templates/enum.jinja2 rename to src/schema2classes/templates/enum.jinja2 diff --git a/src/schema2validataclass/templates/init.jinja2 b/src/schema2classes/templates/init.jinja2 similarity index 100% rename from src/schema2validataclass/templates/init.jinja2 rename to src/schema2classes/templates/init.jinja2 diff --git a/src/schema2validataclass/templates/pydantic.jinja2 b/src/schema2classes/templates/pydantic.jinja2 similarity index 100% rename from src/schema2validataclass/templates/pydantic.jinja2 rename to src/schema2classes/templates/pydantic.jinja2 diff --git a/src/schema2validataclass/templates/validataclass.jinja2 b/src/schema2classes/templates/validataclass.jinja2 similarity index 100% rename from src/schema2validataclass/templates/validataclass.jinja2 rename to src/schema2classes/templates/validataclass.jinja2 diff --git a/tests/integration/dataclass/chained_schemas_ignore_test.py b/tests/integration/dataclass/chained_schemas_ignore_test.py index 33c5c03..e585044 100644 --- a/tests/integration/dataclass/chained_schemas_ignore_test.py +++ b/tests/integration/dataclass/chained_schemas_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.dataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_ignore' / 'main_schema.json' diff --git a/tests/integration/dataclass/chained_schemas_list_ignore_test.py b/tests/integration/dataclass/chained_schemas_list_ignore_test.py index 76b25a3..3506b17 100644 --- a/tests/integration/dataclass/chained_schemas_list_ignore_test.py +++ b/tests/integration/dataclass/chained_schemas_list_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.dataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_list_ignore' / 'main_schema.json' diff --git a/tests/integration/dataclass/helpers.py b/tests/integration/dataclass/helpers.py index 131bb70..93ed6a9 100644 --- a/tests/integration/dataclass/helpers.py +++ b/tests/integration/dataclass/helpers.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat INPUT_DIR = Path(__file__).resolve().parent.parent.parent / 'test_schema' / 'input' diff --git a/tests/integration/dataclass/renamed_properties_test.py b/tests/integration/dataclass/renamed_properties_test.py index 6fb74f7..286944e 100644 --- a/tests/integration/dataclass/renamed_properties_test.py +++ b/tests/integration/dataclass/renamed_properties_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.dataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'renamed_properties.json' diff --git a/tests/integration/pydantic/chained_schemas_ignore_test.py b/tests/integration/pydantic/chained_schemas_ignore_test.py index 7e256e1..fb953c1 100644 --- a/tests/integration/pydantic/chained_schemas_ignore_test.py +++ b/tests/integration/pydantic/chained_schemas_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.pydantic.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_ignore' / 'main_schema.json' diff --git a/tests/integration/pydantic/chained_schemas_list_ignore_test.py b/tests/integration/pydantic/chained_schemas_list_ignore_test.py index f261aa4..229e68a 100644 --- a/tests/integration/pydantic/chained_schemas_list_ignore_test.py +++ b/tests/integration/pydantic/chained_schemas_list_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.pydantic.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_list_ignore' / 'main_schema.json' diff --git a/tests/integration/pydantic/helpers.py b/tests/integration/pydantic/helpers.py index 54a8144..3068479 100644 --- a/tests/integration/pydantic/helpers.py +++ b/tests/integration/pydantic/helpers.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat INPUT_DIR = Path(__file__).resolve().parent.parent.parent / 'test_schema' / 'input' diff --git a/tests/integration/pydantic/renamed_properties_test.py b/tests/integration/pydantic/renamed_properties_test.py index 4706860..8aec1ab 100644 --- a/tests/integration/pydantic/renamed_properties_test.py +++ b/tests/integration/pydantic/renamed_properties_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config, OutputFormat +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config, OutputFormat from tests.integration.pydantic.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'renamed_properties.json' diff --git a/tests/integration/validataclass/chained_schemas_ignore_test.py b/tests/integration/validataclass/chained_schemas_ignore_test.py index 83431bf..4ee70f0 100644 --- a/tests/integration/validataclass/chained_schemas_ignore_test.py +++ b/tests/integration/validataclass/chained_schemas_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config from tests.integration.validataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_ignore' / 'main_schema.json' diff --git a/tests/integration/validataclass/chained_schemas_list_ignore_test.py b/tests/integration/validataclass/chained_schemas_list_ignore_test.py index eb5f017..b5b2857 100644 --- a/tests/integration/validataclass/chained_schemas_list_ignore_test.py +++ b/tests/integration/validataclass/chained_schemas_list_ignore_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config from tests.integration.validataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'chained_schemas_list_ignore' / 'main_schema.json' diff --git a/tests/integration/validataclass/helpers.py b/tests/integration/validataclass/helpers.py index ce37a9e..d155ef8 100644 --- a/tests/integration/validataclass/helpers.py +++ b/tests/integration/validataclass/helpers.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config INPUT_DIR = Path(__file__).resolve().parent.parent.parent / 'test_schema' / 'input' diff --git a/tests/integration/validataclass/renamed_properties_test.py b/tests/integration/validataclass/renamed_properties_test.py index 163f5af..0cc0dc5 100644 --- a/tests/integration/validataclass/renamed_properties_test.py +++ b/tests/integration/validataclass/renamed_properties_test.py @@ -5,9 +5,9 @@ from pathlib import Path -from schema2validataclass import App -from schema2validataclass.common.uri import URI -from schema2validataclass.config import Config +from schema2classes import App +from schema2classes.common.uri import URI +from schema2classes.config import Config from tests.integration.validataclass.helpers import INPUT_DIR, generated_files SCHEMA_PATH = INPUT_DIR / 'renamed_properties.json' diff --git a/tests/unit/array_test.py b/tests/unit/array_test.py index 6a31aec..cada791 100644 --- a/tests/unit/array_test.py +++ b/tests/unit/array_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Array, Boolean, Enum, Integer, Number, Object, Reference, String +from schema2classes.schema.models import Array, Boolean, Enum, Integer, Number, Object, Reference, String from tests.unit.helpers import make_uri diff --git a/tests/unit/base_field_test.py b/tests/unit/base_field_test.py index 1093e7d..499b349 100644 --- a/tests/unit/base_field_test.py +++ b/tests/unit/base_field_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import BaseField +from schema2classes.schema.models import BaseField from tests.unit.helpers import make_uri diff --git a/tests/unit/boolean_test.py b/tests/unit/boolean_test.py index 3ffb549..983f92e 100644 --- a/tests/unit/boolean_test.py +++ b/tests/unit/boolean_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Boolean +from schema2classes.schema.models import Boolean from tests.unit.helpers import make_uri diff --git a/tests/unit/enum_test.py b/tests/unit/enum_test.py index 93271b5..58fb700 100644 --- a/tests/unit/enum_test.py +++ b/tests/unit/enum_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Enum +from schema2classes.schema.models import Enum from tests.unit.helpers import make_uri diff --git a/tests/unit/get_reference_base_uris_test.py b/tests/unit/get_reference_base_uris_test.py index c6db9f2..c613136 100644 --- a/tests/unit/get_reference_base_uris_test.py +++ b/tests/unit/get_reference_base_uris_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Array, Integer, Object, Reference, String, get_reference_uris +from schema2classes.schema.models import Array, Integer, Object, Reference, String, get_reference_uris from tests.unit.helpers import make_uri diff --git a/tests/unit/helpers.py b/tests/unit/helpers.py index aa06309..fe5ae13 100644 --- a/tests/unit/helpers.py +++ b/tests/unit/helpers.py @@ -5,7 +5,7 @@ from pathlib import Path -from schema2validataclass.common.uri import URI +from schema2classes.common.uri import URI def make_uri(**kwargs) -> URI: diff --git a/tests/unit/integer_test.py b/tests/unit/integer_test.py index 3d3253b..81bbd6d 100644 --- a/tests/unit/integer_test.py +++ b/tests/unit/integer_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Integer +from schema2classes.schema.models import Integer from tests.unit.helpers import make_uri diff --git a/tests/unit/number_test.py b/tests/unit/number_test.py index a211d38..6091b88 100644 --- a/tests/unit/number_test.py +++ b/tests/unit/number_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Number +from schema2classes.schema.models import Number from tests.unit.helpers import make_uri diff --git a/tests/unit/object_get_objects_test.py b/tests/unit/object_get_objects_test.py index 2c49828..1954a91 100644 --- a/tests/unit/object_get_objects_test.py +++ b/tests/unit/object_get_objects_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Object +from schema2classes.schema.models import Object from tests.unit.helpers import make_uri diff --git a/tests/unit/object_get_reference_base_uris_test.py b/tests/unit/object_get_reference_base_uris_test.py index b31338c..cb65c8c 100644 --- a/tests/unit/object_get_reference_base_uris_test.py +++ b/tests/unit/object_get_reference_base_uris_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Object +from schema2classes.schema.models import Object from tests.unit.helpers import make_uri diff --git a/tests/unit/object_test.py b/tests/unit/object_test.py index 9d2cc73..d521f96 100644 --- a/tests/unit/object_test.py +++ b/tests/unit/object_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Array, Boolean, Enum, Integer, Object, Reference, String +from schema2classes.schema.models import Array, Boolean, Enum, Integer, Object, Reference, String from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_array_test.py b/tests/unit/parse_schema_array_test.py index dfa826f..5a2483c 100644 --- a/tests/unit/parse_schema_array_test.py +++ b/tests/unit/parse_schema_array_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Array, parse_schema +from schema2classes.schema.models import Array, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_boolean_test.py b/tests/unit/parse_schema_boolean_test.py index ab59b3a..e966a1d 100644 --- a/tests/unit/parse_schema_boolean_test.py +++ b/tests/unit/parse_schema_boolean_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Boolean, parse_schema +from schema2classes.schema.models import Boolean, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_enum_test.py b/tests/unit/parse_schema_enum_test.py index a6c56fa..a019e76 100644 --- a/tests/unit/parse_schema_enum_test.py +++ b/tests/unit/parse_schema_enum_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Enum, parse_schema +from schema2classes.schema.models import Enum, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_integer_test.py b/tests/unit/parse_schema_integer_test.py index f89aa5d..5be7b3f 100644 --- a/tests/unit/parse_schema_integer_test.py +++ b/tests/unit/parse_schema_integer_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Integer, parse_schema +from schema2classes.schema.models import Integer, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_number_test.py b/tests/unit/parse_schema_number_test.py index 5c9554c..3a5d121 100644 --- a/tests/unit/parse_schema_number_test.py +++ b/tests/unit/parse_schema_number_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Number, parse_schema +from schema2classes.schema.models import Number, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_object_test.py b/tests/unit/parse_schema_object_test.py index 2c9c87c..4661a9b 100644 --- a/tests/unit/parse_schema_object_test.py +++ b/tests/unit/parse_schema_object_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Object, parse_schema +from schema2classes.schema.models import Object, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_reference_test.py b/tests/unit/parse_schema_reference_test.py index 549b1b8..b61b336 100644 --- a/tests/unit/parse_schema_reference_test.py +++ b/tests/unit/parse_schema_reference_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Reference, parse_schema +from schema2classes.schema.models import Reference, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_required_test.py b/tests/unit/parse_schema_required_test.py index 0812e8f..0a2a6f9 100644 --- a/tests/unit/parse_schema_required_test.py +++ b/tests/unit/parse_schema_required_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import parse_schema +from schema2classes.schema.models import parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_string_test.py b/tests/unit/parse_schema_string_test.py index f87d342..7d913dc 100644 --- a/tests/unit/parse_schema_string_test.py +++ b/tests/unit/parse_schema_string_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import String, parse_schema +from schema2classes.schema.models import String, parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/parse_schema_unsupported_test.py b/tests/unit/parse_schema_unsupported_test.py index 1b007d1..6fe4356 100644 --- a/tests/unit/parse_schema_unsupported_test.py +++ b/tests/unit/parse_schema_unsupported_test.py @@ -5,7 +5,7 @@ import pytest -from schema2validataclass.schema.models import parse_schema +from schema2classes.schema.models import parse_schema from tests.unit.helpers import make_uri diff --git a/tests/unit/reference_test.py b/tests/unit/reference_test.py index a19b5e2..e42be1c 100644 --- a/tests/unit/reference_test.py +++ b/tests/unit/reference_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Reference +from schema2classes.schema.models import Reference from tests.unit.helpers import make_uri diff --git a/tests/unit/schema_definitions_test.py b/tests/unit/schema_definitions_test.py index db6eaa6..052f242 100644 --- a/tests/unit/schema_definitions_test.py +++ b/tests/unit/schema_definitions_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Enum, Integer, Object, Reference, Schema, String +from schema2classes.schema.models import Enum, Integer, Object, Reference, Schema, String from tests.unit.helpers import make_uri diff --git a/tests/unit/schema_get_reference_base_uris_test.py b/tests/unit/schema_get_reference_base_uris_test.py index c6519d7..4df6183 100644 --- a/tests/unit/schema_get_reference_base_uris_test.py +++ b/tests/unit/schema_get_reference_base_uris_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Schema +from schema2classes.schema.models import Schema from tests.unit.helpers import make_uri diff --git a/tests/unit/schema_with_object_test.py b/tests/unit/schema_with_object_test.py index 23c0bf3..a9ee7fc 100644 --- a/tests/unit/schema_with_object_test.py +++ b/tests/unit/schema_with_object_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Object, Schema, String +from schema2classes.schema.models import Object, Schema, String from tests.unit.helpers import make_uri diff --git a/tests/unit/schema_without_object_test.py b/tests/unit/schema_without_object_test.py index fad02c9..5308780 100644 --- a/tests/unit/schema_without_object_test.py +++ b/tests/unit/schema_without_object_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import Schema +from schema2classes.schema.models import Schema from tests.unit.helpers import make_uri diff --git a/tests/unit/string_test.py b/tests/unit/string_test.py index c2494e9..2f1bfd2 100644 --- a/tests/unit/string_test.py +++ b/tests/unit/string_test.py @@ -3,7 +3,7 @@ Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ -from schema2validataclass.schema.models import String +from schema2classes.schema.models import String from tests.unit.helpers import make_uri diff --git a/uv.lock b/uv.lock index fc2ab2a..191e53a 100644 --- a/uv.lock +++ b/uv.lock @@ -308,7 +308,7 @@ wheels = [ ] [[package]] -name = "schema2validataclass" +name = "schema2classes" source = { editable = "." } dependencies = [ { name = "jinja2" },