1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e5d2170d26ab/
Changeset: e5d2170d26ab
User: nsoranzo
Date: 2013-11-19 19:36:17
Summary: Fix API workflow show for workflows created with history Extract Workflow.
To reproduce:
1) for an existing history, select "Extract Workflow" from the history menu
2) find the id of the new workflow, e.g. by opening /api/workflows/
3) open /api/workflows/$workflow_id
Result is an Internal Server Error.
In Galaxy log:
galaxy.web.framework ERROR 2013-11-19 12:44:17,367 Uncaught exception in exposed API method:
Traceback (most recent call last):
File "/srv/galaxy/lib/galaxy/web/framework/__init__.py", line 197, in decorator
rval = func( self, trans, *args, **kwargs)
File "/srv/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 77, in show
inputs[step.id] = {'label':step.tool_inputs['name'], 'value':""}
TypeError: 'NoneType' object has no attribute '__getitem__'
Reported-by: Simone Leo <simone.leo(a)crs4.it>
Affected #: 2 files
diff -r f2186f4796ad4c6aa2c9191f9804d8f5d59eb15d -r e5d2170d26ab226d326b80003e8838b2d255d6c4 lib/galaxy/webapps/galaxy/api/workflows.py
--- a/lib/galaxy/webapps/galaxy/api/workflows.py
+++ b/lib/galaxy/webapps/galaxy/api/workflows.py
@@ -73,7 +73,10 @@
inputs = {}
for step in latest_workflow.steps:
if step.type == 'data_input':
- inputs[step.id] = {'label':step.tool_inputs['name'], 'value':""}
+ if step.tool_inputs and "name" in step.tool_inputs:
+ inputs[step.id] = {'label':step.tool_inputs['name'], 'value':""}
+ else:
+ inputs[step.id] = {'label':"Input Dataset", 'value':""}
else:
pass
# Eventually, allow regular tool parameters to be inserted and modified at runtime.
diff -r f2186f4796ad4c6aa2c9191f9804d8f5d59eb15d -r e5d2170d26ab226d326b80003e8838b2d255d6c4 lib/galaxy/webapps/galaxy/controllers/workflow.py
--- a/lib/galaxy/webapps/galaxy/controllers/workflow.py
+++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py
@@ -1223,6 +1223,7 @@
for hid in dataset_ids:
step = model.WorkflowStep()
step.type = 'data_input'
+ step.tool_inputs = dict( name="Input Dataset" )
hid_to_output_pair[ hid ] = ( step, 'output' )
steps.append( step )
# Tool steps
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f2186f4796ad/
Changeset: f2186f4796ad
User: carlfeberhard
Date: 2013-11-19 16:29:38
Summary: Remove print from f166a09
Affected #: 1 file
diff -r f166a093ebe3237d1374c3ebda520f085a85ba1d -r f2186f4796ad4c6aa2c9191f9804d8f5d59eb15d lib/galaxy/visualization/registry.py
--- a/lib/galaxy/visualization/registry.py
+++ b/lib/galaxy/visualization/registry.py
@@ -510,9 +510,6 @@
# result type should tell the registry how to convert the result before the test
test_result_type = test_elem.get( 'result_type', 'string' )
- print
- print test_attr, test_result_type
- print
# test functions should be sent an object to test, and the parsed result expected from the test
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/22fd4e79f08c/
Changeset: 22fd4e79f08c
User: carlfeberhard
Date: 2013-11-19 16:24:35
Summary: Visualizations API: fix create/update validation
Affected #: 1 file
diff -r b812508869b95cc994d049f724d9475aafd417d9 -r 22fd4e79f08c0185be71fbe37fa43d4aad631e78 lib/galaxy/webapps/galaxy/api/visualizations.py
--- a/lib/galaxy/webapps/galaxy/api/visualizations.py
+++ b/lib/galaxy/webapps/galaxy/api/visualizations.py
@@ -10,7 +10,7 @@
from sqlalchemy import or_
from galaxy import web, util
-from galaxy.web.base.controller import BaseAPIController, UsesVisualizationMixin
+from galaxy.web.base.controller import BaseAPIController, UsesVisualizationMixin, SharableMixin
from galaxy.model.item_attrs import UsesAnnotations
from galaxy.exceptions import ( ItemAccessibilityException, ItemDeletionException, ItemOwnershipException,
MessageException )
@@ -20,7 +20,7 @@
import logging
log = logging.getLogger( __name__ )
-class VisualizationsController( BaseAPIController, UsesVisualizationMixin, UsesAnnotations ):
+class VisualizationsController( BaseAPIController, UsesVisualizationMixin, SharableMixin, UsesAnnotations ):
"""
RESTful controller for interactions with visualizations.
"""
@@ -122,9 +122,10 @@
else:
payload = self._validate_and_parse_payload( payload )
+ vis_type = payload.pop( 'type', False )
payload[ 'save' ] = True
- # create needs defaults like wizard needs food - generate defaults - this will err if given a weird key?
- visualization = self.create_visualization( trans, **payload )
+ # generate defaults - this will err if given a weird key?
+ visualization = self.create_visualization( trans, vis_type, **payload )
rval = { 'id' : trans.security.encode_id( visualization.id ) }
@@ -217,11 +218,20 @@
#TODO: deleted
#TODO: importable
+ # must have a type (I've taken this to be the visualization name)
+ if 'type' not in payload:
+ raise ValueError( "key/value 'type' is required" )
+
validated_payload = {}
for key, val in payload.items():
- if key == 'config':
+ #TODO: validate types in VALID_TYPES/registry names at the mixin/model level?
+ if key == 'type':
+ if not ( isinstance( val, str ) or isinstance( val, unicode ) ):
+ raise ValueError( '%s must be a string or unicode: %s' %( key, str( type( val ) ) ) )
+ val = util.sanitize_html.sanitize_html( val, 'utf-8' )
+ elif key == 'config':
if not isinstance( val, dict ):
- raise ValueError( '%s must be a dictionary (JSON): %s' %( key, str( type( val ) ) ) )
+ raise ValueError( '%s must be a dictionary: %s' %( key, str( type( val ) ) ) )
elif key == 'annotation':
if not ( isinstance( val, str ) or isinstance( val, unicode ) ):
@@ -235,21 +245,16 @@
raise ValueError( '%s must be a string or unicode: %s' %( key, str( type( val ) ) ) )
val = util.sanitize_html.sanitize_html( val, 'utf-8' )
elif key == 'slug':
- if not isinstance( val, str ):
+ if not ( isinstance( val, str ) or isinstance( val, unicode ) ):
raise ValueError( '%s must be a string: %s' %( key, str( type( val ) ) ) )
val = util.sanitize_html.sanitize_html( val, 'utf-8' )
- elif key == 'type':
- if not isinstance( val, str ):
- raise ValueError( '%s must be a string: %s' %( key, str( type( val ) ) ) )
- val = util.sanitize_html.sanitize_html( val, 'utf-8' )
- #TODO: validate types in VALID_TYPES/registry names at the mixin/model level?
elif key == 'dbkey':
if not ( isinstance( val, str ) or isinstance( val, unicode ) ):
raise ValueError( '%s must be a string or unicode: %s' %( key, str( type( val ) ) ) )
val = util.sanitize_html.sanitize_html( val, 'utf-8' )
- elif key not in valid_but_uneditable_keys:
- raise AttributeError( 'unknown key: %s' %( str( key ) ) )
+ #elif key not in valid_but_uneditable_keys:
+ # raise AttributeError( 'unknown key: %s' %( str( key ) ) )
validated_payload[ key ] = val
return validated_payload
https://bitbucket.org/galaxy/galaxy-central/commits/f166a093ebe3/
Changeset: f166a093ebe3
User: carlfeberhard
Date: 2013-11-19 16:26:48
Summary: Visualizations Registry: propery default to str eqv test for test_type, properly call getattr_lambda
Affected #: 1 file
diff -r 22fd4e79f08c0185be71fbe37fa43d4aad631e78 -r f166a093ebe3237d1374c3ebda520f085a85ba1d lib/galaxy/visualization/registry.py
--- a/lib/galaxy/visualization/registry.py
+++ b/lib/galaxy/visualization/registry.py
@@ -477,7 +477,7 @@
return lambda o: getattr( o, next_attr_name )
# recursive case
- return lambda o: getattr( self._build_getattr_lambda( attr_name_list[:-1] ), next_attr_name )
+ return lambda o: getattr( self._build_getattr_lambda( attr_name_list[:-1] )( o ), next_attr_name )
def parse_tests( self, xml_tree_list ):
"""
@@ -493,7 +493,7 @@
return tests
for test_elem in xml_tree_list:
- test_type = test_elem.get( 'type' )
+ test_type = test_elem.get( 'type', 'eq' )
test_result = test_elem.text
if not test_type or not test_result:
log.warn( 'Skipping test. Needs both type attribute and text node to be parsed: '
@@ -509,9 +509,13 @@
getter = self._build_getattr_lambda( test_attr )
# result type should tell the registry how to convert the result before the test
- test_result_type = test_elem.get( 'result_type' ) or 'string'
+ test_result_type = test_elem.get( 'result_type', 'string' )
+ print
+ print test_attr, test_result_type
+ print
# test functions should be sent an object to test, and the parsed result expected from the test
+
# is test_attr attribute an instance of result
if test_type == 'isinstance':
#TODO: wish we could take this further but it would mean passing in the datatypes_registry
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/aa8204e99326/
Changeset: aa8204e99326
User: Dave Bouvier
Date: 2013-11-19 15:51:30
Summary: Log more information about tool dependency and repository installation status when installing and testing.
Affected #: 2 files
diff -r 73b57b7e1b73dbbf8b786d5dc749b67d635f8338 -r aa8204e99326288ea07e1af26c7d3ffd11f0aff1 test/install_and_test_tool_shed_repositories/base/twilltestcase.py
--- a/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
+++ b/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
@@ -107,6 +107,7 @@
self.submit_form( 1, 'select_tool_panel_section_button', **kwd )
self.check_for_strings( post_submit_strings_displayed, strings_not_displayed )
repository_ids = self.initiate_installation_process( new_tool_panel_section=new_tool_panel_section )
+ log.debug( 'Waiting for the installation of repository IDs: %s' % str( repository_ids ) )
self.wait_for_repository_installation( repository_ids )
def visit_url( self, url, allowed_codes=[ 200 ] ):
@@ -124,10 +125,14 @@
if repository_ids:
for repository_id in repository_ids:
galaxy_repository = test_db_util.get_repository( self.security.decode_id( repository_id ) )
+ log.debug( 'Repository %s with ID %s has initial state %s.' % ( str( galaxy_repository.name ), str( repository_id ), str( galaxy_repository.status ) ) )
timeout_counter = 0
while galaxy_repository.status not in final_states:
test_db_util.refresh( galaxy_repository )
+ log.debug( 'Repository %s with ID %s is in state %s, continuing to wait.' % ( str( galaxy_repository.name ), str( repository_id ), str( galaxy_repository.status ) ) )
timeout_counter = timeout_counter + 1
+ if timeout_counter % 10 == 0:
+ log.debug( 'Waited %d seconds for repository %s.' % ( timeout_counter, str( galaxy_repository.name ) ) )
# This timeout currently defaults to 180 seconds, or 3 minutes.
if timeout_counter > common.repository_installation_timeout:
raise AssertionError( 'Repository installation timed out, %d seconds elapsed, repository state is %s.' % \
diff -r 73b57b7e1b73dbbf8b786d5dc749b67d635f8338 -r aa8204e99326288ea07e1af26c7d3ffd11f0aff1 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -363,7 +363,10 @@
return '000000000000'
def get_missing_tool_dependencies( repository ):
+ log.debug( 'Checking %s repository %s for missing tool dependencies.' % ( repository.status, repository.name ) )
missing_tool_dependencies = repository.missing_tool_dependencies
+ for tool_dependency in repository.tool_dependencies:
+ log.debug( 'Tool dependency %s version %s has status %s.' % ( tool_dependency.name, tool_dependency.version, tool_dependency.status ) )
for repository_dependency in repository.repository_dependencies:
if not repository_dependency.includes_tool_dependencies:
continue
@@ -687,7 +690,10 @@
tool_dependency_install_path = tool_dependency.installation_directory( app )
uninstalled, error_message = tool_dependency_util.remove_tool_dependency( app, tool_dependency )
if error_message:
+ log.debug( 'There was an error attempting to remove directory: %s' % str( tool_dependency_install_path ) )
log.debug( error_message )
+ else:
+ log.debug( 'Successfully removed tool dependency installation directory: %s' % str( tool_dependency_install_path ) )
sa_session = app.model.context.current
if not uninstalled or tool_dependency.status != app.model.ToolDependency.installation_status.UNINSTALLED:
tool_dependency.status = app.model.ToolDependency.installation_status.UNINSTALLED
@@ -1107,7 +1113,8 @@
# }
if 'missing_test_components' not in repository_status:
repository_status[ 'missing_test_components' ] = []
- if repository.missing_tool_dependencies or repository.missing_repository_dependencies:
+ missing_tool_dependencies = get_missing_tool_dependencies( repository )
+ if missing_tool_dependencies or repository.missing_repository_dependencies:
# If a tool dependency fails to install correctly, this should be considered an installation error,
# and functional tests should be skipped, since the tool dependency needs to be correctly installed
# for the test to be considered reliable.
@@ -1143,9 +1150,7 @@
# The deactivate flag is set to True if the environment variable GALAXY_INSTALL_TEST_KEEP_TOOL_DEPENDENCIES
# is set to 'true'.
if deactivate:
- # Recursively retrieve every missing tool dependency for this repository and its required repositories.
log.debug( 'Due to the above missing tool dependencies, we are now uninstalling the following tool dependencies, but not changing their repositories.' )
- missing_tool_dependencies = get_missing_tool_dependencies( repository )
for missing_tool_dependency in missing_tool_dependencies:
uninstall_tool_dependency( app, missing_tool_dependency )
# We are deactivating this repository and all of its repository dependencies.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/73b57b7e1b73/
Changeset: 73b57b7e1b73
User: greg
Date: 2013-11-19 14:55:23
Summary: Fix for populating the missing tool dependencies container in certain special cases in Tool Shed repositories.
Affected #: 1 file
diff -r 0632a6fe11a2027bdd15e5ddbc4c9c192bb6eaeb -r 73b57b7e1b73dbbf8b786d5dc749b67d635f8338 lib/tool_shed/util/metadata_util.py
--- a/lib/tool_shed/util/metadata_util.py
+++ b/lib/tool_shed/util/metadata_util.py
@@ -1507,8 +1507,14 @@
common_install_util.get_installed_and_missing_repository_dependencies( trans, repository )
# Handle the current repository's tool dependencies.
repository_tool_dependencies = metadata.get( 'tool_dependencies', None )
+ # Make sure to display missing tool dependencies as well.
+ repository_invalid_tool_dependencies = metadata.get( 'invalid_tool_dependencies', None )
+ if repository_invalid_tool_dependencies is not None:
+ if repository_tool_dependencies is None:
+ repository_tool_dependencies = {}
+ repository_tool_dependencies.update( repository_invalid_tool_dependencies )
repository_installed_tool_dependencies, repository_missing_tool_dependencies = \
- tool_dependency_util.get_installed_and_missing_tool_dependencies( trans, repository, repository_tool_dependencies )
+ tool_dependency_util.get_installed_and_missing_tool_dependencies_for_installed_repository( trans, repository, repository_tool_dependencies )
if reinstalling:
installed_tool_dependencies, missing_tool_dependencies = \
tool_dependency_util.populate_tool_dependencies_dicts( trans=trans,
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0632a6fe11a2/
Changeset: 0632a6fe11a2
User: greg
Date: 2013-11-19 14:52:20
Summary: Fix for populating and unpopulating complex repository dependency tags sets in tool dependency definitions contained in tool shed repositories.
Affected #: 1 file
diff -r facb9f9d2ee4d614d21e4fc1a4a6d99f2668349a -r 0632a6fe11a2027bdd15e5ddbc4c9c192bb6eaeb lib/tool_shed/util/commit_util.py
--- a/lib/tool_shed/util/commit_util.py
+++ b/lib/tool_shed/util/commit_util.py
@@ -368,6 +368,8 @@
unpopulate=unpopulate )
if message:
error_message += message
+ if package_altered:
+ root[ root_index ] = root_elem
elif package_elem.tag == 'install':
# <install version="1.0">
for actions_index, actions_elem in enumerate( package_elem ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.