Skip to content

Planemo no longer correctly tests some tools that have Python dependencies #377

@gregvonkuster

Description

@gregvonkuster

I believe the recent introduction of support for Galaxy wheels, probably around this revision 25ef0d5, eliminated the ability to use planemo to test tools that have Python dependencies. This is probably due to the introduction of venv.

Scenario to reproduce:

  1. Install package_anaconda_2_3_0, (Add recipe for installing Anaconda 2.3.0. tools-iuc#386) and in manually source the env.sh file:. Your default Python will then be the Python 2.7.10 that comes with the installed Anaconda package, and you will be able to import matplotlib.
$ . env.sh
$ which python
/Users/gvk/work/ts_install/tool_dependency_dir/anaconda/2.3.0/iuc/package_anaconda_2_3_0/4b2e8e0c3e0e/bin/python
dot1x-cb-24:4b2e8e0c3e0e gvk$ python
Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, May 28 2015, 17:04:42) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import matplotlib
>>> 
  1. Within the same environment in which you've just sourced the env.sh file for Anaconda, use planemo to test a tool that has a dependency on the package_anaconda_2_3_3 package, and matplotlib will not be found.
$ planemo test ./cwpair2.xml
Testing using galaxy_root ...
...
FAIL

======================================================================
FAIL: CWPair2 ( cwpair2 ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/gvk/work/git_workspace/galaxy/test/functional/test_toolbox.py", line 289, in test_tool
    self.do_it( td )
  File "/Users/gvk/work/git_workspace/galaxy/test/functional/test_toolbox.py", line 73, in do_it
    raise e
JobOutputsError: Job in error state.
Job in error state.
Failed to find identifier [closest_S_data_1_f0u25d100b1] for testing, tool generated collection elements [[]]
Failed to find identifier [largest_S_data_1_f0u25d100b1] for testing, tool generated collection elements [[]]
Failed to find identifier [mode_S_data_1_f0u25d100b1] for testing, tool generated collection elements [[]]
-------------------- >> begin captured stdout << ---------------------
History with id 2891970512fa2d5a in error - summary of datasets in error below.
--------------------------------------
| 5 - Statistics: CWPair2 on data 1 (HID - NAME) 
| Dataset Blurb:
|  error
| Dataset Info:
|  Traceback (most recent call last):
|  File "/Users/gvk/work/git_workspace/galaxy/tools/pugh/cwpair2/cwpair2.py", line 17, in <module>
|  import cwpair2_util
|  File "/Users/gvk/work/git_workspace/galaxy/tools/pugh/cwpair2/cwpair2_util.py", line 6, in <mod
| Dataset Job Standard Output:
|  *Standard output was empty.*
| Dataset Job Standard Error:
|  Traceback (most recent call last):
|  File "/Users/gvk/work/git_workspace/galaxy/tools/pugh/cwpair2/cwpair2.py", line 17, in <module>
|  import cwpair2_util
|  File "/Users/gvk/work/git_workspace/galaxy/tools/pugh/cwpair2/cwpair2_util.py", line 6, in <module>
|  import matplotlib
|  ImportError: No module named matplotlib
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions