-
Notifications
You must be signed in to change notification settings - Fork 2
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
fixes to CMIP6 Properties model to allow serialize #22
Conversation
@@ -118,7 +132,7 @@ def apply(self, attrs: Dict[str, Any]) -> None: | |||
variables : Dictionary mapping variable name to a :class:`Variable` | |||
object. | |||
""" | |||
self.properties.update(**Properties(**attrs).model_dump_json()) | |||
self.properties.update(**Properties(**attrs).model_dump()) |
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.
This one could be a problem, because the json serializer from pystac does not know how to serialize some of the content.
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.
The extensions/cmip6.py is still in development and not used yet in the ingestion mechanism. If you call the populator, it's the code in add_CMIP6.py that's exercised.
@huard @Nazim-crim @dchandan IMO, Preferably, the Finally, I think that we should improve how the populator is called from the command line. |
Totally agree. I started to move things around to differentiate generic functionality from CMIP6 specific features, but didn't want to disrupt things too much without Deepak's input. The arch-changes branch is kind of a sandbox for now. |
I've updated my test notebook: https://github.com/crim-ca/ncml2stac/blob/main/notebooks/ncml2stac.ipynb I would like to transfer over the "data attribute shuffling" portion to this repository (under https://github.com/crim-ca/stac-populator/blob/arch-changes/STACpopulator/extensions/cmip6.py), so I don't do them myself. Once this is all working, it is easy to deploy this operation directly in weaver via the notebook! |
I have the feeling all the data attribute shuffling you're doing is already implemented when combining the cmip6 and datacube extensions, maybe with minor adjustments. I'll finish up and post a STAC item here so we can make those final adjustments. |
|
@huard edit |
used/tested by crim-ca/weaver#567
@huard based on top of your modifications, a few patches I needed to apply to make the CMIP6 properties work