Add extensible support for handle systems and metadata #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for a new API for handles, adds support for metadata extraction in 3000+ formats, and refactors the API. Documentation will follow, but the following examples can be of use already.
Get metadata from resource
The following metadata standards are available:
The citation option can be used to get styled citations (see all 3000 styles at CLS website: https://editor.citationstyles.org/searchByName/).
Metadata without resolving service
It is also possible to resolve the metadata before you actually resolve the service. See this example:
The type of the resource is a DOI (but can also be a Handle or ArXiv)
Returns a
<datahugger.services.DataverseDataset at 0x106693d60>
class.Metadata without resolving
The benefit of this pipeline it that you can extract metadata while the identifier is not supported by datahugger. For example:
While datahugger.get() raises for the given resource:
Records without metadata
The metadata is retrieved via the DOI handle system, this means that some URLs don't have metadata because the corresponding DOI is not known. We are working on improvements on this, but this can be a challenging problem. The advice is to use datahugger always with DOI if available. Example error when no metadata is available:
You can easily catch this error in software integrations.