-
Notifications
You must be signed in to change notification settings - Fork 126
Support item_assets extension's AssetDefinition in raster extension #1110
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
Support item_assets extension's AssetDefinition in raster extension #1110
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #1110 +/- ##
==========================================
- Coverage 90.33% 90.33% -0.01%
==========================================
Files 48 48
Lines 6323 6343 +20
Branches 943 944 +1
==========================================
+ Hits 5712 5730 +18
- Misses 429 431 +2
Partials 182 182
☔ View full report in Codecov by Sentry. |
|
After in-person discussion, I'll be adding an owner field to the asset definition. Regularizing |
I'm probably more of a -0 than -1 on this idea ... I could be on board with trying to share behavior between the two, but I worry about over-abstracting what is really a pretty simple data structure. |
Yeah, that tracks. It's easy to enrich asset definitions, so it's not a huge problem. Many extension specs are written with |
df4a379 to
56bbec0
Compare
gadomski
left a comment
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.
Needs CHANGELOG entry, otherwise LGTM.
8937781 to
d9fd08e
Compare
|
This is ready for merge when tests pass. |
f861b49 to
8751c94
Compare
8751c94 to
6f22014
Compare
Related Issue(s):
Description:
There is a missing compliance in the raster extension vis-a-vis the item asset extension. It is permissible by the raster extension spec to tuck
raster_bandsinformation into theitem_assetsblock on a collection. Raster appears not to support this. In the interest of creating a relatively uniform strategy to query information in collection assets, we may be interested in elevating the item_assets'AssetDefinitionto first class status with respect to the raster extension. This PR proposes a change to make that happen.This connects to the classification extension work because that extension can use the same mechanism.
Notes:
pystac.extensions.item_assets.AssetDefinitionis defined nearly identically topystac.Asset, with the difference that the former disallows thehreffield, while the latter requires it. If we could find a smart way to defineAssetDefinitionas a subclass ofAsset, we could possibly entirely eliminate the need for this PR.AssetDefinitionhas no notion of an owner, so it's not currently possible to validate that the collection hosting the asset definition has the raster extension registered with it. We may want to add an owner to this class to improve its expressivity. Again, this would be obviated by proposal in the above comment.PR Checklist:
pre-commithooks pass locallyscripts/test)