Skip to content

Commit f07111c

Browse files
authored
Merge pull request #1043 from akhmerov/patch-1
always unpack a single zenodo zip
2 parents eb75209 + 8db656d commit f07111c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

repo2docker/contentproviders/zenodo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ def fetch(self, spec, output_dir, yield_output=False):
6363

6464
record = resp.json()
6565

66-
is_software = deep_get(record, host["type"]).lower() == "software"
6766
files = deep_get(record, host["filepath"])
6867
only_one_file = len(files) == 1
6968
for file_ref in files:
7069
for line in self.fetch_file(
71-
file_ref, host, output_dir, is_software and only_one_file
70+
file_ref, host, output_dir, unzip=only_one_file
7271
):
7372
yield line
7473

tests/unit/contentproviders/test_zenodo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_fetch_software_from_github_archive(requests_mock):
9999
"links": {"download": "file://{}".format(zen_path)},
100100
}
101101
],
102-
"metadata": {"upload_type": "software"},
102+
"metadata": {"upload_type": "other"},
103103
}
104104
requests_mock.get("https://zenodo.org/api/records/1234", json=mock_response)
105105
requests_mock.get(

0 commit comments

Comments
 (0)