always unpack a single zenodo zip
MODIFY
repo2docker/contentproviders/zenodo.py
repo2docker/contentproviders/zenodo.py
@@ -63,12 +63,11 @@ class Zenodo(DoiProvider):
record = resp.json()
- is_software = deep_get(record, host["type"]).lower() == "software"
files = deep_get(record, host["filepath"])
only_one_file = len(files) == 1
for file_ref in files:
for line in self.fetch_file(
- file_ref, host, output_dir, is_software and only_one_file
+ file_ref, host, output_dir, unzip=only_one_file
):
yield line

MODIFY
tests/unit/contentproviders/test_zenodo.py
tests/unit/contentproviders/test_zenodo.py
@@ -99,7 +99,7 @@ def test_fetch_software_from_github_archive(requests_mock):
"links": {"download": "file://{}".format(zen_path)},
}
],
- "metadata": {"upload_type": "software"},
+ "metadata": {"upload_type": "other"},
}
requests_mock.get("https://zenodo.org/api/records/1234", json=mock_response)
requests_mock.get(

always unpack a single zenodo zip