Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #41

Merged
merged 8 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 61 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,33 @@
#
version: 2.1
orbs:
node: circleci/node@4.7.0
node: circleci/node@5.0.2
workflows:
compile-workflow:
jobs:
- compile:
context:
- DOCKER_CONTEXT

- test_and_coverage_jvm:
requires:
- compile
context:
- DOCKER_CONTEXT

- planemo_stage:
context:
- DOCKER_CONTEXT
filters:
tags:
ignore: /.*/
branches:
only:
- develop
- main
- master
- publish_snapshot:
requires:
- test_and_coverage_jvm
- planemo_stage
context:
- DOCKER_CONTEXT
- CREDENTIAL_CONTEXT
Expand Down Expand Up @@ -89,7 +99,15 @@ executors:
auth:
username: ${DOCKER_USER}
password: ${DOCKER_PASS}


python:
working_directory: ~/planemo
docker:
- image: cimg/python:3.10.1 # primary container for the build job
auth:
username: ${DOCKER_USER}
password: ${DOCKER_PASS}

docker-publisher:
docker:
- image: circleci/buildpack-deps:stretch
Expand Down Expand Up @@ -141,7 +159,45 @@ jobs:

- store_artifacts:
path: target/test-reports


planemo_stage:
executor: python
steps:
- checkout
- setup_remote_docker
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.sbt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Test P2M2 tools for Galaxy
command: |
cd galaxy
pip install planemo
for directory in $(ls -d ls -d */ | awk '!/docker/ {print $0}')
do
echo " == $directory == "
pushd $directory
planemo l --fail_level error
popd
done
- run:
name: Run on fail status
command: |
mkdir -p /tmp/html_reports
cp $(find ./galaxy/ -name *.html -type f) /tmp/html_reports/
mkdir -p /tmp/json_reports
cp $(find ./galaxy/ -name *.json -type f) /tmp/json_reports/
when: on_fail

- store_artifacts:
path: /tmp/html_reports/tool_test_output.html
destination: artifacts-planemo-reports-html
- store_artifacts:
path: /tmp/json_reports/tool_test_output.json
destination: artifacts-planemo-reports-json

publish_snapshot:
executor: openjdk
steps:
Expand Down
14 changes: 9 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@ scmInfo := Some(
)

versionScheme := Some("early-semver")

val static_version = "0.1.7"
val static_version = "0.1.8"
val version_build = scala.util.Properties.envOrElse("PROG_VERSION", static_version )

version := version_build

libraryDependencies += "com.lihaoyi" %% "utest" % "0.7.10" % "test"
libraryDependencies += "com.lihaoyi" %% "utest" % "0.7.11" % "test"
libraryDependencies += "com.github.scopt" %% "scopt" % "4.0.1"

// Coverage

coverageMinimumStmtTotal := 98
coverageFailOnMinimum := false
coverageMinimumStmtTotal := 97
coverageMinimumBranchTotal := 93
coverageMinimumStmtPerPackage := 93
coverageMinimumBranchPerPackage := 93
coverageMinimumStmtPerFile := 93
coverageMinimumBranchPerFile := 93
coverageFailOnMinimum := true
coverageHighlighting := true

// Publication
Expand Down
4 changes: 2 additions & 2 deletions galaxy/docker_env_exemple/gcms2isocor.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<tool id="gcms2isocor" name="Conversion GCMS PostRun Analysis to IsoCor" version="1.0.0">
<requirements>
<container type="docker">inraep2m2/p2m2tools:0.1.5</container>
<container type="docker">inraep2m2/p2m2tools:0.1.7</container>
</requirements>
<command detect_errors="exit_code"><![CDATA[
p2m2tools fr.inrae.metabolomics.p2m2.command.GCMS2IsocorCommand
p2m2tools fr.inrae.metabolomics.p2m2.command.GCMS2IsocorCommand
#for $input in $input_gcms_files
#if $input
$input
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion galaxy/gcms2isocor/gcms2isocor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<requirement type="package" version="8.0.121">openjdk</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
java -cp '$__tool_directory__/P2M2WorkflowsTools-assembly-0.1.4.jar' fr.inrae.metabolomics.p2m2.GCMS2IsocorCommand
java -cp '$__tool_directory__/P2M2Tools-assembly-0.1.7.jar' fr.inrae.metabolomics.p2m2.command.GCMS2IsocorCommand
#for $input in $input_gcms_files
#if $input
$input
Expand Down
Binary file not shown.
14 changes: 9 additions & 5 deletions galaxy/masslynx2isocor/masslynx2isocor.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
<tool id="masslynx2isocor" name="Conversion MassLynx [Quantify Compound Summary Report] to IsoCor" version="0.1.0" profile="20.09">
<tool id="masslynx2isocor" name="Conversion MassLynx [Quantify Compound Summary Report] to IsoCor" version="0.1.1" profile="20.09">
<requirements>
<requirement type="package" version="8.0.121">openjdk</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
java -cp '$__tool_directory__/P2M2Tools-assembly-0.1.7.jar' fr.inrae.metabolomics.p2m2.command.MassLynx2IsocorCommand
java -cp '$__tool_directory__/P2M2Tools-assembly-0.1.8.jar' fr.inrae.metabolomics.p2m2.command.MassLynx2IsocorCommand
#for $input in $input_masslynx_files
#if $input
$input
#end if
#end for
-d '$input_corr_derivatives' --out '$output_isocor'
-d '$input_corr_derivatives' -m '$input_corr_metabolites' --out_13C '$output_isocor_13C' --out_15N '$output_isocor_15N'
]]></command>
<inputs>
<param type="data" name="input_masslynx_files" multiple="true" format="txt" />
<param type="data" name="input_corr_derivatives" multiple="false" format="txt" />
<param type="data" name="input_corr_metabolites" multiple="false" format="tabular" />
</inputs>
<outputs>
<data name="output_isocor" format="tabular" />
<data name="output_isocor_13C" format="tabular" />
<data name="output_isocor_15N" format="tabular" />
</outputs>
<tests>
<test>
<param name="input_masslynx_files" value="mass_15Ngly.txt"/>
<param name="input_corr_derivatives" value="correspondence_derivatives.txt"/>
<output name="output_isocor" file="input_isocor.tsv"/>
<param name="input_corr_metabolites" value="Metabolites.dat"/>
<output name="output_isocor_13C" file="isocor_input_13C.tsv"/>
<output name="output_isocor_15N" file="isocor_input_15N.tsv"/>
</test>
</tests>
<help><![CDATA[
Expand Down
25 changes: 25 additions & 0 deletions galaxy/masslynx2isocor/test-data/Metabolites.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name formula charge
His C6H9N3O2 1
Asn C4H8N2O3 1
SMCSO C4H9NO3S 1
Ser C3H7NO3 1
Gln C5H10N2O3 1
Arg C6H14N4O2 1
Gly C2H5NO2 1
Asp C4H7NO4 1
Glu C5H9NO4 1
b-Ala C3H7NO2 1
Thr C4H9NO3 1
a-Ala C3H7NO2 1
GABA C4H9NO2 1
Pro C5H9NO2 1
SMC C4H9NO2S 1
Orn C5H12N2O2 1
Lys C6H14N2O2 1
Tyr C9H11NO3 1
Met C5H11NO2S 1
Val C5H11NO2 1
Ile C6H13NO2 1
Leu C6H13NO2 1
Phe C9H11NO2 1
Try C11H12N2O2 1
Loading