Closed broeder-j closed 1 year ago
Thanks for the hint. There is already a branch / PR associated with this: #222
However, simply "lower-casing" is not the answer here... better would be to:
vacabulary
endpoint.id
field for further action.Edit: Unfortunately, the vocabulary at https://zenodo.org/api/vocabularies/licenses does not list the https://spdx.org URLs but the https://opensource.org URLs
Invenio RDM exposes the licenses ids in lowercase in the API (At least for zenodo and zenodo sandbox):
i.e For the MIT license: valid endpoint:
https://sandbox.zenodo.org/api/vocabularies/licenses/mit
Non valid endpointhttps://sandbox.zenodo.org/api/vocabularies/licenses/MIT
Since all SPDX links have Uppercase or mixed, but not lowercase (https://spdx.org/licenses/MIT) This code part https://github.com/hermes-hmc/workflow/blob/5726d30e9b11a161034588f3c897debb7ef8f968/src/hermes/commands/deposit/invenio.py#L556-L560 will fail. i.e the license id probably has to be converted to lowercase. I am currently not sure if this will work for all identifiers. Or better, one first has to extract an 'identifier mapping' from an API endpoint.
This currently causes Hermes deposit with:
Hermes config: