Skip to content
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

Add extra_fields to extensions.item_assets.AssetDefinition #855

Closed
duckontheweb opened this issue Jul 25, 2022 · 1 comment · Fixed by #1003
Closed

Add extra_fields to extensions.item_assets.AssetDefinition #855

duckontheweb opened this issue Jul 25, 2022 · 1 comment · Fixed by #1003
Assignees
Milestone

Comments

@duckontheweb
Copy link
Contributor

The Item Assets Definition Extension states:

Other custom fields, or fields from other extensions may also be included in the Asset object.

However, there is not currently a Pythonic way to do this in PySTAC. The AssetDefinition.create and AssetDefinition.apply methods only accept title, description, media_type and roles arguments, so the only way to add something like a raster:bands field to the Asset Definition is by initializing it with a dictionary that includes that property.

It seems like it would be helpful to have an extra_fields argument to both create and apply that allows additional properties to be passed in.

@m-mohr
Copy link
Contributor

m-mohr commented Jul 25, 2022

Oh yes, this was very confusing at the beginning and makes the code structure a bit weird. +1 on this one for sure.

@duckontheweb duckontheweb added this to the 1.7 milestone Aug 3, 2022
@gadomski gadomski self-assigned this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants