From 095fca12d35ae676ba98f1cd90da8fee8864a73d Mon Sep 17 00:00:00 2001 From: fynnbe Date: Mon, 30 Oct 2023 11:02:38 +0100 Subject: [PATCH] zenodo api change filename -> key --- scripts/update_external_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_external_resources.py b/scripts/update_external_resources.py index 3eba951c2..8390086b6 100644 --- a/scripts/update_external_resources.py +++ b/scripts/update_external_resources.py @@ -168,9 +168,9 @@ def update_from_zenodo( resource_output_path = dist / resource_doi / "resource.yaml" version_name = f"version from {hit['metadata']['publication_date']}" rdf_urls = [ - f"https://zenodo.org/api/records/{hit['recid']}/files/{file_hit['filename']}/content" + f"https://zenodo.org/api/records/{hit['recid']}/files/{file_hit['key']}/content" for file_hit in hit["files"] - if (file_hit["filename"] == "rdf.yaml" or file_hit["filename"].endswith("bioimageio.yaml")) + if (file_hit["key"] == "rdf.yaml" or file_hit["key"].endswith(".bioimageio.yaml")) ] rdf = {} rdf_source = "unknown"