mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge pull request #2662 from jmchilton/backport_2253
[16.04] Backport #2253 as requested by Eagle Eyes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
.venv/
|
||||
.tox/
|
||||
client/
|
||||
database/
|
||||
doc/patch.py
|
||||
|
||||
@@ -1677,7 +1677,7 @@ class JobWrapper( object ):
|
||||
if metadata_tool is not None:
|
||||
# Due to tool shed hacks for migrate and installed tool tests...
|
||||
# see (``setup_shed_tools_for_test`` in test/base/driver_util.py).
|
||||
dependency_shell_commands = metadata_tool.build_dependency_shell_commands(job_directory=self.working_directory)
|
||||
dependency_shell_commands = metadata_tool.build_dependency_shell_commands(job_directory=self.working_directory, metadata=True)
|
||||
if dependency_shell_commands:
|
||||
dependency_shell_commands = "; ".join(dependency_shell_commands)
|
||||
command = "%s; %s" % (dependency_shell_commands, command)
|
||||
|
||||
@@ -1252,13 +1252,14 @@ class Tool( object, Dictifiable ):
|
||||
visit_input_values( self.inputs, values, validate_inputs )
|
||||
return messages
|
||||
|
||||
def build_dependency_shell_commands( self, job_directory=None ):
|
||||
def build_dependency_shell_commands( self, job_directory=None, metadata=False ):
|
||||
"""Return a list of commands to be run to populate the current environment to include this tools requirements."""
|
||||
return self.app.toolbox.dependency_manager.dependency_shell_commands(
|
||||
self.requirements,
|
||||
installed_tool_dependencies=self.installed_tool_dependencies,
|
||||
tool_dir=self.tool_dir,
|
||||
job_directory=job_directory,
|
||||
metadata=metadata,
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
@@ -125,7 +125,12 @@ class CondaDependencyResolver(DependencyResolver, ListableDependencyResolver, In
|
||||
return INDETERMINATE_DEPENDENCY
|
||||
|
||||
# Have installed conda_target and job_directory to send it too.
|
||||
conda_environment = os.path.join(job_directory, "conda-env")
|
||||
# If dependency is for metadata generation, store environment in conda-metadata-env
|
||||
if kwds.get("metadata", False):
|
||||
conda_env = "conda-metadata-env"
|
||||
else:
|
||||
conda_env = "conda-env"
|
||||
conda_environment = os.path.join(job_directory, conda_env)
|
||||
env_path, exit_code = build_isolated_environment(
|
||||
conda_target,
|
||||
path=conda_environment,
|
||||
|
||||
@@ -7,7 +7,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from galaxy.util import hash_util
|
||||
from galaxy.util import unicodify
|
||||
from galaxy.util.json import safe_dumps as dumps # noqa (used by mako templates)
|
||||
from galaxy.util.json import safe_dumps as dumps # Used by mako templates # noqa: F401
|
||||
from webhelpers import date
|
||||
from webhelpers.html.tags import stylesheet_link, javascript_link
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ def setup_shed_tools_for_test(app, tmpdir, testing_migrated_tools, testing_insta
|
||||
tool_configs.remove(relative_migrated_tool_panel_config)
|
||||
for installed_tool_panel_config in INSTALLED_TOOL_PANEL_CONFIGS:
|
||||
tool_configs.append(installed_tool_panel_config)
|
||||
from galaxy import tools # noqa, delay import because this brings in so many modules for small tests
|
||||
from galaxy import tools # delay import because this brings in so many modules for small tests # noqa
|
||||
app.toolbox = tools.ToolBox(tool_configs, app.config.tool_path, app)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user