Skip to content

Commit

Permalink
Fix wf and tutorial extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Nov 7, 2024
1 parent 5d196c9 commit ae45d26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sources/bin/extract_all_tutorials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ then
python sources/bin/extract_gtn_tutorials.py \
extract \
--all "communities/all/resources/test_tutorials.json" \
--tools "communities/all/resources/tools.json" \
--tools "communities/all/resources/test_tools.json" \
--api $PLAUSIBLE_API_KEY \
--test
else
Expand Down
2 changes: 1 addition & 1 deletion sources/bin/extract_all_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [ ! -z $1 ]
then
python sources/bin/extract_galaxy_workflows.py extract \
--all communities/all/resources/test_workflows.json \
--tools communities/all/resources/tools.json \
--tools communities/all/resources/test_tools.json \
--test
else
python sources/bin/extract_galaxy_workflows.py extract \
Expand Down
10 changes: 5 additions & 5 deletions sources/bin/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def read_suite_per_tool_id(tool_fp: str) -> Dict:
tool_suites = load_json(tool_fp)
tools = {}
for suite in tool_suites:
for tool in suite["Galaxy tool ids"]:
for tool in suite["Suite ID"]:
tools[tool] = {
"Galaxy wrapper id": suite["Galaxy wrapper id"],
"Galaxy wrapper owner": suite["Galaxy wrapper id"],
"EDAM operation": suite["EDAM operation"],
"Suite ID": suite["Suite ID"],
"Suite owner": suite["Suite owner"],
"EDAM operations": suite["EDAM operations"],
}
return tools

Expand Down Expand Up @@ -154,7 +154,7 @@ def get_edam_operation_from_tools(selected_tools: list, all_tools: dict) -> List
edam_operation = set()
for t in selected_tools:
if t in all_tools:
edam_operation.update(set(all_tools[t]["EDAM operation"]))
edam_operation.update(set(all_tools[t]["EDAM operations"]))
else:
print(f"{t} not found in all tools")
return list(edam_operation)

0 comments on commit ae45d26

Please sign in to comment.