Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into history.delete_curre…
Browse files Browse the repository at this point in the history
…nt-id
  • Loading branch information
carlfeberhard committed Jul 29, 2016
2 parents 877655c + b2fbfcd commit cdab648
Show file tree
Hide file tree
Showing 109 changed files with 3,267 additions and 272 deletions.
2 changes: 2 additions & 0 deletions .ci/flake8_blacklist.txt
@@ -1,4 +1,6 @@
.venv/
.tox/
eggs/
client/
database/
doc/patch.py
Expand Down
627 changes: 627 additions & 0 deletions .ci/flake8_lint_include_list.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .ci/flake8_wrapper_imports.sh
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

flake8 `paste .ci/flake8_lint_include_list.txt`
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -8,6 +8,9 @@ env:
- TOX_ENV=py27-unit
- TOX_ENV=qunit
- TOX_ENV=first_startup
- TOX_ENV=py27-lint-imports
- TOX_ENV=py27-lint-imports-include-list

matrix:
include:
- os: osx
Expand All @@ -16,6 +19,8 @@ matrix:
- os: osx
env: TOX_ENV=py27-unit
language: generic
allow_failures:
- env: TOX_ENV=py27-lint-imports

before_install:
- if [ `uname` == "Darwin" ]; then bash -c "brew update && brew install python"; fi
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/form/form-section.js
Expand Up @@ -189,7 +189,7 @@ define(['utils/utils',
_addRow: function(input_def) {
var self = this;
var id = input_def.id;
input_def.onchange = function() { self.app.trigger( 'change' ) };
input_def.onchange = function() { self.app.trigger( 'change', id ) };
var field = this.parameters.create(input_def);
this.app.field_list[id] = field;
var input_element = new InputElement(this.app, {
Expand Down
16 changes: 10 additions & 6 deletions client/galaxy/scripts/mvc/form/form-view.js
Expand Up @@ -8,7 +8,8 @@ define(['utils/utils', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc', 'mvc/form/form-sec
this.options = Utils.merge(options, {
initial_errors : false,
cls : 'ui-portlet-limited',
icon : null
icon : null,
always_refresh : true
});
this.setElement('<div/>');
this.render();
Expand Down Expand Up @@ -135,11 +136,14 @@ define(['utils/utils', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc', 'mvc/form/form-sec

// add listener which triggers on checksum change
var current_check = this.data.checksum();
this.on('change', function( force ) {
var new_check = self.data.checksum();
if (new_check != current_check || force ) {
current_check = new_check;
self.options.onchange && self.options.onchange();
this.on('change', function( input_id ) {
var input = self.input_list[ input_id ];
if ( !input || input.refresh_on_change || self.options.always_refresh ) {
var new_check = self.data.checksum();
if ( new_check != current_check ) {
current_check = new_check;
self.options.onchange && self.options.onchange();
}
}
});

Expand Down
22 changes: 17 additions & 5 deletions client/galaxy/scripts/mvc/tool/tool-form-base.js
Expand Up @@ -16,6 +16,21 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
self._buildModel(process, options, true);
});
}
// Listen to history panel
if ( options.listen_to_history && parent.Galaxy && parent.Galaxy.currHistoryPanel ) {
this.listenTo( parent.Galaxy.currHistoryPanel.collection, 'change', function() {
this.refresh();
});
}
},

/** Listen to history panel changes and update the tool form */
refresh: function() {
var self = this;
self.deferred.reset();
this.deferred.execute( function (process){
self._updateModel( process)
});
},

/** Wait for deferred build processes before removal */
Expand All @@ -37,10 +52,7 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
title : '<b>' + options.name + '</b> ' + options.description + ' (Galaxy Version ' + options.version + ')',
operations : !this.options.hide_operations && this._operations(),
onchange : function() {
self.deferred.reset();
self.deferred.execute(function(process) {
self._updateModel(process);
});
self.refresh();
}
}, this.options);
this.options.customize && this.options.customize( this.options );
Expand Down Expand Up @@ -315,4 +327,4 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
return 'No requirements found.';
}
});
});
});
17 changes: 11 additions & 6 deletions client/galaxy/scripts/mvc/tool/tool-form.js
@@ -1,11 +1,14 @@
/**
This is the regular tool form.
*/
define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/tool/tool-form-base' ],
function( Utils, Ui, ToolFormBase ) {
define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-modal', 'mvc/tool/tool-form-base' ],
function( Utils, Ui, Modal, ToolFormBase ) {
var View = ToolFormBase.extend({
initialize: function( options ) {
var self = this;
options.listen_to_history = true;
options.always_refresh = false;
this.modal = parent.Galaxy.modal || new Modal.View();
ToolFormBase.prototype.initialize.call( this, Utils.merge({
customize: function( options ) {
// build execute button
Expand Down Expand Up @@ -80,20 +83,22 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/tool/tool-form-base' ],
error : function( response ) {
callback && callback();
Galaxy.emit.debug( 'tool-form::submit', 'Submission failed.', response );
var input_found = false;
if ( response && response.err_data ) {
var error_messages = self.data.matchResponse( response.err_data );
for (var input_id in error_messages) {
self.highlight( input_id, error_messages[ input_id ]);
input_found = true;
break;
}
} else {
var modal = parent.Galaxy.modal;
modal && modal.show({
}
if ( !input_found ) {
self.modal.show({
title : 'Job submission failed',
body : ( response && response.err_msg ) || self._templateError( job_def ),
buttons : {
'Close' : function() {
modal.hide();
self.modal.hide();
}
}
});
Expand Down
1 change: 1 addition & 0 deletions client/galaxy/scripts/mvc/ui/ui-select-content.js
Expand Up @@ -219,6 +219,7 @@ var View = Backbone.View.extend({
_.each( items, function( item ) {
select_options[ src ].push({
hid : item.hid,
keep : item.keep,
label: item.hid + ': ' + item.name,
value: item.id
});
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/ui/ui-select-default.js
Expand Up @@ -243,7 +243,7 @@ var View = Backbone.View.extend({
/** Update all available options at once */
add: function( options, sorter ) {
_.each( this.model.get( 'data' ), function( v ) {
!_.findWhere( options, v ) && options.push( v );
v.keep && !_.findWhere( options, { value: v.value } ) && options.push( v );
});
sorter && options && options.sort( sorter );
this.model.set( 'data', options );
Expand Down
7 changes: 4 additions & 3 deletions client/galaxy/style/less/ui.less
Expand Up @@ -152,7 +152,7 @@
font-size: 0.8em;
font-weight: normal;
top: -1px;
word-break:break-word;
word-wrap:break-word;
}
}
.button.disabled {
Expand Down Expand Up @@ -255,7 +255,7 @@
margin-bottom: @ui-margin-vertical;
overflow: visible;
.ui-form-title {
word-break: break-word;
word-wrap: break-word;
font-weight: bold;
.ui-form-collapsible {
cursor: pointer;
Expand Down Expand Up @@ -320,6 +320,7 @@
.ui-form-info {
&:extend(.toolParamHelp);
clear: both !important;
word-wrap: break-word;
i {
font-size: 1.2em;
padding: 2px 5px;
Expand Down Expand Up @@ -388,7 +389,7 @@
float: right;
width:100%;
.portlet-title {
word-break: break-word;
word-wrap: break-word;
display: inline;
vertical-align: middle;
.portlet-title-text {
Expand Down
9 changes: 5 additions & 4 deletions config/galaxy.ini.sample
Expand Up @@ -196,6 +196,8 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# Set to True to instruct Galaxy to look for and install missing tool
# dependencies before each job runs.
#conda_auto_install = False
# Set to True to perform additional checking of installed conda environment
#conda_verbose_install_check=False
# Set to True to instruct Galaxy to install conda from the web automatically
# if it cannot find a local copy and conda_exec is not configured.
#conda_auto_init = False
Expand Down Expand Up @@ -409,12 +411,11 @@ paste.app_factory = galaxy.web.buildapp:app_factory

# Activation grace period (in hours). Activation is not forced (login is not
# disabled) until grace period has passed. Users under grace period can't run
# jobs (see inactivity_box_content). Default is 3. Enter 0 to disable grace
# period.
# jobs. Enter 0 to disable grace period.
# Users with OpenID logins have grace period forever.
#activation_grace_period = 0
#activation_grace_period = 3

# Used for warning box for inactive accounts (unable to run jobs).
# Shown in warning box to users that were not activated yet.
# In use only if activation_grace_period is set.
#inactivity_box_content = Your account has not been activated yet. Feel free to browse around and see what's available, but you won't be able to upload data or run jobs until you have verified your email address.

Expand Down
30 changes: 20 additions & 10 deletions config/object_store_conf.xml.sample
Expand Up @@ -32,16 +32,26 @@
-->

<!-- Sample Swift Object Store
<object_store type="swift">
<auth access_key="...." secret_key="....." />
<bucket name="unique_bucket_name" use_reduced_redundancy="False" max_chunk_size="250"/>
<connection host="" port="" is_secure="" conn_path="" multipart="True"/>
<cache path="database/object_store_cache" size="1000" />
<extra_dir type="job_work" path="database/job_working_directory_swift"/>
<extra_dir type="temp" path="database/tmp_swift"/>
</object_store>
-->
<object_store type="swift">
<auth access_key="...." secret_key="....." />
<bucket name="unique_bucket_name" use_reduced_redundancy="False" max_chunk_size="250"/>
<connection host="" port="" is_secure="" conn_path="" multipart="True"/>
<cache path="database/object_store_cache" size="1000" />
<extra_dir type="job_work" path="database/job_working_directory_swift"/>
<extra_dir type="temp" path="database/tmp_swift"/>
</object_store>
-->

<!-- Sample Azure Object Store
<object_store type="azure_blob">
<auth account_name="..." account_key="...." />
<container name="unique_container_name" max_chunk_size="250"/>
<cache path="database/object_store_cache" size="100" />
<extra_dir type="job_work" path="database/job_working_directory_azure"/>
<extra_dir type="temp" path="database/tmp_azure"/>
</object_store>
-->


</backends>
</object_store>

@@ -0,0 +1,11 @@
# This file lists acceptable images to allow runing.
#
# This allows you, the admin, to create multiple flavours
# for your users to run. E.g. maybe you need a geosciences flavour,
# you can create the image based on our default image and add the
# appropriate `apt-get/pip install` statements.
---
-
image: thoba/neo4j_galaxy_ie:v1
description: |
Neo4j is a highly scalable, robust native graph database.
42 changes: 42 additions & 0 deletions config/plugins/interactive_environments/neo/config/neo.ini.sample
@@ -0,0 +1,42 @@
[main]
# Following options are ignored if using the Galaxy dynamic proxy but
# are useful if mapping a range of ports for environment consumption.
#password_auth = False
#ssl = False

[docker]
# Command to launch docker container. For example `sudo docker` or `docker-lxc`.
# If you need to use a command like `sg` you can do that here, just be sure to
# wrap all of the docker portion in single quotes. E.g. `sg 'docker' 'docker {docker_args}'`
#
# It is recommended that you use command_inject if you need to inject
# additional parameters. This command string is re-used for a `docker inspect`
# command and will likely cause errors if it is extensively modified, past the
# usual group/sudo changes.
#command = docker {docker_args}

# The image argument was moved to "allowed_images.yml.sample"

# Additional arguments that are passed to the `docker run` command.
command_inject = --sig-proxy=true -e DEBUG=false -e DEFAULT_CONTAINER_RUNTIME=120 -e NEO4J_UID=$(id -u) -e NEO4J_GID=$(id -g)


# URL to access the Galaxy API with from the spawn Docker containter, if empty
# this falls back to galaxy.ini's galaxy_infrastructure_url and finally to the
# Docker host of the spawned container if that is also not set.
#galaxy_url =

# The Docker hostname. It can be useful to run the Docker daemon on a different
# host than Galaxy.
#docker_hostname = localhost

# Try to set the tempdirectory to world execute - this can fix the issue
# where 'sudo docker' is not able to mount the folder otherwise.
# "finalize namespace chdir to /import permission denied"
#wx_tempdir = False

# Overwride the IE tempdirectory. This can be useful if you regular tempdir is
# located on an NFS share, which does not work well as Docker volume. In this case
# you can have a shared sshfs share which you can use as temporary directory to
# share data between the IE and Galaxy.
#docker_galaxy_temp_dir = None
19 changes: 19 additions & 0 deletions config/plugins/interactive_environments/neo/config/neo.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE interactive_environment SYSTEM "../../interactive_environments.dtd">
<!-- This is the name which will show up in the User's Browser -->
<interactive_environment name="Neo4j (Graph Database)">
<data_sources>
<data_source>
<model_class>HistoryDatasetAssociation</model_class>
<!-- here you filter out which types of datasets are appropriate for this GIE.
The Neo4jDB datatype is generated by the build_ctb_gene tool in the test toolshed.-->
<test type="isinstance" test_attr="datatype" result_type="datatype">Neo4jDB.Neo4jDB</test>
<to_param param_attr="id">dataset_id</to_param>
</data_source>
</data_sources>
<params>
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
</params>
<!-- Be sure that your entrypoint name is correct! -->
<entry_point entry_point_type="mako">neo.mako</entry_point>
</interactive_environment>
12 changes: 12 additions & 0 deletions config/plugins/interactive_environments/neo/static/js/neo.js
@@ -0,0 +1,12 @@
// Load an interactive environment (IE) from a remote URL
// @param {String} notebook_access_url: the URL embeded in the page and loaded
function load_notebook(notebook_access_url){
// When the page has completely loaded...
$( document ).ready(function() {
// Test if we can access the GIE, and if so, execute the function
// to load the GIE for the user.
test_ie_availability(notebook_access_url, function(){
append_notebook(notebook_access_url);
});
});
}

0 comments on commit cdab648

Please sign in to comment.