From 3314b95432ae46eb3949f9ad7ce7ece62a800d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9r=C3=A9nice=20Batut?= Date: Mon, 30 Oct 2023 17:23:22 +0100 Subject: [PATCH] Fix biotools extraction in macro --- bin/extract_galaxy_tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/extract_galaxy_tools.py b/bin/extract_galaxy_tools.py index c10c0437..c7b16381 100644 --- a/bin/extract_galaxy_tools.py +++ b/bin/extract_galaxy_tools.py @@ -212,10 +212,11 @@ def get_tool_metadata(tool, repo, ts_cat, excluded_tools, keep_tools): if 'name' in child.attrib: if child.attrib['name'] == '@TOOL_VERSION@' or child.attrib['name'] == '@VERSION@': metadata['Galaxy wrapper version'] = child.text - elif child.attrib['name'] == 'bio_tools': - metadata['bio.tool id'] = get_biotools(child) elif child.attrib['name'] == 'requirements': metadata['Conda id'] = get_conda_package(child) + biotools = get_biotools(child) + if biotools is not None: + metadata['bio.tool id'] = biotools # parse XML file and get meta data from there, also tool ids for file in repo.get_contents(tool.path): @@ -263,7 +264,7 @@ def get_tool_metadata(tool, repo, ts_cat, excluded_tools, keep_tools): metadata['Status'] = 'Up-to-date' # get bio.tool information if metadata["bio.tool id"] is not None: - r = requests.get(f'https://bio.tools/api/tool/{metadata["bio.tool id"]}/?format=json') + r = requests.get(f'https://130.226.25.21/api/tool/{metadata["bio.tool id"]}/?format=json') if r.status_code == requests.codes.ok: biotool_info = r.json() if "function" in biotool_info and 'operation' in biotool_info['function']: