Skip to content

Commit

Permalink
Write out datatype registry when loading set_metadata tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 1, 2017
1 parent 5e7da2c commit 5a26896
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/galaxy/app.py
Expand Up @@ -123,7 +123,6 @@ def __init__( self, **kwargs ):
# Load datatype converters defined in local datatypes_conf.xml
self.datatypes_registry.load_datatype_converters( self.toolbox )
# Load external metadata tool
self.datatypes_registry.to_xml_file()
self.datatypes_registry.load_external_metadata_tool( self.toolbox )
# Load history import/export tools.
load_lib_tools( self.toolbox )
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/datatypes/registry.py
Expand Up @@ -663,6 +663,7 @@ def load_external_metadata_tool( self, toolbox ):
# 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 load 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 difficult...so we bundle with Galaxy.
self.to_xml_file()
set_meta_tool = toolbox.load_hidden_lib_tool( "galaxy/datatypes/set_metadata_tool.xml" )
self.set_external_metadata_tool = set_meta_tool
self.log.debug( "Loaded external metadata tool: %s", self.set_external_metadata_tool.id )
Expand Down Expand Up @@ -856,7 +857,6 @@ def edam_data( self ):
def integrated_datatypes_configs( self ):
if self.xml_filename and os.path.isfile( self.xml_filename ):
return self.xml_filename
self.to_xml_file()
return self.xml_filename

def to_xml_file( self ):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/queue_worker.py
Expand Up @@ -110,8 +110,8 @@ def _get_new_toolbox(app):
new_toolbox = tools.ToolBox(tool_configs, app.config.tool_path, app)
new_toolbox.data_manager_tools = app.toolbox.data_manager_tools
app.datatypes_registry.load_datatype_converters(new_toolbox, use_cached=True)
app.datatypes_registry.load_external_metadata_tool(new_toolbox)
load_lib_tools(new_toolbox)
new_toolbox.load_hidden_lib_tool( "galaxy/datatypes/set_metadata_tool.xml" )
[new_toolbox.register_tool(tool) for tool in new_toolbox.data_manager_tools.values()]
app.toolbox = new_toolbox
send_local_control_task(app, 'rebuild_toolbox_search_index')
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parser/xml.py
Expand Up @@ -594,7 +594,7 @@ def __parse_param_elem( param_elem, i=0 ):
else:
value = None
attrib['children'] = param_elem
if attrib['children']:
if attrib['children'] is not None:
# At this time, we can assume having children only
# occurs on DataToolParameter test items but this could
# change and would cause the below parsing to change
Expand Down
2 changes: 0 additions & 2 deletions lib/tool_shed/galaxy_install/installed_repository_manager.py
Expand Up @@ -129,7 +129,6 @@ def activate_repository( self, repository ):
display_path = installed_repository_dict.get( 'display_path' )
if display_path is not None:
cdl.load_installed_display_applications( installed_repository_dict, deactivate=False )
self.app.datatypes_registry.to_xml_file()

def add_entry_to_installed_repository_dependencies_of_installed_repositories( self, repository ):
"""
Expand Down Expand Up @@ -740,7 +739,6 @@ def load_proprietary_datatypes( self ):
installed_repository_dict = cdl.load_installed_datatypes( tool_shed_repository, relative_install_dir )
if installed_repository_dict:
self.installed_repository_dicts.append( installed_repository_dict )
self.app.datatypes_registry.to_xml_file()

def load_proprietary_converters_and_display_applications( self, deactivate=False ):
cdl = custom_datatype_manager.CustomDatatypeLoader( self.app )
Expand Down

0 comments on commit 5a26896

Please sign in to comment.