commit/galaxy-central: greg: Enhance the process of deactivating / activating installed tool shed repositories by handling the deactivation / reactivation of proprietary datatypes, datatype converters and display applications.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/1a4be690f503/ changeset: 1a4be690f503 user: greg date: 2012-01-17 16:54:15 summary: Enhance the process of deactivating / activating installed tool shed repositories by handling the deactivation / reactivation of proprietary datatypes, datatype converters and display applications. affected #: 5 files diff -r e3f4aca57f838e3b6fb6dc114a25ea62b5f34317 -r 1a4be690f5038e78a6f5abe21b9552293b911a53 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -48,13 +48,22 @@ self.datatype_elems = [] self.sniffer_elems = [] self.xml_filename = None - def load_datatypes( self, root_dir=None, config=None, imported_modules=None ): + def load_datatypes( self, root_dir=None, config=None, imported_modules=None, deactivate=False ): + """ + Parse a datatypes XML file located at root_dir/config. If imported_modules is received, it + is a list of imported datatypes class files included in an installed tool shed repository. + If deactivate is received as True, an installed tool shed repository that includes proprietary + datatypes is being deactivated, so relevant loaded datatypes will be removed from the registry. + """ if root_dir and config: # Parse datatypes_conf.xml tree = galaxy.util.parse_xml( config ) root = tree.getroot() # Load datatypes and converters from config - self.log.debug( 'Loading datatypes from %s' % config ) + if deactivate: + self.log.debug( 'Deactivating datatypes from %s' % config ) + else: + self.log.debug( 'Loading datatypes from %s' % config ) registration = root.find( 'registration' ) # Set default paths defined in local datatypes_conf.xml. if not self.converters_path: @@ -66,8 +75,6 @@ self.display_path_attr = registration.get( 'display_path', 'display_applications' ) self.display_applications_path = os.path.join( root_dir, self.display_path_attr ) for elem in registration.findall( 'datatype' ): - # Keep an in-memory list of datatype elems to enable persistence. - self.datatype_elems.append( elem ) try: extension = elem.get( 'extension', None ) dtype = elem.get( 'type', None ) @@ -75,9 +82,30 @@ mimetype = elem.get( 'mimetype', None ) display_in_upload = elem.get( 'display_in_upload', False ) make_subclass = galaxy.util.string_as_bool( elem.get( 'subclass', False ) ) + if deactivate: + # We are deactivating an installed tool shed repository, so eliminate the + # datatype elem from the in-memory list of datatype elems. + for in_memory_elem in self.datatype_elems: + in_memory_extension = in_memory_elem.get( 'extension', None ) + if in_memory_extension == extension: + in_memory_dtype = elem.get( 'type', None ) + in_memory_type_extension = elem.get( 'type_extension', None ) + in_memory_mimetype = elem.get( 'mimetype', None ) + in_memory_display_in_upload = elem.get( 'display_in_upload', False ) + in_memory_make_subclass = galaxy.util.string_as_bool( elem.get( 'subclass', False ) ) + if in_memory_dtype == dtype and in_memory_type_extension == type_extension and in_memory_mimetype == mimetype \ + and in_memory_display_in_upload == display_in_upload and in_memory_make_subclass == make_subclass: + self.datatype_elems.remove( in_memory_elem ) + else: + # Keep an in-memory list of datatype elems to enable persistence. + self.datatype_elems.append( elem ) if extension and extension in self.datatypes_by_extension: - self.log.debug( "Ignoring datatype with extension '%s' from '%s' because the registry already includes a datatype with that extension." \ - % ( extension, config ) ) + if deactivate: + # We are deactivating an installed tool shed repository, so eliminate the datatype from the registry. + self.log.debug( "Removing datatype with extension '%s' from the registry." % extension ) + del self.datatypes_by_extension[ extension ] + else: + self.log.debug( "Ignoring datatype with extension '%s' from '%s' because the registry already contains a datatype with that extension." % ( extension, config ) ) elif extension and ( dtype or type_extension ): if dtype: fields = dtype.split( ':' ) @@ -144,7 +172,10 @@ if elem not in self.display_app_containers: self.display_app_containers.append( elem ) except Exception, e: - self.log.warning( 'Error loading datatype "%s", problem: %s' % ( extension, str( e ) ) ) + if deactivate: + self.log.warning( 'Error deactivating datatype "%s": %s' % ( extension, str( e ) ) ) + else: + self.log.warning( 'Error loading datatype "%s": %s' % ( extension, str( e ) ) ) # Load datatype sniffers from the config sniffers = root.find( 'sniffers' ) if sniffers: @@ -158,13 +189,20 @@ datatype_module = fields[0] datatype_class = fields[1] module = __import__( datatype_module ) - for comp in datatype_module.split('.')[1:]: - module = getattr(module, comp) - aclass = getattr( module, datatype_class )() - self.sniff_order.append( aclass ) - self.log.debug( 'Loaded sniffer for datatype: %s' % dtype ) + for comp in datatype_module.split( '.' )[ 1: ]: + module = getattr( module, comp ) + aclass = getattr( module, datatype_class )() + if deactivate: + self.sniff_order.remove( aclass ) + self.log.debug( 'Deactivated sniffer for datatype: %s' % dtype ) + else: + self.sniff_order.append( aclass ) + self.log.debug( 'Loaded sniffer for datatype: %s' % dtype ) except Exception, exc: - self.log.warning( 'Error appending datatype %s to sniff_order, problem: %s' % ( dtype, str( exc ) ) ) + if deactivate: + self.log.warning( 'Error deactivating sniffer for datatype %s: %s' % ( dtype, str( exc ) ) ) + else: + self.log.warning( 'Error appending sniffer for datatype %s to sniff_order: %s' % ( dtype, str( exc ) ) ) # Persist the xml form of the registry into a temporary file so that it # can be loaded from the command line by tools and set_metadata processing. self.to_xml_file() @@ -316,9 +354,13 @@ setattr(newdata, key, value) newdata.ext = ext return newdata - def load_datatype_converters( self, toolbox, converter_path=None ): - """Adds datatype converters from self.converters to the calling app's toolbox""" - if converter_path: + def load_datatype_converters( self, toolbox, installed_repository_dict=None, deactivate=False ): + """ + If deactivate is False, add datatype converters from self.converters or self.proprietary_converters + to the calling app's toolbox. If deactivate is True, eliminates relevant converters from the calling + app's toolbox. + """ + if installed_repository_dict: # Load converters defined by datatypes_conf.xml # included in installed tool shed repository. converters = self.proprietary_converters @@ -329,21 +371,51 @@ tool_config = elem[0] source_datatype = elem[1] target_datatype = elem[2] - if converter_path: + if installed_repository_dict: + converter_path = installed_repository_dict[ 'converter_path' ] config_path = os.path.join( converter_path, tool_config ) else: config_path = os.path.join( self.converters_path, tool_config ) try: converter = toolbox.load_tool( config_path ) - toolbox.tools_by_id[ converter.id ] = converter - if source_datatype not in self.datatype_converters: - self.datatype_converters[ source_datatype ] = odict() - self.datatype_converters[ source_datatype ][ target_datatype ] = converter - self.log.debug( "Loaded converter: %s", converter.id ) + if installed_repository_dict: + # If the converter is included in an installed tool shed repository, set the tool + # shed related tool attributes. + converter.tool_shed = installed_repository_dict[ 'tool_shed' ] + converter.repository_name = installed_repository_dict[ 'repository_name' ] + converter.repository_owner = installed_repository_dict[ 'repository_owner' ] + converter.installed_changeset_revision = installed_repository_dict[ 'installed_changeset_revision' ] + converter.old_id = converter.id + # The converter should be included in the list of tools defined in tool_dicts. + tool_dicts = installed_repository_dict[ 'tool_dicts' ] + for tool_dict in tool_dicts: + if tool_dict[ 'id' ] == converter.id: + converter.guid = tool_dict[ 'guid' ] + converter.id = tool_dict[ 'guid' ] + break + if deactivate: + del toolbox.tools_by_id[ converter.id ] + if source_datatype in self.datatype_converters: + del self.datatype_converters[ source_datatype ][ target_datatype ] + self.log.debug( "Deactivated converter: %s", converter.id ) + else: + toolbox.tools_by_id[ converter.id ] = converter + if source_datatype not in self.datatype_converters: + self.datatype_converters[ source_datatype ] = odict() + self.datatype_converters[ source_datatype ][ target_datatype ] = converter + self.log.debug( "Loaded converter: %s", converter.id ) except Exception, e: - self.log.exception( "Error loading converter (%s): %s" % ( config_path, str( e ) ) ) - def load_display_applications( self, display_path=None ): - if display_path: + if deactivate: + self.log.exception( "Error deactivating converter (%s): %s" % ( config_path, str( e ) ) ) + else: + self.log.exception( "Error loading converter (%s): %s" % ( config_path, str( e ) ) ) + def load_display_applications( self, installed_repository_dict=None, deactivate=False ): + """ + If deactivate is False, add display applications from self.display_app_containers or + self.proprietary_display_app_containers to appropriate datatypes. If deactivate is + True, eliminates relevant display applications from appropriate datatypes. + """ + if installed_repository_dict: # Load display applications defined by datatypes_conf.xml # included in installed tool shed repository. datatype_elems = self.proprietary_display_app_containers @@ -354,7 +426,8 @@ extension = elem.get( 'extension', None ) for display_app in elem.findall( 'display' ): display_file = display_app.get( 'file', None ) - if display_path: + if installed_repository_dict: + display_path = installed_repository_dict[ 'display_path' ] config_path = os.path.join( display_path, display_file ) else: config_path = os.path.join( self.display_applications_path, display_file ) @@ -363,15 +436,43 @@ display_app = DisplayApplication.from_file( config_path, self ) if display_app: if display_app.id in self.display_applications: - # If we already loaded this display application, we'll use the first one loaded. - display_app = self.display_applications[ display_app.id ] - self.log.debug( "Loaded display application '%s' for datatype '%s', inherit=%s" % ( display_app.id, extension, inherit ) ) - self.display_applications[ display_app.id ] = display_app - self.datatypes_by_extension[ extension ].add_display_application( display_app ) - if inherit and ( self.datatypes_by_extension[ extension ], display_app ) not in self.inherit_display_application_by_class: - self.inherit_display_application_by_class.append( ( self.datatypes_by_extension[extension], display_app ) ) + if deactivate: + del self.display_applications[ display_app.id ] + else: + # If we already loaded this display application, we'll use the first one loaded. + display_app = self.display_applications[ display_app.id ] + elif installed_repository_dict: + # If the display application is included in an installed tool shed repository, + # set the tool shed related tool attributes. + display_app.tool_shed = installed_repository_dict[ 'tool_shed' ] + display_app.repository_name = installed_repository_dict[ 'repository_name' ] + display_app.repository_owner = installed_repository_dict[ 'repository_owner' ] + display_app.installed_changeset_revision = installed_repository_dict[ 'installed_changeset_revision' ] + display_app.old_id = display_app.id + # The converter should be included in the list of tools defined in tool_dicts. + tool_dicts = installed_repository_dict[ 'tool_dicts' ] + for tool_dict in tool_dicts: + if tool_dict[ 'id' ] == display_app.id: + display_app.guid = tool_dict[ 'guid' ] + display_app.id = tool_dict[ 'guid' ] + break + if deactivate: + del self.display_applications[ display_app.id ] + del self.datatypes_by_extension[ extension ].display_applications[ display_app.id ] + if inherit and ( self.datatypes_by_extension[ extension ], display_app ) in self.inherit_display_application_by_class: + self.inherit_display_application_by_class.remove( ( self.datatypes_by_extension[ extension ], display_app ) ) + self.log.debug( "Deactivated display application '%s' for datatype '%s'." % ( display_app.id, extension ) ) + else: + self.display_applications[ display_app.id ] = display_app + self.datatypes_by_extension[ extension ].add_display_application( display_app ) + if inherit and ( self.datatypes_by_extension[ extension ], display_app ) not in self.inherit_display_application_by_class: + self.inherit_display_application_by_class.append( ( self.datatypes_by_extension[ extension ], display_app ) ) + self.log.debug( "Loaded display application '%s' for datatype '%s', inherit=%s." % ( display_app.id, extension, inherit ) ) except Exception, e: - self.log.exception( "Error loading display application (%s): %s" % ( config_path, str( e ) ) ) + if deactivate: + self.log.exception( "Error deactivating display application (%s): %s" % ( config_path, str( e ) ) ) + else: + self.log.exception( "Error loading display application (%s): %s" % ( config_path, str( e ) ) ) # Handle display_application subclass inheritance. for extension, d_type1 in self.datatypes_by_extension.iteritems(): for d_type2, display_app in self.inherit_display_application_by_class: @@ -381,9 +482,9 @@ d_type1.add_display_application( display_app ) def load_external_metadata_tool( self, toolbox ): """Adds a tool which is used to set external metadata""" - #we need to be able to add a job to the queue to set metadata. The queue will currently only accept jobs with an associated tool. - #We'll create a special tool to be used for Auto-Detecting metadata; this is less than ideal, but effective - #Properly building a tool without relying on parsing an XML file is near impossible...so we'll create a temporary file + # We need to be able to add a job to the queue to set metadata. The queue will currently only accept jobs with an associated + # tool. We'll create a special tool to be used for Auto-Detecting metadata; this is less than ideal, but effective + # Properly building a tool without relying on parsing an XML file is near impossible...so we'll create a temporary file tool_xml_text = """ <tool id="__SET_METADATA__" name="Set External Metadata" version="1.0.1" tool_type="set_metadata"><type class="SetMetadataTool" module="galaxy.tools"/> diff -r e3f4aca57f838e3b6fb6dc114a25ea62b5f34317 -r 1a4be690f5038e78a6f5abe21b9552293b911a53 lib/galaxy/tool_shed/__init__.py --- a/lib/galaxy/tool_shed/__init__.py +++ b/lib/galaxy/tool_shed/__init__.py @@ -2,7 +2,7 @@ Classes encapsulating the management of repositories installed from Galaxy tool sheds. """ import os, logging -from galaxy.util.shed_util import load_datatypes +from galaxy.util.shed_util import create_repository_dict_for_proprietary_datatypes, load_datatype_items from galaxy.model.orm import * log = logging.getLogger(__name__) @@ -23,11 +23,5 @@ path_items = datatypes_config.split( 'repos' ) relative_install_dir = '%srepos/%s/%s/%s' % \ ( path_items[0], tool_shed_repository.owner, tool_shed_repository.name, tool_shed_repository.installed_changeset_revision ) - converter_path, display_path = load_datatypes( self.app, datatypes_config, relative_install_dir ) - if converter_path: - # Load proprietary datatype converters - self.app.datatypes_registry.load_datatype_converters( self.app.toolbox, converter_path=converter_path ) - if display_path: - # Load proprietary datatype display applications - app.datatypes_registry.load_display_applications( display_path=display_path ) + load_datatype_items( self.app, tool_shed_repository, relative_install_dir ) \ No newline at end of file diff -r e3f4aca57f838e3b6fb6dc114a25ea62b5f34317 -r 1a4be690f5038e78a6f5abe21b9552293b911a53 lib/galaxy/tool_shed/install_manager.py --- a/lib/galaxy/tool_shed/install_manager.py +++ b/lib/galaxy/tool_shed/install_manager.py @@ -84,6 +84,7 @@ relative_install_dir=relative_install_dir, current_working_dir=current_working_dir, tmp_name=tmp_name, + tool_shed=self.tool_shed, tool_section=tool_section, shed_tool_conf=self.install_tool_config, new_install=True ) diff -r e3f4aca57f838e3b6fb6dc114a25ea62b5f34317 -r 1a4be690f5038e78a6f5abe21b9552293b911a53 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -88,6 +88,14 @@ # overwrite it in case it contains stuff proprietary to the local instance. if not os.path.exists( os.path.join( tool_data_path, loc_file ) ): shutil.copy( os.path.abspath( filename ), os.path.join( tool_data_path, loc_file ) ) +def create_repository_dict_for_proprietary_datatypes( tool_shed, name, owner, installed_changeset_revision, tool_dicts, converter_path=None, display_path=None ): + return dict( tool_shed=tool_shed, + repository_name=name, + repository_owner=owner, + installed_changeset_revision=installed_changeset_revision, + tool_dicts=tool_dicts, + converter_path=converter_path, + display_path=display_path ) def create_or_update_tool_shed_repository( app, name, description, changeset_revision, repository_clone_url, metadata_dict, owner='' ): # This method is used by the InstallManager, which does not have access to trans. sa_session = app.model.context.current @@ -464,7 +472,28 @@ error = tmp_stderr.read() tmp_stderr.close() log.debug( 'Problem installing dependencies for tool "%s"\n%s' % ( repository_tool.name, error ) ) -def load_datatypes( app, datatypes_config, relative_install_dir ): +def load_datatype_items( app, repository, relative_install_dir, deactivate=False ): + # Load proprietary datatypes. + metadata = repository.metadata + datatypes_config = metadata.get( 'datatypes_config', None ) + if datatypes_config: + converter_path, display_path = load_datatypes( app, datatypes_config, relative_install_dir, deactivate=deactivate ) + if converter_path or display_path: + # Create a dictionary of tool shed repository related information. + repository_dict = create_repository_dict_for_proprietary_datatypes( tool_shed=repository.tool_shed, + name=repository.name, + owner=repository.owner, + installed_changeset_revision=repository.installed_changeset_revision, + tool_dicts=metadata.get( 'tools', [] ), + converter_path=converter_path, + display_path=display_path ) + if converter_path: + # Load or deactivate proprietary datatype converters + app.datatypes_registry.load_datatype_converters( app.toolbox, installed_repository_dict=repository_dict, deactivate=deactivate ) + if display_path: + # Load or deactivate proprietary datatype display applications + app.datatypes_registry.load_display_applications( installed_repository_dict=repository_dict, deactivate=deactivate ) +def load_datatypes( app, datatypes_config, relative_install_dir, deactivate=False ): # This method is used by the InstallManager, which does not have access to trans. def __import_module( relative_path, datatype_module ): sys.path.insert( 0, relative_path ) @@ -569,10 +598,10 @@ # are all subclasses of data types that are in the distribution. imported_modules = [] # Load proprietary datatypes - app.datatypes_registry.load_datatypes( root_dir=app.config.root, config=datatypes_config, imported_modules=imported_modules ) + app.datatypes_registry.load_datatypes( root_dir=app.config.root, config=datatypes_config, imported_modules=imported_modules, deactivate=deactivate ) return converter_path, display_path def load_repository_contents( app, repository_name, description, owner, changeset_revision, tool_path, repository_clone_url, relative_install_dir, - current_working_dir, tmp_name, tool_section=None, shed_tool_conf=None, new_install=True ): + current_working_dir, tmp_name, tool_shed=None, tool_section=None, shed_tool_conf=None, new_install=True ): # This method is used by the InstallManager, which does not have access to trans. # Generate the metadata for the installed tool shed repository. It is imperative that # the installed repository is updated to the desired changeset_revision before metadata @@ -592,16 +621,6 @@ section_name = '' tool_section_dict = dict( id=section_id, version=section_version, name=section_name ) metadata_dict = generate_metadata( app.toolbox, relative_install_dir, repository_clone_url, tool_section_dict=tool_section_dict ) - if 'datatypes_config' in metadata_dict: - datatypes_config = os.path.abspath( metadata_dict[ 'datatypes_config' ] ) - # Load data types required by tools. - converter_path, display_path = load_datatypes( app, datatypes_config, relative_install_dir ) - if converter_path: - # Load proprietary datatype converters - app.datatypes_registry.load_datatype_converters( app.toolbox, converter_path=converter_path ) - if display_path: - # Load proprietary datatype display applications - app.datatypes_registry.load_display_applications( display_path=display_path ) if 'tools' in metadata_dict: repository_tools_tups = get_repository_tools_tups( app, metadata_dict ) if repository_tools_tups: @@ -632,6 +651,25 @@ os.unlink( tmp_name ) except: pass + if 'datatypes_config' in metadata_dict: + datatypes_config = os.path.abspath( metadata_dict[ 'datatypes_config' ] ) + # Load data types required by tools. + converter_path, display_path = load_datatypes( app, datatypes_config, relative_install_dir ) + if converter_path or display_path: + # Create a dictionary of tool shed repository related information. + repository_dict = create_repository_dict_for_proprietary_datatypes( tool_shed=tool_shed, + name=repository_name, + owner=owner, + installed_changeset_revision=changeset_revision, + tool_dicts=metadata_dict.get( 'tools', [] ), + converter_path=converter_path, + display_path=display_path ) + if converter_path: + # Load proprietary datatype converters + app.datatypes_registry.load_datatype_converters( app.toolbox, installed_repository_dict=repository_dict ) + if display_path: + # Load proprietary datatype display applications + app.datatypes_registry.load_display_applications( installed_repository_dict=repository_dict ) # Add a new record to the tool_shed_repository table if one doesn't # already exist. If one exists but is marked deleted, undelete it. log.debug( "Adding new row (or updating an existing row) for repository '%s' in the tool_shed_repository table." % repository_name ) diff -r e3f4aca57f838e3b6fb6dc114a25ea62b5f34317 -r 1a4be690f5038e78a6f5abe21b9552293b911a53 lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -258,6 +258,7 @@ returncode, tmp_name = update_repository( current_working_dir, relative_install_dir, changeset_revision ) if returncode == 0: owner = get_repository_owner( clean_repository_clone_url( repository_clone_url ) ) + tool_shed = clean_tool_shed_url( tool_shed_url ) metadata_dict = load_repository_contents( app=trans.app, repository_name=name, description=description, @@ -268,6 +269,7 @@ relative_install_dir=relative_install_dir, current_working_dir=current_working_dir, tmp_name=tmp_name, + tool_shed=tool_shed, tool_section=tool_section, shed_tool_conf=shed_tool_conf, new_install=True ) @@ -328,6 +330,7 @@ remove_from_disk_checked = CheckboxField.is_checked( remove_from_disk ) repository = get_repository( trans, kwd[ 'id' ] ) if params.get( 'deactivate_or_uninstall_repository_button', False ): + # Deatcivate repository tools. shed_tool_conf, tool_path, relative_install_dir = self.__get_tool_path_and_relative_install_dir( trans, repository ) metadata = repository.metadata repository_tools_tups = get_repository_tools_tups( trans.app, metadata ) @@ -366,6 +369,8 @@ tool_path=tool_path, owner=repository.owner, add_to_config=False ) + # Deactivate proprietary datatypes. + load_datatype_items( trans.app, repository, relative_install_dir, deactivate=True ) if remove_from_disk_checked: # TODO: Remove repository from disk and alter the shed tool config. message = 'The repository named <b>%s</b> has been uninstalled.' % repository.name @@ -413,10 +418,6 @@ repository_tools_tups = get_repository_tools_tups( trans.app, metadata ) tool_panel_section = metadata[ 'tool_panel_section' ] section_id = tool_panel_section[ 'id' ] - # Generate the list of tool panel keys derived from the tools included in the repository. - #repository_tool_panel_keys = [] - #if repository_tools_tups: - # repository_tool_panel_keys = [ 'tool_%s' % repository_tools_tup[ 1 ] for repository_tools_tup in repository_tools_tups ] if section_id in [ '' ]: # If the repository includes tools, reload them into the tool panel outside of any sections. self.__activate( trans, repository, repository_tools_tups, tool_section=None, section_key=None ) @@ -447,11 +448,14 @@ id_attr = elem.get( 'id' ) if id_attr == section_id: tool_section = elem + # Load the tools. trans.app.toolbox.load_section_tag_set( tool_section, trans.app.toolbox.tool_panel, tool_path ) section_loaded = True break if section_loaded: break + # Load proprietary datatypes. + load_datatype_items( trans.app, repository, relative_install_dir ) message = 'The repository named <b>%s</b> has been activated.' % repository.name status = 'done' return trans.response.send_redirect( web.url_for( controller='admin_toolshed', @@ -459,6 +463,7 @@ message=message, status=status ) ) def __activate( self, trans, repository, repository_tools_tups, tool_section=None, section_key=None ): + # Load tools. if tool_section: elems = tool_section.elems for repository_tools_tup in repository_tools_tups: @@ -475,16 +480,18 @@ if tool_section: if tool.id not in elems: elems[ 'tool_%s' % tool.id ] = tool - log.debug( "Reactivated tool: %s %s" % ( tool.id, tool.version ) ) + log.debug( "Reactivated tool id: %s, version: %s" % ( tool.id, tool.version ) ) else: if tool.id not in trans.app.toolbox.tools_by_id: # Allow for the same tool to be loaded into multiple places in the tool panel. trans.app.toolbox.tools_by_id[ tool.id ] = tool trans.app.toolbox.tool_panel[ 'tool_%s' % tool.id ] = tool - log.debug( "Reactivated tool: %s %s" % ( tool.id, tool.version ) ) + log.debug( "Reactivated tool id: %s, version: %s" % ( tool.id, tool.version ) ) if tool_section: trans.app.toolbox.tool_panel[ section_key ] = tool_section log.debug( "Appended reactivated tool to section: %s" % tool_section.name ) + shed_tool_conf, tool_path, relative_install_dir = self.__get_tool_path_and_relative_install_dir( trans, repository ) + load_datatype_items( trans.app, repository, relative_install_dir ) @web.expose @web.require_admin def manage_repository( self, trans, **kwd ): @@ -556,6 +563,7 @@ if returncode == 0: # Update the repository metadata. repository_clone_url = os.path.join( tool_shed_url, 'repos', owner, name ) + tool_shed = clean_tool_shed_url( tool_shed_url ) metadata_dict = load_repository_contents( app=trans.app, name=name, description=repository.description, @@ -566,6 +574,7 @@ relative_install_dir=relative_install_dir, current_working_dir=current_working_dir, tmp_name=tmp_name, + tool_shed=tool_shed, tool_section=None, shed_tool_conf=None, new_install=False ) 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)
-
Bitbucket