Loading lib/galaxy/model/store/ro_crate_utils.py +3 −3 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ class WorkflowRunCrateProfileBuilder: "position": position[0], "name": step.tool_id, "description": step_description, "workExample": f"#{step.tool_id}" }, ) ) Loading Loading @@ -359,13 +360,12 @@ class WorkflowRunCrateProfileBuilder: tool_entity = crate.add( ContextEntity( crate, tool_id, f"#{tool_id}", # Prepend # to tool_id properties={ "@type": "SoftwareApplication", "name": tool_name, "version": tool_version, "description": tool_description, "url": "https://toolshed.g2.bx.psu.edu", # URL if relevant }, ) ) Loading @@ -375,7 +375,7 @@ class WorkflowRunCrateProfileBuilder: # Append the tool entity to the workflow (instrument) and store it in the list tool_entities.append(tool_entity) crate.mainEntity.append_to("instrument", tool_entity) crate.mainEntity.append_to("hasPart", tool_entity) # Handle subworkflows recursively elif step.type == "subworkflow": Loading test/unit/data/model/test_model_store.py +1 −2 Original line number Diff line number Diff line Loading @@ -516,7 +516,7 @@ def validate_tools(ro_crate: ROCrate): """ Validate that tools (SoftwareApplication) are correctly added. """ tools = ro_crate.mainEntity.get("instrument") tools = ro_crate.mainEntity.get("hasPart") assert tools, "No tools found in the RO-Crate" tool_ids = set() Loading @@ -524,7 +524,6 @@ def validate_tools(ro_crate: ROCrate): assert tool["@type"] == "SoftwareApplication" assert "name" in tool assert "version" in tool assert "url" in tool assert "description" in tool or tool["description"] is None assert tool.id not in tool_ids, "Duplicate tool found" tool_ids.add(tool.id) Loading Loading
lib/galaxy/model/store/ro_crate_utils.py +3 −3 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ class WorkflowRunCrateProfileBuilder: "position": position[0], "name": step.tool_id, "description": step_description, "workExample": f"#{step.tool_id}" }, ) ) Loading Loading @@ -359,13 +360,12 @@ class WorkflowRunCrateProfileBuilder: tool_entity = crate.add( ContextEntity( crate, tool_id, f"#{tool_id}", # Prepend # to tool_id properties={ "@type": "SoftwareApplication", "name": tool_name, "version": tool_version, "description": tool_description, "url": "https://toolshed.g2.bx.psu.edu", # URL if relevant }, ) ) Loading @@ -375,7 +375,7 @@ class WorkflowRunCrateProfileBuilder: # Append the tool entity to the workflow (instrument) and store it in the list tool_entities.append(tool_entity) crate.mainEntity.append_to("instrument", tool_entity) crate.mainEntity.append_to("hasPart", tool_entity) # Handle subworkflows recursively elif step.type == "subworkflow": Loading
test/unit/data/model/test_model_store.py +1 −2 Original line number Diff line number Diff line Loading @@ -516,7 +516,7 @@ def validate_tools(ro_crate: ROCrate): """ Validate that tools (SoftwareApplication) are correctly added. """ tools = ro_crate.mainEntity.get("instrument") tools = ro_crate.mainEntity.get("hasPart") assert tools, "No tools found in the RO-Crate" tool_ids = set() Loading @@ -524,7 +524,6 @@ def validate_tools(ro_crate: ROCrate): assert tool["@type"] == "SoftwareApplication" assert "name" in tool assert "version" in tool assert "url" in tool assert "description" in tool or tool["description"] is None assert tool.id not in tool_ids, "Duplicate tool found" tool_ids.add(tool.id) Loading