commit/galaxy-central: 7 new changesets
7 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2b6e21823ea7/ Changeset: 2b6e21823ea7 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: More ToolPanelManager unit testing. Affected #: 1 file diff -r 0587bc5413d66e85673d7b429bc04d34e47ad4c4 -r 2b6e21823ea70429b7913b913010f6501f10a601 test/unit/tool_shed_unit_tests/test_tool_panel_manager.py --- a/test/unit/tool_shed_unit_tests/test_tool_panel_manager.py +++ b/test/unit/tool_shed_unit_tests/test_tool_panel_manager.py @@ -101,6 +101,16 @@ assert "github.com/galaxyproect/example/test_tool/0.2" not in open(os.path.join(self.test_directory, "tool_conf.xml"), "r").read() self._verify_tool_confs() + self._remove_guids( ["github.com/galaxyproect/example/test_tool/0.1"], uninstall=True ) + + # Now no versions of this tool are returned by toolbox. + all_versions = self.toolbox.get_tool( "test_tool", get_all_versions=True ) + assert not all_versions + + # Check that tool panel has reverted to old value... + section = self.toolbox.tool_panel["tid"] + assert len(section.elems) == 0 + def _setup_two_versions_remove_one( self, section, uninstall ): self._init_tool() self._setup_two_versions_in_config( section=True ) https://bitbucket.org/galaxy/galaxy-central/commits/8ffb20fd4300/ Changeset: 8ffb20fd4300 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Eliminate repeated nested object access in ToolPanelManager.remove_guids. Affected #: 1 file diff -r 2b6e21823ea70429b7913b913010f6501f10a601 -r 8ffb20fd4300fbf3b4cc5ac21022e55cd2c1da68 lib/tool_shed/galaxy_install/tools/tool_panel_manager.py --- a/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py +++ b/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py @@ -445,10 +445,11 @@ self.remove_guids( guids_to_remove, shed_tool_conf, uninstall ) def remove_guids( self, guids_to_remove, shed_tool_conf, uninstall ): + toolbox = self.app.toolbox # Remove the tools from the toolbox's tools_by_id dictionary. for guid_to_remove in guids_to_remove: - if guid_to_remove in self.app.toolbox.tools_by_id: - del self.app.toolbox.tools_by_id[ guid_to_remove ] + if guid_to_remove in toolbox.tools_by_id: + del toolbox.tools_by_id[ guid_to_remove ] index, shed_tool_conf_dict = self.get_shed_tool_conf_dict( shed_tool_conf ) if uninstall: # Remove from the shed_tool_conf file on disk. @@ -469,12 +470,12 @@ # Remove the tool sub-element from the section element. config_elem.remove( tool_elem ) # Remove the tool from the section in the in-memory tool panel. - if section_key in self.app.toolbox.tool_panel: - tool_section = self.app.toolbox.tool_panel[ section_key ] + if section_key in toolbox.tool_panel: + tool_section = toolbox.tool_panel[ section_key ] guid = tool_elem.get( 'guid' ) tool_key = 'tool_%s' % str( guid ) # Get the list of versions of this tool that are currently available in the toolbox. - available_tool_versions = self.app.toolbox.get_loaded_tools_by_lineage( guid ) + available_tool_versions = toolbox.get_loaded_tools_by_lineage( guid ) if tool_key in tool_section.elems: if available_tool_versions: available_tool_versions.reverse() @@ -505,8 +506,8 @@ del tool_section.elems[ tool_key ] if uninstall: # Remove the tool from the section in the in-memory integrated tool panel. - if section_key in self.app.toolbox.integrated_tool_panel: - tool_section = self.app.toolbox.integrated_tool_panel[ section_key ] + if section_key in toolbox.integrated_tool_panel: + tool_section = toolbox.integrated_tool_panel[ section_key ] tool_key = 'tool_%s' % str( tool_elem.get( 'guid' ) ) if tool_key in tool_section.elems: del tool_section.elems[ tool_key ] @@ -518,8 +519,8 @@ if guid in guids_to_remove: tool_key = 'tool_%s' % str( config_elem.get( 'guid' ) ) # Get the list of versions of this tool that are currently available in the toolbox. - available_tool_versions = self.app.toolbox.get_loaded_tools_by_lineage( guid ) - if tool_key in self.app.toolbox.tool_panel: + available_tool_versions = toolbox.get_loaded_tools_by_lineage( guid ) + if tool_key in toolbox.tool_panel: if available_tool_versions: available_tool_versions.reverse() replacement_tool_key = None @@ -528,32 +529,32 @@ # the newest loaded version of the tool. for available_tool_version in available_tool_versions: available_tool_section_id, available_tool_section_name = available_tool_version.get_panel_section() - if available_tool_version.id in self.app.toolbox.tool_panel.keys() or not available_tool_section_id: + if available_tool_version.id in toolbox.tool_panel.keys() or not available_tool_section_id: replacement_tool_key = 'tool_%s' % str( available_tool_version.id ) replacement_tool_version = available_tool_version break if replacement_tool_key and replacement_tool_version: # Get the index of the tool_key in the tool_section. - for tool_panel_index, key in enumerate( self.app.toolbox.tool_panel.keys() ): + for tool_panel_index, key in enumerate( toolbox.tool_panel.keys() ): if key == tool_key: break # Remove the tool from the tool panel. - del self.app.toolbox.tool_panel[ tool_key ] + del toolbox.tool_panel[ tool_key ] # Add the replacement tool at the same location in the tool panel. - self.app.toolbox.tool_panel.insert( tool_panel_index, - replacement_tool_key, - replacement_tool_version ) + toolbox.tool_panel.insert( tool_panel_index, + replacement_tool_key, + replacement_tool_version ) else: - del self.app.toolbox.tool_panel[ tool_key ] + del toolbox.tool_panel[ tool_key ] else: - del self.app.toolbox.tool_panel[ tool_key ] + del toolbox.tool_panel[ tool_key ] if uninstall: - if tool_key in self.app.toolbox.integrated_tool_panel: - del self.app.toolbox.integrated_tool_panel[ tool_key ] + if tool_key in toolbox.integrated_tool_panel: + del toolbox.integrated_tool_panel[ tool_key ] config_elems_to_remove.append( config_elem ) for config_elem in config_elems_to_remove: # Remove the element from the in-memory list of elements. config_elems.remove( config_elem ) # Update the config_elems of the in-memory shed_tool_conf_dict. shed_tool_conf_dict[ 'config_elems' ] = config_elems - self.app.toolbox.update_shed_config( index, shed_tool_conf_dict, integrated_panel_changes=uninstall ) + toolbox.update_shed_config( index, shed_tool_conf_dict, integrated_panel_changes=uninstall ) https://bitbucket.org/galaxy/galaxy-central/commits/44dfa6fc2701/ Changeset: 44dfa6fc2701 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Reduce duplication/complexity in tool_panel_manager.py. Big conditional in remove_guids switched on sectioned versus un-sectioned with very little difference in what was actually being done. This reduces the cyclomatic complexity of that method from 35 down to 26 (though it is still the most 'complex' method in that file by a wide margin). Affected #: 1 file diff -r 8ffb20fd4300fbf3b4cc5ac21022e55cd2c1da68 -r 44dfa6fc270161fb12a3f152d5f24f53d757cd29 lib/tool_shed/galaxy_install/tools/tool_panel_manager.py --- a/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py +++ b/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py @@ -446,6 +446,48 @@ def remove_guids( self, guids_to_remove, shed_tool_conf, uninstall ): toolbox = self.app.toolbox + + def remove_from_panel( tool_elem, has_elems, integrated_has_elems, section_key='' ): + # Hide tool from panel and promote next oldest version if + # available. + guid = tool_elem.get( 'guid' ) + tool_key = 'tool_%s' % str( guid ) + available_tool_versions = toolbox.get_loaded_tools_by_lineage( guid ) + if tool_key in has_elems: + if available_tool_versions: + available_tool_versions.reverse() + replacement_tool_key = None + replacement_tool_version = None + # Since we are going to remove the tool from the section, replace it with + # the newest loaded version of the tool. + for available_tool_version in available_tool_versions: + available_tool_section_id, available_tool_section_name = available_tool_version.get_panel_section() + # I suspect "available_tool_version.id in has_elems.keys()" doesn't + # belong in the following line or at least I don't understand what + # purpose it might serve. -John + if available_tool_version.id in has_elems.keys() or (available_tool_section_id == section_key): + replacement_tool_key = 'tool_%s' % str( available_tool_version.id ) + replacement_tool_version = available_tool_version + break + if replacement_tool_key and replacement_tool_version: + # Get the index of the tool_key in the tool_section. + for tool_panel_index, key in enumerate( has_elems.keys() ): + if key == tool_key: + break + # Remove the tool from the tool panel. + del has_elems[ tool_key ] + # Add the replacement tool at the same location in the tool panel. + has_elems.insert( tool_panel_index, + replacement_tool_key, + replacement_tool_version ) + else: + del has_elems[ tool_key ] + else: + del has_elems[ tool_key ] + if uninstall: + if tool_key in toolbox.integrated_tool_panel: + del toolbox.integrated_tool_panel[ tool_key ] + # Remove the tools from the toolbox's tools_by_id dictionary. for guid_to_remove in guids_to_remove: if guid_to_remove in toolbox.tools_by_id: @@ -472,85 +514,15 @@ # Remove the tool from the section in the in-memory tool panel. if section_key in toolbox.tool_panel: tool_section = toolbox.tool_panel[ section_key ] - guid = tool_elem.get( 'guid' ) - tool_key = 'tool_%s' % str( guid ) - # Get the list of versions of this tool that are currently available in the toolbox. - available_tool_versions = toolbox.get_loaded_tools_by_lineage( guid ) - if tool_key in tool_section.elems: - if available_tool_versions: - available_tool_versions.reverse() - replacement_tool_key = None - replacement_tool_version = None - # Since we are going to remove the tool from the section, replace it with the - # newest loaded version of the tool. - for available_tool_version in available_tool_versions: - available_tool_section_id, available_tool_section_name = available_tool_version.get_panel_section() - if available_tool_version.id in tool_section.elems.keys() or section_key == available_tool_section_id: - replacement_tool_key = 'tool_%s' % str( available_tool_version.id ) - replacement_tool_version = available_tool_version - break - if replacement_tool_key and replacement_tool_version: - # Get the index of the tool_key in the tool_section. - for tool_section_elems_index, key in enumerate( tool_section.elems.keys() ): - if key == tool_key: - break - # Remove the tool from the tool section. - del tool_section.elems[ tool_key ] - # Add the replacement tool at the same location in the tool section. - tool_section.elems.insert( tool_section_elems_index, - replacement_tool_key, - replacement_tool_version ) - else: - del tool_section.elems[ tool_key ] - else: - del tool_section.elems[ tool_key ] - if uninstall: - # Remove the tool from the section in the in-memory integrated tool panel. - if section_key in toolbox.integrated_tool_panel: - tool_section = toolbox.integrated_tool_panel[ section_key ] - tool_key = 'tool_%s' % str( tool_elem.get( 'guid' ) ) - if tool_key in tool_section.elems: - del tool_section.elems[ tool_key ] + remove_from_panel( tool_elem, tool_section.elems, toolbox.integrated_tool_panel.get( section_key, {} ), section_key=section_key ) if len( config_elem ) < 1: # Keep a list of all empty section elements so they can be removed. config_elems_to_remove.append( config_elem ) elif config_elem.tag == 'tool': guid = config_elem.get( 'guid' ) if guid in guids_to_remove: - tool_key = 'tool_%s' % str( config_elem.get( 'guid' ) ) - # Get the list of versions of this tool that are currently available in the toolbox. - available_tool_versions = toolbox.get_loaded_tools_by_lineage( guid ) - if tool_key in toolbox.tool_panel: - if available_tool_versions: - available_tool_versions.reverse() - replacement_tool_key = None - replacement_tool_version = None - # Since we are going to remove the tool from the section, replace it with - # the newest loaded version of the tool. - for available_tool_version in available_tool_versions: - available_tool_section_id, available_tool_section_name = available_tool_version.get_panel_section() - if available_tool_version.id in toolbox.tool_panel.keys() or not available_tool_section_id: - replacement_tool_key = 'tool_%s' % str( available_tool_version.id ) - replacement_tool_version = available_tool_version - break - if replacement_tool_key and replacement_tool_version: - # Get the index of the tool_key in the tool_section. - for tool_panel_index, key in enumerate( toolbox.tool_panel.keys() ): - if key == tool_key: - break - # Remove the tool from the tool panel. - del toolbox.tool_panel[ tool_key ] - # Add the replacement tool at the same location in the tool panel. - toolbox.tool_panel.insert( tool_panel_index, - replacement_tool_key, - replacement_tool_version ) - else: - del toolbox.tool_panel[ tool_key ] - else: - del toolbox.tool_panel[ tool_key ] - if uninstall: - if tool_key in toolbox.integrated_tool_panel: - del toolbox.integrated_tool_panel[ tool_key ] + # get_panel_section return '' for un-sectioned tools. + remove_from_panel( config_elem, toolbox.tool_panel, toolbox.integrated_tool_panel, section_key='' ) config_elems_to_remove.append( config_elem ) for config_elem in config_elems_to_remove: # Remove the element from the in-memory list of elements. https://bitbucket.org/galaxy/galaxy-central/commits/01293fc1f167/ Changeset: 01293fc1f167 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Abstract out ToolBox internals from tool_shed.util.tool_util. Instead of reloading upload actions at this level and exposing tools_by_id - move this logic into the ToolBox in a new method called handle_datatypes_changed(). Affected #: 2 files diff -r 44dfa6fc270161fb12a3f152d5f24f53d757cd29 -r 01293fc1f16715121524b987fcab031f3e149a02 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -34,6 +34,7 @@ from galaxy import exceptions from galaxy.tools import watcher from galaxy.tools.actions import DefaultToolAction +from galaxy.tools.actions.upload import UploadToolAction from galaxy.tools.actions.data_source import DataSourceToolAction from galaxy.tools.actions.data_manager import DataManagerToolAction from galaxy.tools.deps import build_dependency_manager @@ -992,6 +993,13 @@ def init_dependency_manager( self ): self.dependency_manager = build_dependency_manager( self.app.config ) + def handle_datatypes_changed( self ): + """ Refresh upload tools when new datatypes are added. """ + for tool_id in self.tools_by_id: + tool = self.tools_by_id[ tool_id ] + if isinstance( tool.tool_action, UploadToolAction ): + self.reload_tool_by_id( tool_id ) + @property def sa_session( self ): """ diff -r 44dfa6fc270161fb12a3f152d5f24f53d757cd29 -r 01293fc1f16715121524b987fcab031f3e149a02 lib/tool_shed/util/tool_util.py --- a/lib/tool_shed/util/tool_util.py +++ b/lib/tool_shed/util/tool_util.py @@ -260,7 +260,4 @@ def reload_upload_tools( app ): if hasattr( app, 'toolbox' ): - for tool_id in app.toolbox.tools_by_id: - tool = app.toolbox.tools_by_id[ tool_id ] - if isinstance( tool.tool_action, UploadToolAction ): - app.toolbox.reload_tool_by_id( tool_id ) + app.toolbox.handle_datatypes_changed() https://bitbucket.org/galaxy/galaxy-central/commits/7716c8fbb891/ Changeset: 7716c8fbb891 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Centralize abstraction for removing tools from toolbox. Shield's toolbox.tools_by_id from lib/tool_shed/galaxy_install/tools/tool_panel_manager.py. Affected #: 3 files diff -r 01293fc1f16715121524b987fcab031f3e149a02 -r 7716c8fbb891eb18f81bc80fc5f85f735d025357 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -529,8 +529,7 @@ converter.id = tool_dict[ 'guid' ] break if deactivate: - if converter.id in toolbox.tools_by_id: - del toolbox.tools_by_id[ converter.id ] + toolbox.remove_tool_by_id( converter.id, remove_from_panel=False ) if source_datatype in self.datatype_converters: if target_datatype in self.datatype_converters[ source_datatype ]: del self.datatype_converters[ source_datatype ][ target_datatype ] diff -r 01293fc1f16715121524b987fcab031f3e149a02 -r 7716c8fbb891eb18f81bc80fc5f85f735d025357 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -952,9 +952,13 @@ status = 'done' return message, status - def remove_tool_by_id( self, tool_id ): + def remove_tool_by_id( self, tool_id, remove_from_panel=True ): """ - Attempt to remove the tool identified by 'tool_id'. + Attempt to remove the tool identified by 'tool_id'. Ignores + tool lineage - so to remove a tool with potentially multiple + versions send remove_from_panel=False and handle the logic of + promoting the next newest version of the tool into the panel + if needed. """ if tool_id not in self.tools_by_id: message = "No tool with id %s" % escape( tool_id ) @@ -962,17 +966,18 @@ else: tool = self.tools_by_id[ tool_id ] del self.tools_by_id[ tool_id ] - tool_key = 'tool_' + tool_id - for key, val in self.tool_panel.items(): - if key == tool_key: - del self.tool_panel[ key ] - break - elif key.startswith( 'section' ): - if tool_key in val.elems: - del self.tool_panel[ key ].elems[ tool_key ] + if remove_from_panel: + tool_key = 'tool_' + tool_id + for key, val in self.tool_panel.items(): + if key == tool_key: + del self.tool_panel[ key ] break - if tool_id in self.data_manager_tools: - del self.data_manager_tools[ tool_id ] + elif key.startswith( 'section' ): + if tool_key in val.elems: + del self.tool_panel[ key ].elems[ tool_key ] + break + if tool_id in self.data_manager_tools: + del self.data_manager_tools[ tool_id ] #TODO: do we need to manually remove from the integrated panel here? message = "Removed the tool:<br/>" message += "<b>name:</b> %s<br/>" % tool.name diff -r 01293fc1f16715121524b987fcab031f3e149a02 -r 7716c8fbb891eb18f81bc80fc5f85f735d025357 lib/tool_shed/galaxy_install/tools/tool_panel_manager.py --- a/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py +++ b/lib/tool_shed/galaxy_install/tools/tool_panel_manager.py @@ -490,8 +490,8 @@ # Remove the tools from the toolbox's tools_by_id dictionary. for guid_to_remove in guids_to_remove: - if guid_to_remove in toolbox.tools_by_id: - del toolbox.tools_by_id[ guid_to_remove ] + # remove_from_tool_panel to false, will handling that logic below. + toolbox.remove_tool_by_id( guid_to_remove, remove_from_panel=False ) index, shed_tool_conf_dict = self.get_shed_tool_conf_dict( shed_tool_conf ) if uninstall: # Remove from the shed_tool_conf file on disk. https://bitbucket.org/galaxy/galaxy-central/commits/75e5db40bd2e/ Changeset: 75e5db40bd2e User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Eliminate walking over tools_by_id externally from toolbox. Affected #: 2 files diff -r 7716c8fbb891eb18f81bc80fc5f85f735d025357 -r 75e5db40bd2e6bfb481b500081a3d8b066063541 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -535,6 +535,9 @@ .filter( self.app.install_model.ToolVersion.table.c.tool_id == tool_id ) \ .first() + def tools( self ): + return self.tools_by_id.iteritems() + def __get_tool_shed_repository( self, tool_shed, name, owner, installed_changeset_revision ): # We store only the port, if one exists, in the database. tool_shed = common_util.remove_protocol_from_tool_shed_url( tool_shed ) diff -r 7716c8fbb891eb18f81bc80fc5f85f735d025357 -r 75e5db40bd2e6bfb481b500081a3d8b066063541 lib/galaxy/tools/search/__init__.py --- a/lib/galaxy/tools/search/__init__.py +++ b/lib/galaxy/tools/search/__init__.py @@ -27,7 +27,7 @@ self.index = self.storage.create_index( schema ) writer = self.index.writer() ## TODO: would also be nice to search section headers. - for id, tool in self.toolbox.tools_by_id.iteritems(): + for id, tool in self.toolbox.tools(): add_doc_kwds = { "id": id, "title": to_unicode(tool.name), https://bitbucket.org/galaxy/galaxy-central/commits/4844fa109944/ Changeset: 4844fa109944 User: jmchilton Date: 2014-12-25 18:35:13+00:00 Summary: Abstractions for registering tools from outside toolbox. Part of effort to further limit exposing tools_by_id directly outside Toolbox. Affected #: 4 files diff -r 75e5db40bd2e6bfb481b500081a3d8b066063541 -r 4844fa1099447fb8397159be710c99a82726821a lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -535,7 +535,7 @@ del self.datatype_converters[ source_datatype ][ target_datatype ] self.log.debug( "Deactivated converter: %s", converter.id ) else: - toolbox.tools_by_id[ converter.id ] = converter + toolbox.register_tool( converter ) if source_datatype not in self.datatype_converters: self.datatype_converters[ source_datatype ] = odict() self.datatype_converters[ source_datatype ][ target_datatype ] = converter @@ -644,8 +644,7 @@ tmp_name = tempfile.NamedTemporaryFile() tmp_name.write( tool_xml_text ) tmp_name.flush() - set_meta_tool = toolbox.load_tool( tmp_name.name ) - toolbox.tools_by_id[ set_meta_tool.id ] = set_meta_tool + set_meta_tool = toolbox.load_hidden_tool( tmp_name.name ) self.set_external_metadata_tool = set_meta_tool self.log.debug( "Loaded external metadata tool: %s", self.set_external_metadata_tool.id ) diff -r 75e5db40bd2e6bfb481b500081a3d8b066063541 -r 4844fa1099447fb8397159be710c99a82726821a lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -804,6 +804,17 @@ self.tool_watcher.watch_file( config_file, tool.id ) return tool + def load_hidden_tool( self, config_file, **kwds ): + """ Load a hidden tool (in this context meaning one that does not + appear in the tool panel) and register it in tools_by_id. + """ + tool = self.load_tool( config_file, **kwds ) + self.register_tool( tool ) + return tool + + def register_tool( self, tool ): + self.tools_by_id[ tool.id ] = tool + def package_tool( self, trans, tool_id ): """ Create a tarball with the tool's xml, help images, and test data. diff -r 75e5db40bd2e6bfb481b500081a3d8b066063541 -r 4844fa1099447fb8397159be710c99a82726821a lib/galaxy/tools/data_manager/manager.py --- a/lib/galaxy/tools/data_manager/manager.py +++ b/lib/galaxy/tools/data_manager/manager.py @@ -244,12 +244,12 @@ return self.guid or self.declared_id #if we have a guid, we will use that as the data_manager id def load_tool( self, tool_filename, guid=None, data_manager_id=None, tool_shed_repository_id=None ): - tool = self.data_managers.app.toolbox.load_tool( tool_filename, - guid=guid, - data_manager_id=data_manager_id, - repository_id=tool_shed_repository_id ) + toolbox = self.data_managers.app.toolbox + tool = toolbox.load_hidden_tool( tool_filename, + guid=guid, + data_manager_id=data_manager_id, + repository_id=tool_shed_repository_id ) self.data_managers.app.toolbox.data_manager_tools[ tool.id ] = tool - self.data_managers.app.toolbox.tools_by_id[ tool.id ] = tool self.tool = tool return tool diff -r 75e5db40bd2e6bfb481b500081a3d8b066063541 -r 4844fa1099447fb8397159be710c99a82726821a lib/galaxy/tools/imp_exp/__init__.py --- a/lib/galaxy/tools/imp_exp/__init__.py +++ b/lib/galaxy/tools/imp_exp/__init__.py @@ -40,14 +40,12 @@ tmp_name = tempfile.NamedTemporaryFile() tmp_name.write( tool_xml_text ) tmp_name.flush() - history_exp_tool = toolbox.load_tool( tmp_name.name ) - toolbox.tools_by_id[ history_exp_tool.id ] = history_exp_tool + history_exp_tool = toolbox.load_hidden_tool( tmp_name.name ) log.debug( "Loaded history export tool: %s", history_exp_tool.id ) # Load import tool. tool_xml = os.path.join( os.getcwd(), "lib/galaxy/tools/imp_exp/imp_history_from_archive.xml" ) - history_imp_tool = toolbox.load_tool( tool_xml ) - toolbox.tools_by_id[ history_imp_tool.id ] = history_imp_tool + history_imp_tool = toolbox.load_hidden_tool( tool_xml ) log.debug( "Loaded history import tool: %s", history_imp_tool.id ) 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.
participants (1)
-
commits-noreply@bitbucket.org