commit/galaxy-central: jmchilton: Allow specification of multiple datatypes_conf.xml files.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/16e4b33e850e/ Changeset: 16e4b33e850e User: jmchilton Date: 2014-12-14 18:16:11+00:00 Summary: Allow specification of multiple datatypes_conf.xml files. If there are conflicting datatype registrations - the registration that appears last in these files will be used. There is an open issue here regarding order of sniffers. This is going to just piggy back on whatever the tool shed would do - so however we decide for instance to resolve sniffer orders in that respect will work with this mechanism as well. For now though - lets just specify that the best practice should be to just place all non-shed sniffers in one file if specifing multiple datatypes configurations manually like this. Affected #: 2 files diff -r 1422966f1ca88472b8685015f5a8cdd3dd0f1db9 -r 16e4b33e850e1a644624d97ecf676bbaaf1aabf9 config/galaxy.ini.sample --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -212,8 +212,10 @@ # Directory where chrom len files are kept, currently mainly used by trackster #len_file_path = tool-data/shared/ucsc/chrom -# Datatypes config file, defines what data (file) types are available in -# Galaxy (.sample is used if default does not exist). +# Datatypes config file(s), defines what data (file) types are available in +# Galaxy (.sample is used if default does not exist). If a datatype appears in +# multiple files - the last definition is used (though the first sniffer is used +# so limit sniffer definitions to one file). #datatypes_config_file = config/datatypes_conf.xml # Disable the 'Auto-detect' option for file uploads diff -r 1422966f1ca88472b8685015f5a8cdd3dd0f1db9 -r 16e4b33e850e1a644624d97ecf676bbaaf1aabf9 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -583,8 +583,9 @@ for path in tool_configs: if not os.path.exists( path ): raise ConfigurationError("Tool config file not found: %s" % path ) - if not os.path.isfile( self.datatypes_config ): - raise ConfigurationError("Datatypes config file not found: %s" % self.datatypes_config ) + for datatypes_config in listify( self.datatypes_config ): + if not os.path.isfile( datatypes_config ): + raise ConfigurationError("Datatypes config file not found: %s" % datatypes_config ) # Check for deprecated options. for key in self.config_dict.keys(): if key in self.deprecated_options: @@ -746,7 +747,12 @@ # between 2 proprietary datatypes, the datatype from the repository that was installed earliest will take precedence. installed_repository_manager.load_proprietary_datatypes() # Load the data types in the Galaxy distribution, which are defined in self.config.datatypes_config. - self.datatypes_registry.load_datatypes( self.config.root, self.config.datatypes_config ) + datatypes_configs = self.config.datatypes_config + for datatypes_config in listify( datatypes_configs ): + # Setting override=False would make earlier files would take + # precedence - but then they wouldn't override tool shed + # datatypes. + self.datatypes_registry.load_datatypes( self.config.root, datatypes_config, override=True ) def _configure_object_store( self, **kwds ): from galaxy.objectstore import build_object_store_from_config 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