Skip to content

update storage extension to v2.0.0 #1561

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
media type value for these types and new media types COPC and VND_PMTILES
([#1554](https://github.com/stac-utils/pystac/pull/1554))

### Changed

- Updated storage extension to v2.0.0

### Fixed

- More permissive collection extent deserialization ([#1559](https://github.com/stac-utils/pystac/pull/1559))
Expand Down
3 changes: 2 additions & 1 deletion docs/api/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pystac.extensions
sar.SarExtension
sat.SatExtension
scientific.ScientificExtension
storage.StorageExtension
storage.StorageSchemesExtension
storage.StorageRefsExtension
table.TableExtension
timestamps.TimestampsExtension
version.VersionExtension
Expand Down
24 changes: 18 additions & 6 deletions pystac/extensions/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from pystac.extensions.sar import SarExtension
from pystac.extensions.sat import SatExtension
from pystac.extensions.scientific import ScientificExtension
from pystac.extensions.storage import StorageExtension
from pystac.extensions.storage import StorageRefsExtension, StorageSchemesExtension
from pystac.extensions.table import TableExtension
from pystac.extensions.timestamps import TimestampsExtension
from pystac.extensions.version import BaseVersionExtension, VersionExtension
Expand Down Expand Up @@ -85,7 +85,7 @@
SarExtension.name: SarExtension,
SatExtension.name: SatExtension,
ScientificExtension.name: ScientificExtension,
StorageExtension.name: StorageExtension,
StorageSchemesExtension.name: StorageSchemesExtension,
TableExtension.name: TableExtension,
TimestampsExtension.name: TimestampsExtension,
VersionExtension.name: VersionExtension,
Expand Down Expand Up @@ -172,6 +172,10 @@ def render(self) -> dict[str, Render]:
def sci(self) -> ScientificExtension[Collection]:
return ScientificExtension.ext(self.stac_object)

@property
def storage(self) -> StorageSchemesExtension[Collection]:
return StorageSchemesExtension.ext(self.stac_object)

@property
def table(self) -> TableExtension[Collection]:
return TableExtension.ext(self.stac_object)
Expand Down Expand Up @@ -265,8 +269,8 @@ def sci(self) -> ScientificExtension[Item]:
return ScientificExtension.ext(self.stac_object)

@property
def storage(self) -> StorageExtension[Item]:
return StorageExtension.ext(self.stac_object)
def storage(self) -> StorageSchemesExtension[Item]:
return StorageSchemesExtension.ext(self.stac_object)

@property
def table(self) -> TableExtension[Item]:
Expand Down Expand Up @@ -376,8 +380,8 @@ def sat(self) -> SatExtension[U]:
return SatExtension.ext(self.stac_object)

@property
def storage(self) -> StorageExtension[U]:
return StorageExtension.ext(self.stac_object)
def storage(self) -> StorageRefsExtension[U]:
return StorageRefsExtension.ext(self.stac_object)

@property
def table(self) -> TableExtension[U]:
Expand Down Expand Up @@ -432,6 +436,10 @@ class ItemAssetExt(_AssetExt[ItemAssetDefinition]):
def mlm(self) -> MLMExtension[ItemAssetDefinition]:
return MLMExtension.ext(self.stac_object)

@property
def storage(self) -> StorageRefsExtension[ItemAssetDefinition]:
return StorageRefsExtension.ext(self.stac_object)


@dataclass
class LinkExt(_AssetsExt[Link]):
Expand All @@ -444,3 +452,7 @@ class LinkExt(_AssetsExt[Link]):
@property
def file(self) -> FileExtension[Link]:
return FileExtension.ext(self.stac_object)

@property
def storage(self) -> StorageRefsExtension[Link]:
return StorageRefsExtension.ext(self.stac_object)
Loading
Loading