Conversation
Related to jupyterhub#1503
| def fetch(self, spec, output_dir, yield_output=False): | ||
| """Fetch and unpack a Zenodo record""" | ||
| record_id = spec["record"] | ||
| record_id = spec["record"].split(".")[1] |
There was a problem hiding this comment.
This isn't always correct, see the URL formats in
There was a problem hiding this comment.
Thanks @manics for the enlightenment.
Do you know why this happens?
There was a problem hiding this comment.
Maybe we're assigning semantic meaning to something we shouldn't?
https://support.zenodo.org/help/en-gb/18-general/216-what-is-a-doi says
How to resolve a DOI?
...
Or you can directly resolve it by constructing the following link:
https://doi.org/10.5281/zenodo.[record ID]
You may need to look into the comments or past PRs to work out why we're following a chain of URLs to get the record ID
There was a problem hiding this comment.
I did a bunch of digging into the doi -> zenodo record id while writing repoproviders and this comment summarizes that https://github.com/yuvipanda/repoproviders/blob/6759b84055584ad137e31579da3656d6c4c67593/src/repoproviders/resolvers/doi.py#L208
|
I tested the provided use case on https://github.com/yuvipanda/repoproviders (which has been getting a lot of new development as I build out https://jupyterbook.pub) and it handles the test case fine. Me and @minrk have also been talking about what else is needed before we can try to integrate repoproviders here in yuvipanda/repoproviders#30. I don't think that should block this PR though |
|
I expanded the test repo2docker/tests/unit/contentproviders/test_zenodo.py Lines 31 to 56 in a0a7fec and in https://github.com/jupyterhub/repo2docker/actions/runs/22105506970/job/63886941250?pr=1504 it failed with My impression is that repo2docker/tests/unit/contentproviders/test_zenodo.py Lines 54 to 56 in a0a7fec I will have a look later when I have time. |
As reported in #1503, the content provider for Zenodo is not working as expected. I believe there were some changes in the Zenodo API but I could not find a reference to the changes.
The first change is that the URL in the
hostnamewashttps://zenodo.org/doi/instead ofhttps://zenodo.org/records/.The second change is that the record ID was
18553140instead ofzenodo.18553140.Before this pull request
After this pull request
Next steps