Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: migrate example models to tests/ and remove example extension … #39

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed asdf_pydantic/examples/__init__.py
Empty file.
19 changes: 0 additions & 19 deletions asdf_pydantic/examples/extensions.py

This file was deleted.

3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ Documentation = "https://asdf-pydantic.readthedocs.io"
Issues = "https://github.com/ketozhang/asdf-pydantic/issues"
Source = "https://github.com/ketozhang/asdf-pydantic"

[project.entry-points]
'asdf.extensions' = { asdf_pydantic_extension = 'asdf_pydantic.examples.extensions:get_extensions' }

[tool.hatch.version]
source = "vcs"

Expand Down
2 changes: 1 addition & 1 deletion tests/convert_to_asdf_yaml_tree_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from asdf_pydantic.examples.tree import AsdfTreeNode, Node
from tests.examples.tree import AsdfTreeNode, Node


def test_sanity():
Expand Down
11 changes: 0 additions & 11 deletions tests/entry_point_test.py

This file was deleted.

File renamed without changes.
9 changes: 2 additions & 7 deletions tests/examples/test_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
import yaml
from asdf.extension import Extension

from asdf_pydantic import AsdfPydanticConverter, AsdfPydanticModel


class AsdfRectangle(AsdfPydanticModel):
_tag = "asdf://asdf-pydantic/examples/tags/rectangle-1.0.0"
width: float
height: float
from asdf_pydantic import AsdfPydanticConverter
from tests.examples.shapes import AsdfRectangle


@pytest.fixture()
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/schema_validation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from asdf.extension import Extension

from asdf_pydantic import AsdfPydanticConverter
from asdf_pydantic.examples.shapes import AsdfRectangle
from asdf_pydantic.examples.tree import AsdfTreeNode
from tests.examples.shapes import AsdfRectangle
from tests.examples.tree import AsdfTreeNode


def setup_module():
Expand Down