diff redelacSticsInputGenerator.xml @ 14:812bb8097dac draft

"planemo upload for repository https://forgemia.inra.fr/redelac commit d16b9ecdb4dd51b69a6aaa4ab298b82455fe0267"
author siwaa
date Tue, 12 Dec 2023 10:38:20 +0000
parents 3db1f57029a7
children 413cec4dfe5f
line wrap: on
line diff
--- a/redelacSticsInputGenerator.xml	Fri Oct 27 09:17:06 2023 +0000
+++ b/redelacSticsInputGenerator.xml	Tue Dec 12 10:38:20 2023 +0000
@@ -1,7 +1,7 @@
-<tool id="redelacSticsInputGenerator" name="redelacSticsInputGenerator" version="1.0.7">
+<tool id="redelacSticsInputGenerator" name="redelacSticsInputGenerator" version="1.0.8">
   <description>to run generate Stics Inputs for REDELAC</description>
   <requirements>
-    <container type="singularity">docker://registry.forgemia.inra.fr/redelac/redelac-toolbox/sticsrpacks:0faa63e7838a2b86369026bf2e628842d7af9863</container>
+    <container type="singularity">docker://registry.forgemia.inra.fr/redelac/redelac-toolbox/sticsrpacks:fc777963cf7921da512ee8b091f4cebcfd1fbe19</container>
   </requirements>
   <command detect_errors="aggressive">
     <![CDATA[
@@ -10,12 +10,12 @@
 	     #else
                 additional=noAdditionalPlantOrConfig &&
              #end if
-	     #if str( $IterUsmX.IterUsmX ) == 'usmx_one_after_other':
-                parallel=${$IterUsmX.parallel} &&
+	     #if $REDELAC.optim == 'optim':
+                parallel=${$REDELAC.parallel} &&
              #else
-                parallel=parallel &&
+                parallel=sequential &&
              #end if
-	        bash $__tool_directory__/redelacSticsInputGenerator.bash ${IterUsmX.IterUsmX} \${parallel} \${GALAXY_SLOTS:-4} $__tool_directory__ ${Workspace} ${Climat} ${USMs} ${Tec} ${Ini} ${Station} \${additional} ${GeneratedWorkspace} ${compress}
+	        bash $__tool_directory__/redelacSticsInputGenerator.bash ${REDELAC.optim} \${parallel} \${GALAXY_SLOTS:-4} $__tool_directory__ ${Workspace} ${Climat} ${USMs} ${Tec} ${Ini} ${Station} \${additional} ${GeneratedWorkspace} ${compress}
      ]]>
   </command>
   <inputs>
@@ -26,15 +26,15 @@
     <param name="Ini" type="data" format="csv" label="Select the Ini sheet (csv)"/>
     <param name="Station" type="data" format="csv" label="Select the Station sheet (csv)"/>
     <param name="additional" type="data" optional="true" format="zip" label="[optional] Select a zipped archive with folder plant (and or) config (zip file)"/>    
-    <conditional name="IterUsmX">
-      <param name="IterUsmX" type="boolean" checked="true" truevalue="usmx_one_after_other" falsevalue="usmx_at_once"/>
-      <when value="usmx_one_after_other">
-	<param name="parallel" type="boolean" checked="true" truevalue="parallel" falsevalue="sequential"/>
+    <conditional name="REDELAC">
+      <param name="optim" type="boolean" checked="true" truevalue="optim" falsevalue="noptim" label="To speed up the xml2txt conversion process by generating file only once"/>
+      <when value="optim">
+	<param name="parallel" type="boolean" checked="true" truevalue="parallel" falsevalue="sequential" label="To parallelize the xml2txt conversion process" />
       </when>
-	<when value="usmx_at_once">
+	<when value="noptim">
       </when>
     </conditional>
-    <param name="compress" type="boolean" checked="true" truevalue="-6" falsevalue="-0"/>
+    <param name="compress" type="boolean" checked="true" truevalue="-6" falsevalue="-0" label="To compress or not the output(compressing does slow down the job)"/>
   </inputs>
   <outputs>
     <data format="zip" name="GeneratedWorkspace"
@@ -43,6 +43,49 @@
   </outputs>
   <tests>
     <test>
+      <param name="optim" value="false" ftype="boolean" />
+      <param name="Workspace" value="input/sticsBaseWs.zip" ftype="zip" />
+      <param name="Climat" value="input/flatMeteo.zip" ftype="zip" />    
+      <param name="USMs" value="input/USMsSheet.csv" ftype="csv" />
+      <param name="Tec" value="input/TecSheet.csv" ftype="csv" />
+      <param name="Ini" value="input/IniSheet.csv" ftype="csv"/>
+      <param name="Station" value="input/StationsSheet.csv" ftype="csv"/>
+      <output name="GeneratedWorkspace" ftype="zip" >
+	<assert_contents>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-NA-1973-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-NA-1973-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-NA-1974-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-NA-1974-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-NA-1975-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-NA-1975-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-1976-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-1976-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-1977-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-1977-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-2000-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-2000-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-2001-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-2001-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-2002-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-2002-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-2003-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-2003-PP" />
+	  </has_archive_member>
+	  <has_archive_member path="rot8_2\/txt_files\/806_1893-637_NPP1-8-2-PP-ref-2004-PP\/new_travail.usm">
+	    <has_text text="806_1893-637_NPP1-8-2-PP-ref-2004-PP" />
+	  </has_archive_member>
+	</assert_contents>	  
+      </output>
+    </test>
+    <test>
       <param name="parallel" value="false" ftype="boolean" />
       <param name="Workspace" value="input/sticsBaseWs.zip" ftype="zip" />
       <param name="Climat" value="input/flatMeteo.zip" ftype="zip" />    
@@ -174,9 +217,9 @@
     </test>
   </tests>
   <help>
-*The usage of this tool is restricted to the user of the stics_authorized group.*
+*The usage of this tool is restricted to the user of the redelac_authorized group.*
 
-*To be granted, apply to the Project Stics Team and then request to SIWAA*
+*To be granted, apply to the REDELAC Project Team and then request to SIWAA*
 
 Documentation
 -------------