galaxyproject / galaxyproject/planemo
planemo test not handling tool-data/example.loc.sample
- Dominant language
- Python
- Stars
- 110
- Forks
- 102
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 13
Description
See also #96 for linting. Since switching to `planemo test`, I have been having problems with `planemo test` on TravisCI.
``` xml
```
I provide file `tool-data/effectiveT3.loc.sample` and expect Galaxy or `planemo test` to auto-generate `tool-data/effectiveT3.loc` but it does not, resulting in a test failure, e.g.
https://travis-ci.org/peterjc/pico_galaxy/jobs/150084912
```
======================================================================
ERROR: Effective T3 ( effectiveT3 ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/peterjc/pico_galaxy/galaxy-dev/test/functional/test_toolbox.py", line 299, in test_tool
self.do_it( td )
File "/home/travis/build/peterjc/pico_galaxy/galaxy-dev/test/functional/test_toolbox.py", line 60, in do_it
raise e
RunToolException: Error creating a job for these tool inputs - Parameter module requires a value, but has no legal values defined.
-------------------- >> begin captured logging << --------------------
```
Running locally, `planemo test tools/effectiveT3/effectiveT3.xml` works when it uses the local Galaxy install's `tool-data/effectiveT3.loc` - but it will successful regenerate it from the sample if I remove it:
```
$ mv /mnt/galaxy/galaxy-central/tool-data/effectiveT3.loc /mnt/galaxy/galaxy-central/tool-data/effectiveT3.loc.bak
$ planemo test tools/effectiveT3/effectiveT3.xml
...
Initializing tool-data/effectiveT3.loc from effectiveT3.loc.sample...
...
All 3 test(s) executed passed.
effectiveT3[0]: passed
effectiveT3[1]: passed
effectiveT3[2]: passed
$ diff /mnt/galaxy/galaxy-central/tool-data/effectiveT3.loc.bak /mnt/galaxy/galaxy-central/tool-data/effectiveT3.loc
$ planemo --version
planemo, version 0.24.0.dev0
```
This is running an old planemo 0.24.0dev0 and old Galaxy release_15.10, so the problem on TravisCI could be a regression in either?
I can workaround this on TravisCI using https://github.com/peterjc/pico_galaxy/commit/da75fc4ab1279493acb9b1b8a29910e027ba0e31 (now on master branch), see https://travis-ci.org/peterjc/pico_galaxy/builds/151178750 (test branch) and https://travis-ci.org/peterjc/pico_galaxy/builds/151184006 (master branch)
```
$ git show
commit da75fc4ab1279493acb9b1b8a29910e027ba0e31
Author: peterjc
Date: Wed Aug 10 11:49:32 2016 +0100
Explicitly generate tool-data/*.loc from *.loc.sample
diff --git a/.travis.yml b/.travis.yml
index 1570b92..cfc644a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,6 +125,8 @@ install:
- for i in $( ls ${TRAVIS_BUILD_DIR}/tools/ ); do ln -s ${TRAVIS_BUILD_DIR}/tools/$i/ tools/$i ; done
- ln -s ${TRAVIS_BUILD_DIR}/.travis.datatypes_conf.xml datatypes_conf.xml
- cp ${TRAVIS_BUILD_DIR}/test-data/* test-data/
+# Explicitly use sample files to generate default *.loc files
+ - for f in ${TRAVIS_BUILD_DIR}/tool-data/*.loc.sample; do cp "$f" "${f%.sample}"; done
- cp ${TRAVIS_BUILD_DIR}/tool-data/* tool-data/
- bash scripts/common_startup.sh --no-create-venv --dev-wheels
```
Contributor guide
Research direction
Start with the `planemo test tools/effectiveT3/effectiveT3.xml` reproduction and compare the local Galaxy run with TravisCI. Inspect how `tool-data/*.loc.sample` files are handled during test setup, using `.travis.yml` and `tools/effectiveT3/effectiveT3.xml` as references. Done means the sample generates the required `.loc` file during `planemo test` without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100