dvolgyes / zenodo_get

Zenodo_get: Downloader for Zenodo records
GNU Affero General Public License v3.0
130 stars 21 forks source link

Align with new Zenodo API #20

Closed tcompa closed 11 months ago

tcompa commented 11 months ago

This is a work-in-progress attempt at fixing #19. @dvolgyes feel free to close it or use it as a basis for further work in this direction.

The key->filename and size->filesize replacements look reasonable (see https://developers.zenodo.org). Tests now fail at this stage:

Link: https://zenodo.org/api/records/1215979/files/f4354a10-2700-4277-875f-04ce02cd81f4   size: 0.1 MB
Traceback (most recent call last):
  File "/home/tommaso/Fractal/zenodo_get/zenodo_get/__main__.py", line 5, in <module>
    zenodo_get.zenodo_get()
  File "/home/tommaso/Fractal/zenodo_get/zenodo_get/zget.py", line 351, in zenodo_get
    remote_hash, local_hash = check_hash(fname, checksum)
  File "/home/tommaso/Fractal/zenodo_get/zenodo_get/zget.py", line 59, in check_hash
    algorithm, value = checksum.split(':')
ValueError: not enough values to unpack (expected 2, got 1)
dvolgyes commented 11 months ago

Thanks! I just made a quick bandaid patch fix, it suppose to be in master and pypi now

tcompa commented 11 months ago

I just made a quick bandaid patch fix, it suppose to be in master and pypi now

Great, thanks! Closing this one then.