From 633f958e1b6f2179264cdad06d9cda8cc13d0e93 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 25 Aug 2016 16:49:37 -0400 Subject: [PATCH 1/3] Open tool executions in a different tab from admin/tool_lineage, instead of loading galaxy(whole) within the tab --- lib/galaxy/webapps/galaxy/controllers/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index 7757e5aada0..19152591905 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -445,7 +445,7 @@ class ToolVersionListGrid( grids.Grid ): toolbox = trans.app.toolbox if toolbox.has_tool( tool_version.tool_id, exact=True ): link = url_for( controller='tool_runner', tool_id=tool_version.tool_id ) - link_str = '' % link + link_str = '' % link return '
%s%s
' % ( link_str, tool_version.tool_id ) return tool_version.tool_id @@ -456,7 +456,7 @@ class ToolVersionListGrid( grids.Grid ): for tool_id in tool_version.get_version_ids( trans.app ): if toolbox.has_tool( tool_id, exact=True ): link = url_for( controller='tool_runner', tool_id=tool_version.tool_id ) - link_str = '' % link + link_str = '' % link tool_ids_str += '
%s%s

' % ( link_str, tool_id ) else: tool_ids_str += '%s
' % tool_id From ed76484af2ba5d86a9cfee82118f74dde70f21ae Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 26 Aug 2016 11:42:45 -0400 Subject: [PATCH 2/3] Fix toolbox's get_tool 'exact' matching. Previously it'd return a tool even when exact was specified, though no exact match was made (so, exact=False behavior, always) --- lib/galaxy/tools/toolbox/base.py | 2 ++ lib/galaxy/webapps/galaxy/controllers/admin.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index e23d91b8732..a0a3602ce4c 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -399,6 +399,8 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ): return self._tool_versions_by_id[ tool_id ][ tool_version ] # tool_id exactly matches an available tool by id (which is 'old' tool_id or guid) return self._tools_by_id[ tool_id ] + elif exact: + return None # exact tool id match not found, or all versions requested, search for other options, e.g. migrated tools or different versions rval = [] tool_lineage = self._lineage_map.get( tool_id ) diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index 19152591905..d061506bc2a 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -455,7 +455,7 @@ class ToolVersionListGrid( grids.Grid ): toolbox = trans.app.toolbox for tool_id in tool_version.get_version_ids( trans.app ): if toolbox.has_tool( tool_id, exact=True ): - link = url_for( controller='tool_runner', tool_id=tool_version.tool_id ) + link = url_for( controller='tool_runner', tool_id=tool_id ) link_str = '' % link tool_ids_str += '
' % ( link_str, tool_id ) else: From d14b43abf2694ce3ef6933a9bede181ff1d7f79d Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 26 Aug 2016 11:45:58 -0400 Subject: [PATCH 3/3] Probably still want to match identical tool guids against multiple sheds? --- lib/galaxy/tools/toolbox/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index a0a3602ce4c..5f160d08f6c 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -400,7 +400,10 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ): # tool_id exactly matches an available tool by id (which is 'old' tool_id or guid) return self._tools_by_id[ tool_id ] elif exact: - return None + # We're looking for an exact match, so we skip lineage and + # versionless mapping, though we may want to check duplicate + # toolsheds + continue # exact tool id match not found, or all versions requested, search for other options, e.g. migrated tools or different versions rval = [] tool_lineage = self._lineage_map.get( tool_id )