Skip to content

Commit

Permalink
feat!: migrate example models to tests/ and remove example extension …
Browse files Browse the repository at this point in the history
…from package (#39)
  • Loading branch information
ketozhang authored Nov 17, 2024
1 parent 5cbeb18 commit 28a01b5
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 43 deletions.
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

0 comments on commit 28a01b5

Please sign in to comment.