Add support for Zenodo
Related to #37
This might help to get started:
- https://gitlab.com/dvolgyes/zenodo_get
- https://github.com/jupyter/repo2docker/blob/master/repo2docker/contentproviders/zenodo.py
I've got a gist to download from a zenodo record id: https://gist.github.com/jsta/c50a1d11ce77dba9430b77d5771525b9
Ooooh, that's lovely, thank you! Is it OK if I/we (you?) nab this code and put it in the package?
Sure. One thing to note is that it works off of the zenodo record ID not the doi. I guess this means that a note would need to be added to the docs for the x argument of suppdata pointing this out? This note would be similar to the note about ESA journal article codes...
Perhaps (we do have something similar for a few other sources). At any rate, this might serve as a template. When I next have a free moment (ha ha) I will take a look at this. Thanks Joseph!
I think it should be possible to translate the DOI to a Zenodo record ID, similar to the other sources. Thanks for the snippet @jsta !
Another place where we could steal some code is the zen4R R package, which is a full blown Zenodo client: https://github.com/eblondel/zen4R Having that as a dependency might be a bit to much though for plain data download, but to access specific files we might be able to re-use some functions.
I don't see the harm in adding this as a dependency if it lets us do another new, cool thing... This looks very useful, thank you both!
@nuest @willpearse just seeing this issue, not sure if it's active. zen4R is quite light dependency and maintained, you can safely add it as import, and for downloading data you don't have to go through the main zen4R ZenodoManager client. Having published DOIs, you can get the data from them using the zen4R::download_zenodo util. It internally instantiates a public Zenodo manager (no token required). In case you struggle with it, feel free to contact me
Great, thanks!