Skip to content

Commit

Permalink
add travis and git files
Browse files Browse the repository at this point in the history
  • Loading branch information
jsaintvanne committed May 20, 2019
1 parent e9f7761 commit 024b2c9
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tool_test_output.html
tool_test_output.json
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
# See http://travis-ci.org/ for details
language: python

before_install:
- export WRAPPER_REPO="galaxy/metaMS"
- export GALAXY_RELEASE="release_17.01"
- export PLANEMO_RELEASE="0.37.0"
env:
- TESTFOLDER=tools/metaMS_runGC
- TESTFOLDER=tools/metaMS_plot

install:
before_install:
- sudo apt-get install -y python-virtualenv
- virtualenv planemo-venv
- . planemo-venv/bin/activate
- pip install --upgrade pip setuptools
- pip install planemo==$PLANEMO_RELEASE
- pip install planemo==0.58.1

# @TODO: remove ASAP
# The issue: https://github.com/galaxyproject/planemo/issues/865
install:
- for LINK in $(find ${TRAVIS_BUILD_DIR}/${TESTFOLDER}/test-data/ -type l -exec ls {} \;); do REALPATH=$(readlink -f $LINK); rm -f $LINK; cp $REALPATH $LINK; done
script:
- planemo lint "${TRAVIS_BUILD_DIR}/${WRAPPER_REPO}"
- planemo test --conda_auto_init --conda_auto_install --conda_dependency_resolution --galaxy_branch "$GALAXY_RELEASE" --no_cache_galaxy "${TRAVIS_BUILD_DIR}/${WRAPPER_REPO}"
- planemo lint "${TRAVIS_BUILD_DIR}/${TESTFOLDER}"
- planemo test --galaxy_branch release_18.05 --no_cache_galaxy "${TRAVIS_BUILD_DIR}/${TESTFOLDER}"

77 changes: 77 additions & 0 deletions tools/macro/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0"?>

<macros>

<xml name="stdio">
<stdio>
<exit_code range="1" level="fatal" />
</stdio>
</xml>

<xml name="requirements">
<requirements>
<requirement type="package" version="1.18.1">bioconductor-metams</requirement>
<requirement type="package" version="1.1_4">r-batch</requirement>
</requirements>
</xml>

<xml name="input_file_load">
<section name="file_load_section" title="Resubmit your raw dataset or your zip file">
<conditional name="file_load_conditional">
<param name="file_load_select" type="select" label="Resubmit your dataset or your zip file" help="Use only if you get a message saying that your original dataset or zip file have been deleted on the server." >
<option value="no" >no need</option>
<option value="yes" >yes</option>
</param>
<when value="no">
</when>
<when value="yes">
<param name="input" type="data" format="mzxml,mzml,mzdata,netcdf,no_unzip.zip,zip" multiple="true" label="File(s) from your history containing your chromatograms" help="Single file mode for the format: mzxml, mzml, mzdata and netcdf. Zip file mode for the format: no_unzip.zip, zip. See the help section below." />
</when>
</conditional>
</section>
</xml>

<!--<xml name="test_file_load_alg">
<section name="file_load_section">
<conditional name="file_load_conditional">
<param name="file_load_select" value="yes" />
<param name="input" value="RawFilesTest_alg2_t.mzData,RawFilesTest_alg3_t.mzData,RawFilesTest_alg7_t.mzData,RawFilesTest_alg8_t.mzData,RawFilesTest_alg9_t.mzData,RawFilesTest_alg11_t.mzData" ftype="mzdata" />
</conditional>
</section>
</xml>-->

<xml name="test_file_load_alg_symlink">
<section name="file_load_section">
<conditional name="file_load_conditional">
<param name="file_load_select" value="yes" />
<param name="input" value="RawFilesTest_alg2.mzData,RawFilesTest_alg3.mzData,RawFilesTest_alg7.mzData,RawFilesTest_alg8.mzData,RawFilesTest_alg9.mzData,RawFilesTest_alg11.mzData" ftype="mzdata" />
</conditional>
</section>
</xml>

<!-- COMMAND -->
<token name="@COMMAND_RSCRIPT@">LC_ALL=C Rscript $__tool_directory__/</token>

<token name="@COMMAND_LOG_EXIT@">
;
return=\$?;
cat 'log.txt';
sh -c "exit \$return"
</token>

<!-- FILE_LOAD for planemo test -->
<!-- Change | for , because I use it in metaMS tool -->
<token name="@COMMAND_FILE_LOAD@">
#if $file_load_section.file_load_conditional.file_load_select == "yes":
#if $file_load_section.file_load_conditional.input[0].is_of_type("mzxml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzdata") or $file_load_section.file_load_conditional.input[0].is_of_type("netcdf"):
#set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_section.file_load_conditional.input ] )
#set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_section.file_load_conditional.input ] )

singlefile_galaxyPath '$singlefile_galaxyPath' singlefile_sampleName '$singlefile_sampleName'
#else
zipfile '$file_load_section.file_load_conditional.input'
#end if
#end if
</token>

</macros>

0 comments on commit 024b2c9

Please sign in to comment.