-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --skip_venv flag for conda, other cases.
Fixes #377 ... or makes it possible to fix it anyway. To preserve conda's environment for test execution run planemo, first install Galaxy's depndencies into the conda environment using: % cd $GALAXY_ROOT % pip install requirements.txt % pip install -r lib/galaxy/dependencies/dev-requirements.txt Then run planemo test, serve, etc... with the --skip_venv flag. % planemo test --skip_venv .
- Loading branch information
Showing
3 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @jmchilton
9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first command should probably be:
But even than it's not working, because some requirements are only available on Galaxy depot. In this case the following command would be useful.
But even that is not working for me, because a few packages could not be found. @gregvonkuster is it working for you?
9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conda FAQ:
You can absolutely not install planemo via conda and run Galaxy inside the conda environment currently.
galaxy-lib is a dependency of planemo and having this on the Python path prevents correct operation of Galaxy.
How do I enable conda dependency resolution within Galaxy tools (install conda dependencies corresponding to
requirement
tags)?Just install planemo normally via pip into a virtual environment or via brew and use the appropriate commands and options:
The test and serve commands above require the target Galaxy to be 16.01 or higher, the default target is still 15.10 so the above command is assuming galaxy_root has been overridden to
~/.planemo.yml
.How do I manually install some conda dependencies and test my tools using them in Galaxy.
This is an advanced technique and I'd frankly discourage it currently, but should be possible.
planemo must be installed outside the conda environment - via pip into a virtual environment or via homebrew. In the former case, don't place the virtualenv's
bin
directory on your PATH - it will conflict with conda. Just reference planemo directly/path/to/planemo_venv/bin/planemo test
.To run Galaxy from within the environment you will need to install Galaxy dependencies into the conda environment. I'd absolutely recommend targeting the development branch of Galaxy for this since it has "unpinned" dependencies that are easier to fullfill for conda.
A small test script in the planemo source tree demonstrates this https://github.com/galaxyproject/planemo/blob/master/tests/scripts/conda_test.sh.
9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bgruening Absolutely - I missed up those pip calls are not a good way to get Galaxy dependencies into your virtualenv. I created a short FAQ above, which should land up in planemo's docs at some point once we all like it based on the problems we discussed out of band and here. In the FAQ I recommend installing numpy and a couple other big dependencies using conda directly and then install the rest using
common_startup.sh
so the correct index is available.9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will test again. The
--skip_venv
was also misleading in my case.9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a test script that demonstrates (and tests) my answer to question 2 above - lets call this running planemo around conda.
https://github.com/galaxyproject/planemo/blob/master/tests/scripts/conda_test.sh
If anyone really cares about the use case, feel free to extend the example in either of these directions:
requires that something for the tool test to path.
9f3957d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved above comment (with cleanup language) to the README.