From 5818bbcbaaeca54a85bef9acaadd41d12386a6ad Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 3 Mar 2017 12:54:41 -0500 Subject: [PATCH 1/2] Prefer versioned Conda dependencies to unversioned Galaxy ones. --- config/dependency_resolvers_conf.xml.sample | 40 +++++++++++---------- lib/galaxy/tools/deps/__init__.py | 2 +- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/config/dependency_resolvers_conf.xml.sample b/config/dependency_resolvers_conf.xml.sample index 243fff0cdc8..cbc78951db7 100644 --- a/config/dependency_resolvers_conf.xml.sample +++ b/config/dependency_resolvers_conf.xml.sample @@ -1,28 +1,32 @@ - + - + - + + + + - - + - + - \ No newline at end of file + --> + diff --git a/lib/galaxy/tools/deps/__init__.py b/lib/galaxy/tools/deps/__init__.py index cc42d83cd92..0c568ea2fb6 100644 --- a/lib/galaxy/tools/deps/__init__.py +++ b/lib/galaxy/tools/deps/__init__.py @@ -198,8 +198,8 @@ class DependencyManager( object ): return [ ToolShedPackageDependencyResolver(self), GalaxyPackageDependencyResolver(self), - GalaxyPackageDependencyResolver(self, versionless=True), CondaDependencyResolver(self), + GalaxyPackageDependencyResolver(self, versionless=True), CondaDependencyResolver(self, versionless=True), ] From 45971b29bd8b93825fe48134750bd866c82f7a9f Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 10 Mar 2017 16:08:57 -0500 Subject: [PATCH 2/2] Update dependency resolver docs for new default order --- doc/source/admin/dependency_resolvers.rst | 41 ++++++++++++----------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/doc/source/admin/dependency_resolvers.rst b/doc/source/admin/dependency_resolvers.rst index c74bcf3c2dd..0d6930d1ef7 100644 --- a/doc/source/admin/dependency_resolvers.rst +++ b/doc/source/admin/dependency_resolvers.rst @@ -6,10 +6,12 @@ Dependency Resolvers in Galaxy There are two parts to building a link between Galaxy and command line bioinformatics tools: the tool XML that specifies a mapping between the Galaxy web user interface and the tool command line and tool dependencies that specify -how to source the actual packages that implement the tool’s commands. The final script that Galaxy submits to run a -job uses includes commands, such as changes to the ``PATH`` environment variable, that are generated by *dependency -resolvers*. There is a default dependency resolver configuration but administrators can provide their own configuration -using the ``dependency_resolvers_conf.xml`` configuration file in the Galaxy ``config/`` directory. +how to source the actual packages that implement the tool’s commands. The final script that Galaxy submits to run a job +uses includes commands, such as changes to the ``PATH`` environment variable, that are generated by *dependency +resolvers*. These same dependency resolvers are used by the Galaxy administrative UI to display whether an installed +tool's dependencies have been installed on the Galaxy server, and to show how they will be resolved at job runtime. +There is a default dependency resolver configuration but administrators can provide their own configuration using the +``dependency_resolvers_conf.xml`` configuration file in the Galaxy ``config/`` directory. The binding between tool XML and the tools they need to run is specified in the tool XML using ```` tags, for example @@ -34,30 +36,31 @@ The default configuration of dependency resolvers is equivalent to the following .. code-block:: xml - - - - + -This default dependency resolver configuration contains five items. First, the *tool shed dependency resolver* is used, -then the *Galaxy packages dependency resolver* is used (initially looking for packages by name and version string and then looking for the package just by name), and finally it checks *Conda* for a versioned or unversioned match. -The default configuration thus prefers packages installed from the Galaxy Tool Shed using legacy ``tool_dependencies.xml`` -files, before trying to find a "Galaxy package" satisfying the specific version the dependency requires before -falling back to looking for a Galaxy package with merely the correct name, and then looking for Conda recipes with -matching name and version, and finally just for a Conda package with the correct name. If any of the dependency -resolvers succeeds a dependency resolution object is returned and no more resolvers are called. This dependency -resolution object provides shell commands to prepend to the shell script that runs the tool. +This default dependency resolver configuration contains five items: + +1. First, the *Tool Shed dependency resolver* is used, which resolves packages installed from the Galaxy Tool Shed + using legacy ``tool_dependencies.xml`` files, +2. then the *Galaxy packages dependency resolver* is checked for a package matching the requirement name and version, +3. then the *Conda dependency resolver* is checked for a package matching the requirement name and version. If no + versioned match can be found, it then moves on to searching for unversioned matches, that is, +4. the *Galaxy packages dependency resolver* is checked for a package matching the required name only, and +5. finally the *Conda dependency resolver* is checked for a package matching the required name only. + +If any of the dependency resolvers succeeds a dependency resolution object is returned and no more resolvers are +called. This dependency resolution object provides shell commands to prepend to the shell script that runs the tool. This order can be thought of as a descending order of deliberation. Tool Shed dependencies must be declared next to the tool by the tool author and must be selected for installation at tool installation time - this requires specific actions -by both the tool author and the deployer who installed the tools. The dependency is therefore expected to highly craft -to the individual tool. If Galaxy packages have been setup, the deployer of a Galaxy tool has purposely crafted tool -dependency statements for a specific installation - this is slightly less deliberate than tool shed packages but +by both the tool author and the deployer who installed the tools. The dependency is therefore expected to highly +crafted to the individual tool. If Galaxy packages have been setup, the deployer of a Galaxy tool has purposely crafted +tool dependency statements for a specific installation - this is slightly less deliberate than tool shed packages but such requirements are less likely to be incidentally resolved than Conda packages. Conda recipes are neither tied to tools or a specific installation and are maintained in Conda channels such as Bioconda.