comparison json_db_config_generating_boolean.xml @ 5:40aa268ce07f draft default tip

planemo upload for repository https://github.com/brsynth commit 3401816c949b538bd9c67e61cbe92badff6a4007-dirty
author tduigou
date Wed, 11 Jun 2025 16:00:37 +0000
parents f103f5253a93
children
comparison
equal deleted inserted replaced
4:f103f5253a93 5:40aa268ce07f
4 <token name="@VERSION_SUFFIX@">2</token> 4 <token name="@VERSION_SUFFIX@">2</token>
5 <token name="@TOOL_VERSION@">0.1.0</token> 5 <token name="@TOOL_VERSION@">0.1.0</token>
6 </macros> 6 </macros>
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 python3 -c "import json; params = { 8 python3 -c "import json; params = {
9 'execution': '$execution', 9 'execution': '$db.execution',
10 'JSON_db_uri': '$db_uri', 10 'JSON_db_uri': '$db.db_uri',
11 'JSON_table': '$table_name', 11 'JSON_table': '$db.table_name',
12 'JSON_fragment_column': '$fragment_column', 12 'JSON_fragment_column': '$db.fragment_column',
13 'JSON_sequence_column': '$sequence_column', 13 'JSON_sequence_column': '$db.sequence_column',
14 'JSON_annotation_column': '$annotation_column' 14 'JSON_annotation_column': '$db.annotation_column'
15 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" 15 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" && echo DEBUG && cat '$output_json'
16 ]]></command> 16 ]]></command>
17 <inputs> 17 <inputs>
18 <conditional name="db_request"> 18 <section name="db" title="DB request" expanded="false">
19 <param name="execution" type="boolean" label="Save To DB ?" checked ='false' help="If True the execution key in the json file will be true" /> 19 <conditional name="db_request">
20 <when value='true'> 20 <param name="execution" type="boolean" label="Save To DB ?" checked ='false' help="If True the execution key in the json file will be true" />
21 <section name='db_config' title='DB config' expanded='true'> 21 <when value='true'>
22 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> 22 <section name='db_config' title='DB config' expanded='true'>
23 <param name="table_name" type="text" label="DB Table Name" optional="true" /> 23 <param name="db_uri" type="text" label="DB Connection URI" optional="true" />
24 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> 24 <param name="table_name" type="text" label="DB Table Name" optional="true" />
25 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> 25 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" />
26 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> 26 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" />
27 </section> 27 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" />
28 </when> 28 </section>
29 <when value='false'> 29 </when>
30 <section name='db_config' title='DB config' expanded='false'> 30 <when value='false'>
31 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> 31 <section name='db_config' title='DB config' expanded='false'>
32 <param name="table_name" type="text" label="DB Table Name" optional="true" /> 32 <param name="db_uri" type="text" label="DB Connection URI" optional="true" />
33 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> 33 <param name="table_name" type="text" label="DB Table Name" optional="true" />
34 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> 34 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" />
35 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> 35 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" />
36 </section> 36 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" />
37 </when> 37 </section>
38 </conditional> 38 </when>
39 </conditional>
40 </section>
39 </inputs> 41 </inputs>
40 <outputs> 42 <outputs>
41 <data name="output_json" format="json" label="JSON Conf" /> 43 <data name="output_json" format="json" label="JSON Conf" />
42 </outputs> 44 </outputs>
43 <tests> 45 <tests>
63 </output> 65 </output>
64 </test> 66 </test>
65 <!--test execution is false --> 67 <!--test execution is false -->
66 <test> 68 <test>
67 <conditional name="db_request"> 69 <conditional name="db_request">
68 <param name="execution" value="false" /> 70 <param name="db|execution" value="false" />
69 </conditional> 71 </conditional>
70 <output name="output_json"> 72 <output name="output_json">
71 <assert_contents> 73 <assert_contents>
72 <has_json_property_with_text property="execution" text="false" /> 74 <has_json_property_with_text property="execution" text="false" />
73 <has_json_property_with_text property="JSON_db_uri" text="" /> 75 <has_json_property_with_text property="JSON_db_uri" text="" />