mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_16.01' into dev
This commit is contained in:
+5
-3
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -d .venv ];
|
||||
: ${GALAXY_VIRTUAL_ENV:=.venv}
|
||||
|
||||
if [ -d "$GALAXY_VIRTUAL_ENV" ];
|
||||
then
|
||||
printf "Activating virtualenv at %s/.venv\n" $(pwd)
|
||||
. .venv/bin/activate
|
||||
printf "Activating virtualenv at $GALAXY_VIRTUAL_ENV\n"
|
||||
. "$GALAXY_VIRTUAL_ENV/bin/activate"
|
||||
fi
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
@@ -771,6 +771,7 @@ class JobWrapper( object ):
|
||||
if use_persisted_destination:
|
||||
self.job_runner_mapper.cached_job_destination = JobDestination( from_job=job )
|
||||
|
||||
self.__commands_in_new_shell = self.app.config.commands_in_new_shell
|
||||
self.__user_system_pwent = None
|
||||
self.__galaxy_system_pwent = None
|
||||
|
||||
@@ -803,13 +804,19 @@ class JobWrapper( object ):
|
||||
def shell(self):
|
||||
return self.job_destination.shell or getattr(self.app.config, 'default_job_shell', DEFAULT_JOB_SHELL)
|
||||
|
||||
def disable_commands_in_new_shell(self):
|
||||
"""Provide an extension point to disable this isolation,
|
||||
Pulsar builds its own job script so this is not needed for
|
||||
remote jobs."""
|
||||
self.__commands_in_new_shell = False
|
||||
|
||||
@property
|
||||
def strict_shell(self):
|
||||
return self.tool.strict_shell
|
||||
|
||||
@property
|
||||
def commands_in_new_shell(self):
|
||||
return self.app.config.commands_in_new_shell
|
||||
return self.__commands_in_new_shell
|
||||
|
||||
@property
|
||||
def galaxy_lib_dir(self):
|
||||
|
||||
@@ -278,6 +278,7 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
compute_tool_directory=remote_tool_directory,
|
||||
compute_job_directory=remote_job_directory,
|
||||
)
|
||||
job_wrapper.disable_commands_in_new_shell()
|
||||
command_line = build_command(
|
||||
self,
|
||||
job_wrapper=job_wrapper,
|
||||
|
||||
+5
-3
@@ -5,10 +5,12 @@
|
||||
# sh manage_db.sh downgrade --version=3 <tool_shed if using that webapp - galaxy is the default>
|
||||
#######
|
||||
|
||||
if [ -d .venv ];
|
||||
: ${GALAXY_VIRTUAL_ENV:=.venv}
|
||||
|
||||
if [ -d "$GALAXY_VIRTUAL_ENV" ];
|
||||
then
|
||||
printf "Activating virtualenv at %s/.venv\n" $(pwd)
|
||||
. .venv/bin/activate
|
||||
printf "Activating virtualenv at $GALAXY_VIRTUAL_ENV\n"
|
||||
. "$GALAXY_VIRTUAL_ENV/bin/activate"
|
||||
fi
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
@@ -388,16 +388,23 @@ from galaxy.jobs.actions.post import ActionBox
|
||||
import re
|
||||
import colorsys
|
||||
import random
|
||||
from six import string_types
|
||||
|
||||
def get_wf_parms(v, wf_parms):
|
||||
if isinstance(v, dict):
|
||||
[ get_wf_parms(value, wf_parms) for value in v.values() ]
|
||||
elif isinstance(v, string_types):
|
||||
for rematch in re.findall('\$\{.+?\}', v):
|
||||
if rematch[2:-1] not in wf_parms:
|
||||
wf_parms[rematch[2:-1]] = ""
|
||||
|
||||
used_accumulator = []
|
||||
|
||||
wf_parms = {}
|
||||
|
||||
for step in steps:
|
||||
for v in [ActionBox.get_short_str(pja) for pja in step.post_job_actions] + step.state.inputs.values():
|
||||
if isinstance(v, basestring):
|
||||
for rematch in re.findall('\$\{.+?\}', v):
|
||||
if rematch[2:-1] not in wf_parms:
|
||||
wf_parms[rematch[2:-1]] = ""
|
||||
get_wf_parms(v, wf_parms)
|
||||
|
||||
if wf_parms:
|
||||
hue_offset = 1.0 / len(wf_parms)
|
||||
hue = 0.0
|
||||
|
||||
@@ -12,9 +12,6 @@ from galaxy.util.bunch import Bunch
|
||||
from galaxy.tools import evaluation
|
||||
|
||||
from tools_support import UsesApp
|
||||
# from tools_support import MockTool
|
||||
|
||||
# from ..tools_and_jobs_helpers import MockApp
|
||||
|
||||
TEST_TOOL_ID = "cufftest"
|
||||
TEST_VERSION_COMMAND = "bwa --version"
|
||||
@@ -123,26 +120,6 @@ class MockJobDispatcher(object):
|
||||
pass
|
||||
|
||||
|
||||
class MockApp(object):
|
||||
|
||||
def __init__(self, object_store, test_directory, model_objects):
|
||||
self.object_store = object_store
|
||||
self.toolbox = MockToolbox(MockTool(self))
|
||||
self.config = Bunch(
|
||||
outputs_to_working_directory=False,
|
||||
new_file_path=os.path.join(test_directory, "new_files"),
|
||||
tool_data_path=os.path.join(test_directory, "tools"),
|
||||
root=os.path.join(test_directory, "galaxy"),
|
||||
datatypes_registry=Bunch(
|
||||
integrated_datatypes_configs=os.path.join(test_directory, "datatypes_conf.xml"),
|
||||
),
|
||||
)
|
||||
self.job_config = Bunch(
|
||||
dynamic_params=None,
|
||||
)
|
||||
self.model = Bunch(context=MockContext(model_objects))
|
||||
|
||||
|
||||
class MockContext(object):
|
||||
|
||||
def __init__(self, model_objects):
|
||||
|
||||
@@ -111,6 +111,7 @@ class MockApp( object ):
|
||||
|
||||
self.config = Bunch(
|
||||
outputs_to_working_directory=False,
|
||||
commands_in_new_shell=True,
|
||||
new_file_path=os.path.join(test_directory, "new_files"),
|
||||
tool_data_path=os.path.join(test_directory, "tools"),
|
||||
root=os.path.join(test_directory, "galaxy"),
|
||||
|
||||
Reference in New Issue
Block a user