From ec3b16e8bf91416f110fb3e48ebe2f7fe1b70a61 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Mon, 7 Oct 2013 12:48:25 -0400 Subject: [PATCH 1/2] Allow tool dependencies with a status of NEVER_INSTALLED to be installed. --- lib/tool_shed/util/shed_util_common.py | 3 ++- .../manage_repository_tool_dependencies.mako | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tool_shed/util/shed_util_common.py b/lib/tool_shed/util/shed_util_common.py index b72d18728ee..5c96ba8c1bf 100644 --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -148,7 +148,8 @@ def build_tool_dependencies_select_field( trans, tool_shed_repository, name, mul """Method called from Galaxy to generate the current list of tool dependency ids for an installed tool shed repository.""" tool_dependencies_select_field = SelectField( name=name, multiple=multiple, display=display ) for tool_dependency in tool_shed_repository.tool_dependencies: - if uninstalled and tool_dependency.status != trans.model.ToolDependency.installation_status.UNINSTALLED: + if uninstalled and tool_dependency.status not in [ trans.model.ToolDependency.installation_status.NEVER_INSTALLED, + trans.model.ToolDependency.installation_status.UNINSTALLED ]: continue option_label = '%s version %s' % ( str( tool_dependency.name ), str( tool_dependency.version ) ) option_value = trans.security.encode_id( tool_dependency.id ) diff --git a/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako b/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako index 989d3ffa907..3dea51c7eb1 100644 --- a/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako +++ b/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako @@ -35,7 +35,8 @@ ${render_galaxy_repository_actions( repository )} else: error_message = '' if not can_install: - if tool_dependency.status in [ trans.model.ToolDependency.installation_status.UNINSTALLED ]: + if tool_dependency.status in [ trans.model.ToolDependency.installation_status.NEVER_INSTALLED, + trans.model.ToolDependency.installation_status.UNINSTALLED ]: can_install = True if not can_uninstall: if tool_dependency.status not in [ trans.model.ToolDependency.installation_status.UNINSTALLED ]: From d3cea0e05da6a59ba6b5599a641b935825dd6587 Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Mon, 7 Oct 2013 14:28:43 -0400 Subject: [PATCH 2/2] Make extract_log_data return a list of dicts rather than a dict. --- .../functional_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/install_and_test_tool_shed_repositories/functional_tests.py b/test/install_and_test_tool_shed_repositories/functional_tests.py index 89b9699b327..0592a063d1e 100644 --- a/test/install_and_test_tool_shed_repositories/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/functional_tests.py @@ -275,6 +275,7 @@ def execute_uninstall_method( app, deactivate_only=False ): def extract_log_data( test_result, from_tool_test=True ): '''Extract any useful data from the test_result.failures and test_result.errors attributes.''' + log_data = [] for failure in test_result.failures + test_result.errors: # Record the twill test identifier and information about the tool, so the repository owner can discover which test is failing. test_id = str( failure[0] ) @@ -314,7 +315,8 @@ def extract_log_data( test_result, from_tool_test=True ): for output_type in [ 'stderr', 'traceback' ]: if output_type in tmp_output: test_status[ output_type ] = '\n'.join( tmp_output[ output_type ] ) - return test_status + log_data.append( test_status ) + return log_data def get_api_url( base, parts=[], params=None, key=None ): if 'api' in parts and parts.index( 'api' ) != 0: