Repository 'pick_value'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/pick_value

Changeset 0:bf793b71559a (2023-11-07)
Next changeset 1:b19e21af9c52 (2024-01-15)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/pick_value commit ef564483fa8dc267c599af8745aab4e03b0c57e0
added:
pick_value.xml
test-data/simple_line.txt
test-data/simple_line_alternative.txt
b
diff -r 000000000000 -r bf793b71559a pick_value.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pick_value.xml Tue Nov 07 09:02:42 2023 +0000
b
b'@@ -0,0 +1,373 @@\n+<tool name="Pick parameter value" id="pick_value" version="0.1.0" profile="21.01" tool_type="expression">\n+    <macros>\n+        <xml name="booleans">\n+            <repeat name="pick_from" title="Pick from">\n+                <param name="value" type="boolean" optional="true" label="Value" />\n+            </repeat>\n+        </xml>\n+        <xml name="integers">\n+            <repeat name="pick_from" title="Pick from">\n+                <param name="value" type="integer" label="Value" optional="true" />\n+            </repeat>\n+        </xml>\n+        <xml name="floats">\n+            <repeat name="pick_from" title="Pick from">\n+                <param name="value" type="float" label="Value" optional="true" />\n+            </repeat>\n+        </xml>\n+        <xml name="texts">\n+            <repeat name="pick_from" title="Pick from">\n+                <param name="value" type="text" optional="true" label="Value" />\n+            </repeat>\n+        </xml>\n+        <xml name="datas">\n+            <repeat name="pick_from" title="Pick from">\n+                <param name="value" type="data" format="data" optional="true" label="Value" />\n+            </repeat>\n+        </xml>\n+        <xml name="param_type">\n+            <param name="param_type" type="select" label="Select type of parameter to select from">\n+                <option value="data">Dataset</option>\n+                <option value="text">Text</option>\n+                <option value="integer">Integer</option>\n+                <option value="float">Float</option>\n+                <option value="boolean">Boolean</option>\n+            </param>\n+        </xml>\n+        <xml name="param_pick_style">\n+            <param name="pick_style" type="select" label="Picking behavior" help="How should the case when not exactly one value is non-null be handled?">\n+                <option value="first">Pick first value</option>\n+                <option value="first_or_default">Pick first value (or provide default)</option>\n+                <option value="first_or_error">Pick first value (or fail)</option>\n+                <option value="only">Pick only value</option>\n+            </param>\n+        </xml>\n+        <xml name="type_conditional">\n+            <conditional name="type_cond">\n+                <expand macro="param_type" />\n+                <when value="text">\n+                    <expand macro="texts" />\n+                </when>\n+                <when value="integer">\n+                    <expand macro="integers" />\n+                </when>\n+                <when value="float">\n+                    <expand macro="floats" />\n+                </when>\n+                <when value="boolean">\n+                    <expand macro="booleans" />\n+                </when>\n+                <when value="data">\n+                    <expand macro="datas" />\n+                </when>\n+            </conditional>\n+        </xml>\n+        <xml name="type_conditional_with_default">\n+            <conditional name="type_cond">\n+                <expand macro="param_type" />\n+                <when value="text">\n+                    <expand macro="texts" />\n+                    <param name="default_value" type="text" label="Default Value" />\n+                </when>\n+                <when value="integer">\n+                    <expand macro="integers" />\n+                    <param name="default_value" type="integer" optional="true" label="Default Value" />\n+                </when>\n+                <when value="float">\n+                    <expand macro="floats" />\n+                    <param name="default_value" type="float" optional="true" label="Default Value" />\n+                </when>\n+                <when value="boolean">\n+                    <expand macro="booleans" />\n+                    <param name="default_value" type="boolean" label="Default Value" />\n+                </when>\n+                <when value="data">\n+                    <expand macro="datas" />\n+                    <param '..b'ditional>\n+        </test>\n+        <test expect_failure="true">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="first_or_error" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="boolean" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                </conditional>\n+            </conditional>\n+        </test>\n+        <test expect_failure="true">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="only" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="boolean" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                </conditional>\n+            </conditional>\n+        </test>\n+        <test expect_num_outputs="1">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="first" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="boolean" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                </conditional>\n+            </conditional>\n+            <output name="boolean_param" value_json="null" />\n+        </test>\n+        <test expect_num_outputs="1">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="first_or_default" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="boolean" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <param name="default_value" value_json="true" />\n+                </conditional>\n+            </conditional>\n+            <output name="boolean_param" value_json="true" />\n+        </test>\n+        <test expect_num_outputs="1">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="first_or_default" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="boolean" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <param name="default_value" value_json="false" />\n+                </conditional>\n+            </conditional>\n+            <output name="boolean_param" value_json="false" />\n+        </test>\n+        <test expect_num_outputs="1">\n+            <conditional name="style_cond">\n+                <param name="pick_style" value="first_or_default" />\n+                <conditional name="type_cond">\n+                    <param name="param_type" value="data" />\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <repeat name="pick_from">\n+                        <param name="value" value_json="null" />\n+                    </repeat>\n+                    <param name="default_value" value="simple_line.txt" />\n+                </conditional>\n+            </conditional>\n+            <output name="data_param" value="simple_line.txt" />\n+        </test>\n+    </tests>\n+</tool>\n+\n'
b
diff -r 000000000000 -r bf793b71559a test-data/simple_line.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/simple_line.txt Tue Nov 07 09:02:42 2023 +0000
b
@@ -0,0 +1,1 @@
+This is a line of text.
b
diff -r 000000000000 -r bf793b71559a test-data/simple_line_alternative.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/simple_line_alternative.txt Tue Nov 07 09:02:42 2023 +0000
b
@@ -0,0 +1,1 @@
+This is a different line of text.