Skip to content

Commit

Permalink
(feature): remove the deprecated Context Extension
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Apr 4, 2024
1 parent c03272e commit 93cc433
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 120 deletions.
35 changes: 0 additions & 35 deletions stac_pydantic/api/extensions/context.py

This file was deleted.

4 changes: 0 additions & 4 deletions stac_pydantic/api/item_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from pydantic import model_validator

from stac_pydantic.api.extensions.context import ContextExtension
from stac_pydantic.api.item import Item
from stac_pydantic.api.links import Links
from stac_pydantic.item_collection import ItemCollection as BaseItemCollection
Expand All @@ -21,9 +20,6 @@ class ItemCollection(BaseItemCollection):
numberMatched: Optional[int] = None
numberReturned: Optional[int] = None

# Context Extension
context: Optional[ContextExtension] = None

@model_validator(mode="after")
def required_links(self) -> "ItemCollection":
if self.links:
Expand Down
75 changes: 0 additions & 75 deletions tests/api/extensions/test_context.py

This file was deleted.

6 changes: 0 additions & 6 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from shapely.geometry import shape

from stac_pydantic import Collection, Item, ItemProperties
from stac_pydantic.api.extensions.context import ContextExtension
from stac_pydantic.extensions import validate_extensions
from stac_pydantic.links import Link, Links
from stac_pydantic.shared import MimeTypes
Expand Down Expand Up @@ -161,11 +160,6 @@ def test_geo_interface() -> None:
Item(**test_item)


def test_api_context_extension() -> None:
context = {"returned": 10, "limit": 10, "matched": 100}
ContextExtension(**context)


def test_declared_model() -> None:
class TestProperties(ItemProperties):
foo: str
Expand Down

0 comments on commit 93cc433

Please sign in to comment.