-
Notifications
You must be signed in to change notification settings - Fork 22
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 an API to access as much original metadata as possible #7
Comments
if we store a dictionary in |
As already noted in #4 (comment), the xarray accessor would be present in every dataset, not only those opened through xarray-sentinel. Nonetheless I believe an accessor-like interface gives the best user experience, could we just attach a (python) attribute to the dataset? You would lose it if you dump the dataset to a netCDF (or any other format), but I think all the other options would do the same. |
I agree, the accessor is the only way to go. Especially if we want to support specialised exploration APIs that perform possibly slow operations (for example when data is over the network). |
Mmm... we were probably not talking about the same thing, By "accessor-like interface" I meant something that acts as an accessor (you just call e.g. |
I just tried. You cannot add a new attribute to a Looks like the accessor API is the only way to extend xarray objects. |
Thinking more about the accessor-interface I'm now of the opinion that there's no clean way to add the exploration API to the For what it is worth, my suggestion is to go with option 3 above:
|
Within xarray there is no easy way to expose the full XML metadata in the files inside the
annotation
folder.Options:
.attrs
that contain the return value ofxmlschema.XMLSchema(schema_path).to_dict(annotation_path)
[BUT, such objects cannot be saved as netCDF]xarray_sentinel
Note that the I didn't find any XSD for the
manifest.safe
, so we may need to keep to option to return anElementTree
representation of the XML.The text was updated successfully, but these errors were encountered: