question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an API to access as much original metadata as possible

See original GitHub issue

Within xarray there is no easy way to expose the full XML metadata in the files inside the annotation folder.

Options:

  • add an entries into .attrs that contain the return value of xmlschema.XMLSchema(schema_path).to_dict(annotation_path) [BUT, such objects cannot be saved as netCDF]
  • add an xarray accessor with a metadata exploration API
  • provide metadata exploration API functions in 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 an ElementTree representation of the XML.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aurghscommented, Apr 21, 2021
  • add an entries into .attrs that contain the return value of xmlschema.XMLSchema(schema_path).to_dict(annotation_path)

if we store a dictionary in .attrs the data will be not serializable into a netCDF.

0reactions
alexamicicommented, May 3, 2021

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 Dataset object because it is not the right place for it.

For what it is worth, my suggestion is to go with option 3 above:

provide metadata exploration API functions in xarray_sentinel

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use an API: Just the Basics 2022 | TechnologyAdvice
Ever wonder what an API is or how to use one? APIs allow one program to request data from another. Learn more about...
Read more >
Data Access API — Dataverse.org
The “download by dataset” API downloads as many files as possible from a ... To download the original files (Stata, for example), add...
Read more >
Metadata API · Apiary
This API allows READ and UPDATE access to asset-level metadata for Socrata assets, including asset titles, descriptions, tags, categories, and more (see " ......
Read more >
Metadata API Developer Guide
You can move metadata with one of two ways. The first method is with Metadata API deploy() and retrieve() calls. Admins often use...
Read more >
Metadata Types | Metadata API Developer Guide
Metadata API enables you to access some entities and feature settings that you can customize in the user interface.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found