diff XMLValidator.xml @ 9:dba6eb59efc8 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
author galaxyp
date Thu, 27 Aug 2020 19:45:01 -0400
parents 68c2fe7ee7d4
children 75bb0f81cfa3
line wrap: on
line diff
--- a/XMLValidator.xml	Fri May 17 10:12:01 2019 -0400
+++ b/XMLValidator.xml	Thu Aug 27 19:45:01 2020 -0400
@@ -1,42 +1,78 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.-->
 <!--Proposed Tool Section: [Utilities]-->
-<tool id="XMLValidator" name="XMLValidator" version="2.3.0">
+<tool id="XMLValidator" name="XMLValidator" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Validates XML files against an XSD schema.</description>
   <macros>
     <token name="@EXECUTABLE@">XMLValidator</token>
     <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
   </macros>
-  <expand macro="references"/>
+  <expand macro="requirements"/>
   <expand macro="stdio"/>
-  <expand macro="requirements"/>
-  <command detect_errors="aggressive"><![CDATA[XMLValidator
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_schema:
-  -schema $param_schema
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+#if $schema:
+  mkdir schema &&
+  ln -s '$schema' 'schema/${re.sub("[^\w\-_]", "_", $schema.element_identifier)}.$gxy2omsext($schema.ext)' &&
 #end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
+
+## Main program call
+
+set -o pipefail &&
+@EXECUTABLE@ -write_ctd ./ &&
+python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
+@EXECUTABLE@ -ini @EXECUTABLE@.ctd
+-in
+'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
+#if $schema:
+  -schema
+  'schema/${re.sub("[^\w\-_]", "_", $schema.element_identifier)}.$gxy2omsext($schema.ext)'
 #end if
-&gt; $param_stdout
-]]></command>
+| tee '$stdout'
+
+## Postprocessing
+#if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
+  && mv '@EXECUTABLE@.ctd' '$ctd_out'
+#end if]]></command>
+  <configfiles>
+    <inputs name="args_json" data_style="paths"/>
+    <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
   <inputs>
-    <param name="param_in" type="data" format="mzml,mzData,featurexml,mzid,idxml,consensusxml,mzxml,txt,pepxml,traml,xml" optional="False" label="file to validate" help="(-in) "/>
-    <param name="param_schema" type="data" format="txt" optional="True" label="schema to validate against" help="(-schema) &lt;br&gt;If no schema is given, the file is validated against the latest schema of the file type"/>
-    <expand macro="advanced_options">
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
+    <param name="in" argument="-in" type="data" format="consensusxml,featurexml,idxml,mzdata,mzid,mzml,mzxml,pepxml,traml,xml" optional="false" label="file to validate" help=" select consensusxml,featurexml,idxml,mzdata,mzid,mzml,mzxml,pepxml,traml,xml data sets(s)"/>
+    <param name="schema" argument="-schema" type="data" format="xml" optional="true" label="schema to validate against" help="If no schema is given, the file is validated against the latest schema of the file type select xml data sets(s)"/>
+    <expand macro="adv_opts_macro">
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
+      <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
+        <expand macro="list_string_san"/>
+      </param>
     </expand>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true">
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
   </inputs>
   <outputs>
-    <data name="param_stdout" format="txt" label="Output from stdout"/>
+    <data name="stdout" format="txt" label="${tool.name} on ${on_string}: stdout">
+      <filter>OPTIONAL_OUTPUTS is None</filter>
+    </data>
+    <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd">
+      <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
   </outputs>
-  <help>Validates XML files against an XSD schema.
+  <tests>
+    <expand macro="autotest_XMLValidator"/>
+    <expand macro="manutest_XMLValidator"/>
+  </tests>
+  <help><![CDATA[Validates XML files against an XSD schema.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/UTILS_XMLValidator.html</help>
+For more information, visit http://www.openms.de/documentation/UTILS_XMLValidator.html]]></help>
+  <expand macro="references"/>
 </tool>