forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request galaxyproject#18678 from jmchilton/parameter_models_3
Another round of parameter model enhancements and tool tests
- Loading branch information
Showing
11 changed files
with
268 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/functional/tools/parameters/data_column_multiple_optional.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<tool id="gx_data_column_multiple_optional" name="gx_data_column_multiple_optional" version="1.0.0"> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<command><![CDATA[ | ||
echo 'parameter: $parameter' >> '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="ref_parameter" type="data" format="tabular" /> | ||
<param name="parameter" type="data_column" data_ref="ref_parameter" multiple="true" optional="true" /> | ||
</inputs> | ||
<expand macro="simple_text_output" /> | ||
<tests> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<param name="parameter" value="1,2,3" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: 1,2,3"/> | ||
</expand> | ||
</test> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: None"/> | ||
</expand> | ||
</test> | ||
</tests> | ||
</tool> |
36 changes: 36 additions & 0 deletions
36
test/functional/tools/parameters/gx_data_column_multiple.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<tool id="gx_data_column_multiple" name="gx_data_column_multiple" version="1.0.0"> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<command><![CDATA[ | ||
echo 'parameter: $parameter' >> '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="ref_parameter" type="data" format="tabular" /> | ||
<param name="parameter" type="data_column" data_ref="ref_parameter" multiple="true" /> | ||
</inputs> | ||
<expand macro="simple_text_output" /> | ||
<tests> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<param name="parameter" value="1" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: 1"/> | ||
</expand> | ||
</test> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<param name="parameter" value="1,2,3" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: 1,2,3"/> | ||
</expand> | ||
</test> | ||
<!-- these parameters are not implicitly optional! --> | ||
<test expect_failure="true"> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: 1"/> | ||
</expand> | ||
</test> | ||
</tests> | ||
</tool> |
28 changes: 28 additions & 0 deletions
28
test/functional/tools/parameters/gx_data_column_optional.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<tool id="gx_data_column_optional" name="gx_data_column_optional" version="1.0.0"> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<command><![CDATA[ | ||
echo 'parameter: $parameter' >> '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="ref_parameter" type="data" format="tabular" /> | ||
<param name="parameter" type="data_column" data_ref="ref_parameter" optional="true" /> | ||
</inputs> | ||
<expand macro="simple_text_output" /> | ||
<tests> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<param name="parameter" value="1" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: 1"/> | ||
</expand> | ||
</test> | ||
<test> | ||
<param name="ref_parameter" value="2.tabular" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: None"/> | ||
</expand> | ||
</test> | ||
</tests> | ||
</tool> |
39 changes: 39 additions & 0 deletions
39
test/functional/tools/parameters/gx_group_tag_multiple.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<tool id="gx_group_tag_multiple" name="gx_group_tag_multiple" version="1.0.0"> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<command><![CDATA[ | ||
echo "parameter: $parameter" > '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="ref_parameter" type="data_collection" format="tabular" /> | ||
<param name="parameter" type="group_tag" data_ref="ref_parameter" multiple="true" /> | ||
</inputs> | ||
<expand macro="simple_text_output" /> | ||
<tests> | ||
<test> | ||
<param name="ref_parameter"> | ||
<collection type="paired"> | ||
<element name="forward" value="simple_line.txt" tags="group:type:single" /> | ||
<element name="reverse" value="simple_line_alternative.txt" tags="group:type:split" /> | ||
</collection> | ||
</param> | ||
<param name="parameter" value="type:single,type:split" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: type:single,type:split"/> | ||
</expand> | ||
</test> | ||
<test expect_failure="true"> | ||
<!-- interesting... this fails here but multi-selects don't --> | ||
<param name="ref_parameter"> | ||
<collection type="paired"> | ||
<element name="forward" value="simple_line.txt" tags="group:type:single" /> | ||
<element name="reverse" value="simple_line_alternative.txt" tags="group:type:split" /> | ||
</collection> | ||
</param> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: None"/> | ||
</expand> | ||
</test> | ||
</tests> | ||
</tool> |
38 changes: 38 additions & 0 deletions
38
test/functional/tools/parameters/gx_group_tag_optional.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<tool id="gx_group_tag_optional" name="gx_group_tag_optional" version="1.0.0"> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<command><![CDATA[ | ||
echo "parameter: $parameter" > '$output' | ||
]]></command> | ||
<inputs> | ||
<param name="ref_parameter" type="data_collection" format="tabular" /> | ||
<param name="parameter" type="group_tag" data_ref="ref_parameter" optional="true" /> | ||
</inputs> | ||
<expand macro="simple_text_output" /> | ||
<tests> | ||
<test> | ||
<param name="ref_parameter"> | ||
<collection type="paired"> | ||
<element name="forward" value="simple_line.txt" tags="group:type:single" /> | ||
<element name="reverse" value="simple_line_alternative.txt" tags="group:type:split" /> | ||
</collection> | ||
</param> | ||
<param name="parameter" value="type:single" /> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: type:single"/> | ||
</expand> | ||
</test> | ||
<test> | ||
<param name="ref_parameter"> | ||
<collection type="paired"> | ||
<element name="forward" value="simple_line.txt" tags="group:type:single" /> | ||
<element name="reverse" value="simple_line_alternative.txt" tags="group:type:split" /> | ||
</collection> | ||
</param> | ||
<expand macro="assert_output"> | ||
<has_line line="parameter: None"/> | ||
</expand> | ||
</test> | ||
</tests> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters