-
Notifications
You must be signed in to change notification settings - Fork 123
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
base: main
Are you sure you want to change the base?
update storage extension to v2.0.0 #1561
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1561 +/- ##
==========================================
+ Coverage 92.43% 92.57% +0.13%
==========================================
Files 55 55
Lines 8371 8456 +85
Branches 964 972 +8
==========================================
+ Hits 7738 7828 +90
+ Misses 449 445 -4
+ Partials 184 183 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have unnecessary new extensions here ... both schemes and refs can just be classes, not extensions themselves?
.. code-block:: python | ||
|
||
>>> item: pystac.Item = ... | ||
>>> storage_ext = StorageSchemesExtension.ext(item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually only have on "entrypoint" per extension ... in this case, it would be StorageExtension
. Storage schemes should be an attribute of that extension.
class StorageRefsExtension( | ||
_StorageExtension, | ||
Generic[U], | ||
PropertiesExtension, | ||
ExtensionManagementMixin[pystac.Item | pystac.Collection | pystac.Catalog], | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I don't know if we need StorageRefsExtesion
... we probably just need a StorageRefs
class.
Description:
Updates storage extension to v2.0.0. Due to the major changes in v2, I have not attempted to make migrations from v1 to v2
StorageScheme platform property allows templated uri's, so arbitrary additional properties are allowed to be set on StorageScheme objects
PR Checklist:
pre-commit run --all-files
)pytest
)