suppdata icon indicating copy to clipboard operation
suppdata copied to clipboard

Add support for Zenodo

Open nuest opened this issue 6 years ago • 8 comments

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

nuest avatar Jan 17 '20 12:01 nuest

I've got a gist to download from a zenodo record id: https://gist.github.com/jsta/c50a1d11ce77dba9430b77d5771525b9

jsta avatar Feb 05 '20 22:02 jsta

Ooooh, that's lovely, thank you! Is it OK if I/we (you?) nab this code and put it in the package?

willpearse avatar Feb 06 '20 02:02 willpearse

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...

jsta avatar Feb 06 '20 14:02 jsta

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!

willpearse avatar Feb 06 '20 18:02 willpearse

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.

nuest avatar Apr 07 '20 12:04 nuest

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!

willpearse avatar Apr 07 '20 15:04 willpearse

@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

eblondel avatar Apr 07 '22 18:04 eblondel

Great, thanks!

willpearse avatar Apr 08 '22 10:04 willpearse