Merge pull request #7458 from mvdbeek/fix_broken_hidden_parameter

[19.01] Fix hidden parameter use in workflows
This commit is contained in:
Dannon
2019-03-05 08:33:56 -05:00
committed by GitHub
5 changed files with 45 additions and 1 deletions
+3
View File
@@ -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:
+1 -1
View File
@@ -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"
+17
View File
@@ -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:
+23
View File
@@ -0,0 +1,23 @@
<tool id="hidden_param" name="Hidden Parameter" version="0.1.0">
<description>Hidden Parameter</description>
<command><![CDATA[
echo '$hidden_param' > '$out_file1'
]]></command>
<inputs>
<param name="hidden_param" type="hidden" value="1" />
</inputs>
<outputs>
<data name="out_file1" format="txt"/>
</outputs>
<tests>
<test>
<output name="out_file1">
<assert_contents>
<has_line line="1" />
</assert_contents>
</output>
</test>
</tests>
<help>
</help>
</tool>
@@ -91,6 +91,7 @@
<tool file="column_param.xml" />
<tool file="column_param_configfile.xml" />
<tool file="column_multi_param.xml" />
<tool file="hidden_param.xml" />
<tool file="special_params.xml" />
<tool file="section.xml" />
<tool file="sam_to_unsorted_bam.xml" />