From 1a636c376fe7fbdaa0ead866989ddfbf0ed7e943 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 4 Mar 2019 17:39:19 +0100 Subject: [PATCH 1/3] Fix HiddenParameter use Broken in https://github.com/galaxyproject/galaxy/commit/dd8d74f364770a1272555a3753f5d1e1288315e1 Fixes https://github.com/galaxyproject/galaxy/issues/7454 --- lib/galaxy/workflow/modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/galaxy/workflow/modules.py b/lib/galaxy/workflow/modules.py index 34c079074b1..686e17a0d2e 100644 --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -33,6 +33,7 @@ from galaxy.tools.parameters.basic import ( ConnectedValue, DataCollectionToolParameter, DataToolParameter, + HiddenToolParameter, is_runtime_value, parameter_types, runtime_to_json, @@ -889,6 +890,8 @@ class ToolModule(WorkflowModule): skip = not visible or not is_data elif connectable_only: skip = not visible or not (is_data or is_connectable) + elif isinstance(input, HiddenToolParameter): + skip = False else: skip = not visible if not skip: From 76be1263cac3ed5f7954e451693352d7276e69a7 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 4 Mar 2019 17:56:45 +0100 Subject: [PATCH 2/3] Test that workflows with hidden params can be run --- test/api/test_workflows.py | 17 +++++++++++++++ test/functional/tools/hidden_param.xml | 23 +++++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 3 files changed, 41 insertions(+) create mode 100644 test/functional/tools/hidden_param.xml diff --git a/test/api/test_workflows.py b/test/api/test_workflows.py index 7d70f570029..7503244f73b 100644 --- a/test/api/test_workflows.py +++ b/test/api/test_workflows.py @@ -2074,6 +2074,23 @@ outer_input: content = self.dataset_populator.get_history_dataset_details(history_id, wait=True, assert_ok=True) assert content["name"] == "foo was replaced" + @skip_without_tool("hidden_param") + def test_hidden_param_in_workflow(self): + with self.dataset_populator.test_history() as history_id: + run_object = self._run_jobs(""" +class: GalaxyWorkflow +steps: + step1: + tool_id: hidden_param +""", test_data={}, history_id=history_id, wait=False) + self.wait_for_invocation_and_jobs(history_id, run_object.workflow_id, run_object.invocation_id) + contents = self.__history_contents(history_id) + assert len(contents) == 1 + okay_dataset = contents[0] + assert okay_dataset["state"] == "ok" + content = self.dataset_populator.get_history_dataset_content(history_id, hid=1) + assert content == '1\n' + @skip_without_tool("output_filter") def test_optional_workflow_output(self): with self.dataset_populator.test_history() as history_id: diff --git a/test/functional/tools/hidden_param.xml b/test/functional/tools/hidden_param.xml new file mode 100644 index 00000000000..b19890f05e4 --- /dev/null +++ b/test/functional/tools/hidden_param.xml @@ -0,0 +1,23 @@ + + Hidden Parameter + '$out_file1' + ]]> + + + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index c834737e32b..d763367ffbc 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -91,6 +91,7 @@ + From b5bbdfd89fc64796a2049ffd2f3f4d568afbd7f3 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 4 Mar 2019 19:00:56 +0100 Subject: [PATCH 3/3] Also use correct image --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 6b030fdd597..3ad62945d46 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -270,7 +270,7 @@ exists() { type "$1" >/dev/null 2>/dev/null } -DOCKER_DEFAULT_IMAGE='mvdbeek/testing-base:19.01.3' +DOCKER_DEFAULT_IMAGE='galaxy/testing-base:19.01.0' test_script="./scripts/functional_tests.py" report_file="run_functional_tests.html"