commit/galaxy-central: greg: Only persist the datatypes registry when the load_datatypes() method is called. Tools and metadata setting processes that create their own datatypes registry will use the existing temporary file rather than persisting the registry themselves.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/10e0d2765f24/ changeset: 10e0d2765f24 user: greg date: 2011-12-18 19:49:26 summary: Only persist the datatypes registry when the load_datatypes() method is called. Tools and metadata setting processes that create their own datatypes registry will use the existing temporary file rather than persisting the registry themselves. affected #: 4 files diff -r 4ee7b5f6b23db6f92bfe6b895bb6db5f4cf4d7b1 -r 10e0d2765f24c32f840be414d88bf813321e41b5 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -174,6 +174,9 @@ 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 ) ) ) + # 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() # Default values. if not self.datatypes_by_extension: self.datatypes_by_extension = { @@ -466,4 +469,3 @@ os.write( fd, '</sniffers>\n' ) os.write( fd, '</datatypes>\n' ) os.close( fd ) - return os.path.abspath( filename ) diff -r 4ee7b5f6b23db6f92bfe6b895bb6db5f4cf4d7b1 -r 10e0d2765f24c32f840be414d88bf813321e41b5 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -868,7 +868,7 @@ if config_root is None: config_root = self.app.config.root if datatypes_config is None: - datatypes_config = self.app.datatypes_registry.to_xml_file() + datatypes_config = self.app.datatypes_registry.xml_filename return self.external_output_metadata.setup_external_metadata( [ output_dataset_assoc.dataset for output_dataset_assoc in job.output_datasets ], self.sa_session, exec_dir = exec_dir, diff -r 4ee7b5f6b23db6f92bfe6b895bb6db5f4cf4d7b1 -r 10e0d2765f24c32f840be414d88bf813321e41b5 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1672,8 +1672,7 @@ # For the upload tool, we need to know the root directory and the # datatypes conf path, so we can load the datatypes registry param_dict['__root_dir__'] = param_dict['GALAXY_ROOT_DIR'] = os.path.abspath( self.app.config.root ) - datatypes_config = self.app.datatypes_registry.to_xml_file() - param_dict['__datatypes_config__'] = param_dict['GALAXY_DATATYPES_CONF_FILE'] = datatypes_config + param_dict['__datatypes_config__'] = param_dict['GALAXY_DATATYPES_CONF_FILE'] = self.app.datatypes_registry.xml_filename # Return the dictionary of parameters return param_dict diff -r 4ee7b5f6b23db6f92bfe6b895bb6db5f4cf4d7b1 -r 10e0d2765f24c32f840be414d88bf813321e41b5 lib/galaxy/tools/actions/metadata.py --- a/lib/galaxy/tools/actions/metadata.py +++ b/lib/galaxy/tools/actions/metadata.py @@ -51,7 +51,7 @@ dataset_files_path = trans.app.model.Dataset.file_path, output_fnames = None, config_root = None, - datatypes_config = trans.app.datatypes_registry.to_xml_file(), + datatypes_config = trans.app.datatypes_registry.xml_filename, job_metadata = None, kwds = { 'overwrite' : overwrite } ) incoming[ '__SET_EXTERNAL_METADATA_COMMAND_LINE__' ] = cmd_line 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