Skip to content

Commit

Permalink
Merge branch 'release_16.07' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 8, 2016
2 parents d6ce016 + a334b18 commit 0e9c044
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 47 deletions.
2 changes: 1 addition & 1 deletion client/galaxy/scripts/layout/scratchbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ return Backbone.View.extend({
var $galaxy_main = $( window.parent.document ).find( '#galaxy_main' );
if ( options.target == 'galaxy_main' || options.target == 'center' ) {
if ( $galaxy_main.length === 0 ) {
window.location = options.url + ( href.indexOf( '?' ) == -1 ? '?' : '&' ) + 'use_panels=True';
window.location = options.url + ( options.url.indexOf( '?' ) == -1 ? '?' : '&' ) + 'use_panels=True';
} else {
$galaxy_main.attr( 'src', options.url );
}
Expand Down
3 changes: 2 additions & 1 deletion client/galaxy/scripts/mvc/tool/tool-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form
data : job_def,
success : function( response ) {
callback && callback();
self.$el.empty().append( self._templateSuccess( response ) );
self.$el.children().hide();
self.$el.append( self._templateSuccess( response ) );
parent.Galaxy && parent.Galaxy.currHistoryPanel && parent.Galaxy.currHistoryPanel.refreshContents();
},
error : function( response ) {
Expand Down
5 changes: 4 additions & 1 deletion client/galaxy/scripts/mvc/ui/ui-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ define( [ 'utils/utils' ], function( Utils ) {
href : options.href || 'javascript:void(0)',
title : options.title,
target : options.target || '_top',
disabled : options.disabled } );
disabled : options.disabled } )
.off( 'click' ).on( 'click' , function() {
options.onclick && !options.disabled && options.onclick();
});
this.$icon.removeClass().addClass( options.icon );
}
});
Expand Down
4 changes: 2 additions & 2 deletions config/job_conf.xml.sample_advanced
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
<!-- For a stock Galaxy instance and traditional job runner $defaults will
expand out as:
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw
$galaxy_root:ro,$tool_directory:ro,$job_directory:ro,$working_directory:rw,$default_file_path:rw
This assumes most of what is needed is available under Galaxy's root directory,
the tool directory, and the Galaxy's file_path (if using object store creatively
Expand All @@ -274,7 +274,7 @@
galaxy.ini. This will cause $defaults to allow writing to much
less. It will then expand as follows:
$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro
$galaxy_root:ro,$tool_directory:ro,$job_directory:ro,$working_directory:rw,$default_file_path:ro
If using the Pulsar, defaults will be even further restricted because the
Pulsar will (by default) stage all needed inputs into the job's job_directory
Expand Down
13 changes: 11 additions & 2 deletions lib/galaxy/jobs/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,27 @@ def _find_container(
job_wrapper,
compute_working_directory=None,
compute_tool_directory=None,
compute_job_directory=None
compute_job_directory=None,
):
job_directory_type = "galaxy" if compute_working_directory is None else "pulsar"
if not compute_working_directory:
compute_working_directory = job_wrapper.tool_working_directory

if not compute_job_directory:
compute_job_directory = job_wrapper.working_directory

if not compute_tool_directory:
compute_tool_directory = job_wrapper.tool.tool_dir

tool = job_wrapper.tool
from galaxy.tools.deps import containers
tool_info = containers.ToolInfo(tool.containers, tool.requirements)
job_info = containers.JobInfo(compute_working_directory, compute_tool_directory, compute_job_directory)
job_info = containers.JobInfo(
compute_working_directory,
compute_tool_directory,
compute_job_directory,
job_directory_type,
)

destination_info = job_wrapper.job_destination.params
return self.app.container_finder.find_container(
Expand Down
11 changes: 6 additions & 5 deletions lib/galaxy/tools/deps/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,13 @@ def __init__(self, container_descriptions=[], requirements=[]):

class JobInfo(object):

def __init__(self, working_directory, tool_directory, job_directory):
def __init__(self, working_directory, tool_directory, job_directory, job_directory_type):
self.working_directory = working_directory
self.job_directory = job_directory
# Tool files may be remote staged - so this is unintuitively a property
# of the job not of the tool.
self.tool_directory = tool_directory
self.job_directory_type = job_directory_type # "galaxy" or "pulsar"


class Container( object ):
Expand Down Expand Up @@ -321,16 +322,16 @@ def add_var(name, value):
add_var("default_file_path", self.app_info.default_file_path)
add_var("library_import_dir", self.app_info.library_import_dir)

if self.job_info.job_directory:
# We have a job directory, so everything needed (excluding index
if self.job_info.job_directory and self.job_info.job_directory_type == "pulsar":
# We have a Pulsar job directory, so everything needed (excluding index
# files) should be available in job_directory...
defaults = "$job_directory:ro,$tool_directory:ro,$job_directory/outputs:rw,$working_directory:rw"
elif self.app_info.outputs_to_working_directory:
# Should need default_file_path (which is a course estimate given
# object stores anyway).
defaults = "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro"
defaults = "$galaxy_root:ro,$tool_directory:ro,$job_directory:ro,$working_directory:rw,$default_file_path:ro"
else:
defaults = "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw"
defaults = "$galaxy_root:ro,$tool_directory:ro,$job_directory:ro,$working_directory:rw,$default_file_path:rw"

if self.app_info.library_import_dir:
defaults += ",$library_import_dir:ro"
Expand Down
2 changes: 1 addition & 1 deletion static/maps/layout/scratchbook.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e9c044

Please sign in to comment.