view planemotest/planemotest.xml @ 1:0183cad9d13b draft

planemo upload
author fubar
date Thu, 22 Feb 2024 10:48:01 +0000
parents
children
line wrap: on
line source

<tool name="planemotest" id="planemotest" version="0.01">
  <!--Source in git at: https://github.com/fubar2/galaxy-->
  <!--Created by toolfactory@galaxy.org at 25/05/2023 01:04:53 using the Galaxy Tool Factory.-->
  <description>Tests a ToolFactory archive containing a new tool</description>
  <requirements>
    <requirement version="0.75.18" type="package">planemo</requirement>
  </requirements>
  <stdio>
    <exit_code range="1:" level="fatal"/>
  </stdio>
  <version_command><![CDATA[echo "0.01"]]></version_command>
  <command><![CDATA[bash
$runme
$Toolshed_archive_to_be_tested
$test_output]]></command>
  <configfiles>
    <configfile name="runme"><![CDATA[#raw

### script for ToolFactory toolshed archive test tool
mkdir testout
tar -xvf $1
TOOLNAME=`find . -name "*.xml"`
FIXED=$(basename "$TOOLNAME" | cut -d. -f1)
REP=testout/"$FIXED"_planemo_test_report.html
planemo test --update_test_data  --test_output $REP $TOOLNAME > STDOUT
cp $REP $2

#end raw]]></configfile>
  </configfiles>
  <inputs>
    <param name="Toolshed_archive_to_be_tested" type="data" optional="false" label="Toolshed archive to be tested" help="" format="tgz" multiple="false"/>
  </inputs>
  <outputs>
    <data name="test_output" format="html" label="test_output" hidden="false"/>
  </outputs>
  <tests>
    <test>
      <output name="test_output" value="test_output_sample" compare="diff" lines_diff="5"/>
      <param name="Toolshed_archive_to_be_tested" value="Toolshed_archive_to_be_tested_sample"/>
    </test>
  </tests>
  <help><![CDATA[

**What it Does**

Tests a tool archive with Planemo

Runs planemo test and returns a toolshed archive updated with test outputs and a Planemo test result.

NOTE: First run takes 5+ minutes as Planemo is installed by Conda.
The second and subsequent runs don't have that startup time.

Dogfood demonstration - this tool was generated with the ToolFactory and is included as a sample of what's possible and potentially useful.

------


Script::

    ### script for ToolFactory toolshed archive test tool
    mkdir testout
    tar -xvf $1
    TOOLNAME=`find . -name "*.xml"`
    FIXED=$(basename "$TOOLNAME" | cut -d. -f1)
    LOG=testout/"$FIXED"_planemo_test_log.txt
    REP=testout/"$FIXED"_planemo_test_report.html
    echo "using $LOG and $REP"
    echo "## Found toolname = $TOOLNAME" > $LOG
    planemo test --update_test_data  --test_output $REP $TOOLNAME >> $LOG
    cp $REP $2

]]></help>
  <citations>
    <citation type="doi">10.1093/bioinformatics/bts573</citation>
  </citations>
</tool>