Loading lib/galaxy/managers/workflows.py +3 −3 Original line number Diff line number Diff line Loading @@ -1413,7 +1413,7 @@ class WorkflowContentsManager(UsesAnnotations): If `allow_upgrade`, the workflow and sub-workflows might use updated tool versions when refactoring. """ annotation_str = "" tag_str = "" tags_list = [] annotation_owner = None if stored is not None: if stored.id: Loading @@ -1424,7 +1424,7 @@ class WorkflowContentsManager(UsesAnnotations): or self.get_item_annotation_str(trans.sa_session, annotation_owner, stored) or "" ) tag_str = stored.make_tag_string_list() tags_list = stored.make_tag_string_list() else: # dry run with flushed workflow objects, just use the annotation annotations = stored.annotations Loading @@ -1437,7 +1437,7 @@ class WorkflowContentsManager(UsesAnnotations): data["format-version"] = "0.1" data["name"] = workflow.name data["annotation"] = annotation_str data["tags"] = tag_str data["tags"] = tags_list if workflow.uuid is not None: data["uuid"] = str(workflow.uuid) steps: Dict[int, Dict[str, Any]] = {} Loading lib/galaxy_test/api/test_workflows.py +7 −0 Original line number Diff line number Diff line Loading @@ -7621,6 +7621,13 @@ outer_input: invocation_ids = [i["id"] for i in all_invocations_for_user.json()] return invocation_ids def test_subworkflow_tags(self): workflow = self.workflow_populator.load_workflow_from_resource("test_subworkflow_with_tags") workflow_id = self.workflow_populator.create_workflow(workflow) downloaded_workflow = self._download_workflow(workflow_id) subworkflow = downloaded_workflow["steps"]["1"]["subworkflow"] assert subworkflow["tags"] == [] class TestAdminWorkflowsApi(BaseWorkflowsApiTestCase): require_admin_user = True Loading lib/galaxy_test/base/data/test_subworkflow_with_tags.ga 0 → 100644 +134 −0 Original line number Diff line number Diff line { "a_galaxy_workflow": "true", "annotation": "Test main ", "comments": [], "format-version": "0.1", "name": "Unnamed Workflow", "report": { "markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n" }, "steps": { "0": { "annotation": "", "content_id": null, "errors": null, "id": 0, "input_connections": {}, "inputs": [], "label": null, "name": "Input dataset", "outputs": [], "position": { "left": 0, "top": 0 }, "tool_id": null, "tool_state": "{\"optional\": false, \"tag\": null}", "tool_version": null, "type": "data_input", "uuid": "967583e9-d2a6-444a-ba31-6fb749d03f9e", "when": null, "workflow_outputs": [] }, "1": { "annotation": "", "id": 1, "input_connections": { "0:Input dataset": { "id": 0, "input_subworkflow_step_id": 0, "output_name": "output" } }, "inputs": [], "label": null, "name": "Workflow with tags", "outputs": [], "position": { "left": 249, "top": 51 }, "subworkflow": { "a_galaxy_workflow": "true", "annotation": "", "comments": [], "format-version": "0.1", "name": "Workflow with tags", "report": { "markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n" }, "steps": { "0": { "annotation": "", "content_id": null, "errors": null, "id": 0, "input_connections": {}, "inputs": [], "label": null, "name": "Input dataset", "outputs": [], "position": { "left": 0, "top": 0.0 }, "tool_id": null, "tool_state": "{\"optional\": false, \"tag\": null}", "tool_version": null, "type": "data_input", "uuid": "eca9b088-ff50-4253-8387-01512f03ff2f", "when": null, "workflow_outputs": [] }, "1": { "annotation": "", "content_id": "addValue", "errors": null, "id": 1, "input_connections": { "input": { "id": 0, "output_name": "output" } }, "inputs": [ { "description": "runtime parameter for tool Add column", "name": "input" } ], "label": null, "name": "Add column", "outputs": [ { "name": "out_file1", "type": "input" } ], "position": { "left": 123, "top": 112.0 }, "post_job_actions": {}, "tool_id": "addValue", "tool_state": "{\"exp\": \"1\", \"input\": {\"__class__\": \"RuntimeValue\"}, \"iterate\": \"no\", \"__page__\": null, \"__rerun_remap_job_id__\": null}", "tool_version": "1.0.0", "type": "tool", "uuid": "7016e754-149b-402a-bb17-eb6cd4b1ab0a", "when": null, "workflow_outputs": [] } }, "uuid": "c33370a9-188f-4af8-bfcc-137c577c79ba" }, "tool_id": null, "type": "subworkflow", "uuid": "90bdcd13-418a-49da-847e-02926942bf4b", "when": null, "workflow_outputs": [] } }, "tags": [], "uuid": "64d7fac3-6402-412b-9db6-490ffc18e129", "version": 1 } No newline at end of file Loading
lib/galaxy/managers/workflows.py +3 −3 Original line number Diff line number Diff line Loading @@ -1413,7 +1413,7 @@ class WorkflowContentsManager(UsesAnnotations): If `allow_upgrade`, the workflow and sub-workflows might use updated tool versions when refactoring. """ annotation_str = "" tag_str = "" tags_list = [] annotation_owner = None if stored is not None: if stored.id: Loading @@ -1424,7 +1424,7 @@ class WorkflowContentsManager(UsesAnnotations): or self.get_item_annotation_str(trans.sa_session, annotation_owner, stored) or "" ) tag_str = stored.make_tag_string_list() tags_list = stored.make_tag_string_list() else: # dry run with flushed workflow objects, just use the annotation annotations = stored.annotations Loading @@ -1437,7 +1437,7 @@ class WorkflowContentsManager(UsesAnnotations): data["format-version"] = "0.1" data["name"] = workflow.name data["annotation"] = annotation_str data["tags"] = tag_str data["tags"] = tags_list if workflow.uuid is not None: data["uuid"] = str(workflow.uuid) steps: Dict[int, Dict[str, Any]] = {} Loading
lib/galaxy_test/api/test_workflows.py +7 −0 Original line number Diff line number Diff line Loading @@ -7621,6 +7621,13 @@ outer_input: invocation_ids = [i["id"] for i in all_invocations_for_user.json()] return invocation_ids def test_subworkflow_tags(self): workflow = self.workflow_populator.load_workflow_from_resource("test_subworkflow_with_tags") workflow_id = self.workflow_populator.create_workflow(workflow) downloaded_workflow = self._download_workflow(workflow_id) subworkflow = downloaded_workflow["steps"]["1"]["subworkflow"] assert subworkflow["tags"] == [] class TestAdminWorkflowsApi(BaseWorkflowsApiTestCase): require_admin_user = True Loading
lib/galaxy_test/base/data/test_subworkflow_with_tags.ga 0 → 100644 +134 −0 Original line number Diff line number Diff line { "a_galaxy_workflow": "true", "annotation": "Test main ", "comments": [], "format-version": "0.1", "name": "Unnamed Workflow", "report": { "markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n" }, "steps": { "0": { "annotation": "", "content_id": null, "errors": null, "id": 0, "input_connections": {}, "inputs": [], "label": null, "name": "Input dataset", "outputs": [], "position": { "left": 0, "top": 0 }, "tool_id": null, "tool_state": "{\"optional\": false, \"tag\": null}", "tool_version": null, "type": "data_input", "uuid": "967583e9-d2a6-444a-ba31-6fb749d03f9e", "when": null, "workflow_outputs": [] }, "1": { "annotation": "", "id": 1, "input_connections": { "0:Input dataset": { "id": 0, "input_subworkflow_step_id": 0, "output_name": "output" } }, "inputs": [], "label": null, "name": "Workflow with tags", "outputs": [], "position": { "left": 249, "top": 51 }, "subworkflow": { "a_galaxy_workflow": "true", "annotation": "", "comments": [], "format-version": "0.1", "name": "Workflow with tags", "report": { "markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n" }, "steps": { "0": { "annotation": "", "content_id": null, "errors": null, "id": 0, "input_connections": {}, "inputs": [], "label": null, "name": "Input dataset", "outputs": [], "position": { "left": 0, "top": 0.0 }, "tool_id": null, "tool_state": "{\"optional\": false, \"tag\": null}", "tool_version": null, "type": "data_input", "uuid": "eca9b088-ff50-4253-8387-01512f03ff2f", "when": null, "workflow_outputs": [] }, "1": { "annotation": "", "content_id": "addValue", "errors": null, "id": 1, "input_connections": { "input": { "id": 0, "output_name": "output" } }, "inputs": [ { "description": "runtime parameter for tool Add column", "name": "input" } ], "label": null, "name": "Add column", "outputs": [ { "name": "out_file1", "type": "input" } ], "position": { "left": 123, "top": 112.0 }, "post_job_actions": {}, "tool_id": "addValue", "tool_state": "{\"exp\": \"1\", \"input\": {\"__class__\": \"RuntimeValue\"}, \"iterate\": \"no\", \"__page__\": null, \"__rerun_remap_job_id__\": null}", "tool_version": "1.0.0", "type": "tool", "uuid": "7016e754-149b-402a-bb17-eb6cd4b1ab0a", "when": null, "workflow_outputs": [] } }, "uuid": "c33370a9-188f-4af8-bfcc-137c577c79ba" }, "tool_id": null, "type": "subworkflow", "uuid": "90bdcd13-418a-49da-847e-02926942bf4b", "when": null, "workflow_outputs": [] } }, "tags": [], "uuid": "64d7fac3-6402-412b-9db6-490ffc18e129", "version": 1 } No newline at end of file