kopia lustrzana https://github.com/jupyterhub/repo2docker
always unpack a single zenodo zip
rodzic
eb75209019
commit
8db656d1ce
|
@ -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
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue