Merge remote-tracking branch 'upstream/dev' into hashtags

This commit is contained in:
Dannon Baker
2017-04-28 09:24:55 -04:00
13 changed files with 46 additions and 42 deletions
+5 -5
View File
@@ -22,14 +22,14 @@ OPEN_RESOURCE=bash -c 'open $$0 || xdg-open $$0'
SLIDESHOW_TO_PDF?=bash -c 'docker run --rm -v `pwd`:/cwd astefanutti/decktape /cwd/$$0 /cwd/`dirname $$0`/`basename -s .html $$0`.pdf'
all: help
@echo "This makefile is primarily used for building Galaxy's JS client. A sensible all target is not yet implemented."
@echo "This makefile is used for building Galaxy's JS client, documentation, and drive the release process. A sensible all target is not implemented."
# Building docs requires sphinx and utilities be installed (see issue 3166) as well as pandoc.
# Run following commands to setup the Python portion of these requirements:
docs: ## Generate HTML documentation.
# Run following commands to setup the Python portion of the requirements:
# $ ./scripts/common_startup.sh
# $ . .venv/bin/activate
# $ pip install sphinx sphinx_rtd_theme lxml recommonmark
docs: ## generate Sphinx HTML documentation, including API docs
# $ pip install -r lib/galaxy/dependencies/dev-requirements.txt
# You also need to install pandoc separately.
$(IN_VENV) $(MAKE) -C doc clean
$(IN_VENV) $(MAKE) -C doc html
+15 -3
View File
@@ -95,13 +95,16 @@ window.app = function app( options, bootstrapped ){
var queryObj = QUERY_STRING.parse( args.pop() );
args.push( queryObj );
if( callback ){
callback.apply( this, args );
if ( this.authenticate( args, name ) ) {
callback.apply( this, args );
} else {
this.push( Galaxy.root );
}
}
},
routes : {
'(/)' : 'home',
// TODO: remove annoying 'root' from root urls
'(/)root*' : 'home',
'(/)tours(/)(:tour_id)' : 'show_tours',
'(/)user(/)' : 'show_user',
@@ -109,6 +112,15 @@ window.app = function app( options, bootstrapped ){
'(/)custom_builds' : 'show_custom_builds'
},
require_login: [
'show_user',
'show_user_form'
],
authenticate: function( args, name ) {
return ( Galaxy.user && Galaxy.user.id ) || this.require_login.indexOf( name ) == -1;
},
show_tours : function( tour_id ){
if ( tour_id ){
Tours.giveTour( tour_id );
@@ -197,4 +209,4 @@ window.app = function app( options, bootstrapped ){
pushState : true,
});
});
};
};
@@ -151,15 +151,16 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view'
if ( step.step_type == 'tool' ) {
var data_resolved = true;
FormData.visitInputs( step.inputs, function ( input, name, context ) {
var is_runtime_value = input.value && input.value.__class__ == 'RuntimeValue';
var is_data_input = ([ 'data', 'data_collection' ]).indexOf( input.type ) != -1;
var data_ref = context[ input.data_ref ];
input.step_linked && !self._isDataStep( input.step_linked ) && ( data_resolved = false );
input.options && ( ( input.options.length == 0 && !data_resolved ) || input.wp_linked ) && ( input.is_workflow = true );
data_ref && ( input.is_workflow = ( data_ref.step_linked && !self._isDataStep( data_ref.step_linked ) ) || input.wp_linked );
( is_data_input || ( input.value && input.value.__class__ == 'RuntimeValue' && !input.step_linked ) ) && ( step.collapsed = false );
input.value && input.value.__class__ == 'RuntimeValue' && ( input.value = null );
is_runtime_value && ( input.value = input.default_value );
input.flavor = 'workflow';
if ( !is_data_input && input.type !== 'hidden' && !input.wp_linked ) {
if ( !is_runtime_value && !is_data_input && input.type !== 'hidden' && !input.wp_linked ) {
if ( input.optional || ( !Utils.isEmpty( input.value ) && input.value !== '' ) ) {
input.collapsible_value = input.value;
input.collapsible_preview = true;
@@ -3,3 +3,9 @@ NoseHTML
twill==0.9.1
mock
selenium
# Documentation requirements
sphinx
sphinx_rtd_theme
lxml
recommonmark
@@ -22,7 +22,7 @@ WebOb==1.4.1
WebHelpers==1.3
Mako==1.0.2
pytz==2015.4
Babel==2.0
Babel==2.1.1
Beaker==1.7.0
dictobj==0.3.1
nose==1.3.7
-23
View File
@@ -44,7 +44,6 @@ class AzureBlobObjectStore(ObjectStore):
self.transfer_progress = 0
self._parse_config_xml(config_xml)
self._configure_connection()
self.container_lease = self._get_container_lease()
# Clean cache only if value is set in galaxy.ini
if self.cache_size != -1:
@@ -89,28 +88,6 @@ class AzureBlobObjectStore(ObjectStore):
self.account = CloudStorageAccount(self.account_name, self.account_key)
self.service = self.account.create_block_blob_service()
def _get_container_lease(self):
""" Sometimes a handle to a container is not established right away so try
it a few times. Raise error is connection is not established. """
for i in range(5):
try:
self.service.break_container_lease(self.container_name)
container_lease = self.service.acquire_container_lease(self.container_name)
log.debug("Using azure blob store with container '%s'", self.container_name)
return container_lease
except AzureHttpError:
try:
log.debug("container not found, creating azure blob store container with name '%s'", self.container_name)
self.service.create_container(self.container_name)
container_lease = self.service.acquire_container_lease(self.container_name)
return container_lease
except AzureHttpError:
log.exception("Could not get container '%s', attempt %s/5", self.container_name, i + 1)
time.sleep(2)
# All the attempts have been exhausted and connection was not established,
# raise error
raise AzureHttpError
def _construct_path(self, obj, base_dir=None, dir_only=None, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False, **kwargs):
# extra_dir should never be constructed from provided data but just
# make sure there are no shenannigans afoot
+3 -1
View File
@@ -1835,8 +1835,10 @@ class Tool( object, Dictifiable ):
populate_model( input.inputs, group_state, tool_dict[ 'inputs' ], other_values )
else:
try:
initial_value = input.get_initial_value( request_context, other_values )
tool_dict = input.to_dict( request_context, other_values=other_values )
tool_dict[ 'value' ] = input.value_to_basic( state_inputs.get( input.name, input.get_initial_value( request_context, other_values ) ), self.app, use_security=True )
tool_dict[ 'value' ] = input.value_to_basic( state_inputs.get( input.name, initial_value ), self.app, use_security=True )
tool_dict[ 'default_value' ] = input.value_to_basic( initial_value, self.app, use_security=True )
tool_dict[ 'text_value' ] = input.value_to_display_text( tool_dict[ 'value' ] )
except Exception as e:
tool_dict = input.to_dict( request_context )
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6
View File
@@ -8,6 +8,8 @@ whitelist_externals = bash
deps =
flake8
flake8-docstrings
# The next dep can be removed when https://gitlab.com/pycqa/flake8-docstrings/issues/19 is fixed
pydocstyle<2
[testenv:py33-lint]
commands = bash .ci/flake8_py3_wrapper.sh
@@ -80,6 +82,8 @@ skip_install = True
deps =
flake8
flake8-docstrings
# The next dep can be removed when https://gitlab.com/pycqa/flake8-docstrings/issues/19 is fixed
pydocstyle<2
[testenv:py27-lint-docstring-include-list]
commands = bash .ci/flake8_wrapper_docstrings.sh --include
@@ -88,3 +92,5 @@ skip_install = True
deps =
flake8
flake8-docstrings
# The next dep can be removed when https://gitlab.com/pycqa/flake8-docstrings/issues/19 is fixed
pydocstyle<2