mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Re-engineer the datatypes registry so that it is initialized once when the Galaxy server is started, but data types can continue to be loaded throughout the Galaxy server's session (hopefully this doesn't break anything).
Add support for a single "import_module" to be passed to the new load_datatypes() method in the datatypes registry. This provides the ability to load a single class module from an installed tool shed repository along with a datatypes_conf.xml file included in the installed repository and pass them to the new load_datatypes() method. In the future, multiple imported modules may be allowed. The datatypes_conf.xml file included in the repository must conform to a slightly different definition than the same named file that comes with the distribution. This new definition will be documented in the Galaxy tool shed wiki. We now have the ability to load new data types into the Galaxy server from an installed tool shed repository without restarting the Galaxy server.
This commit is contained in:
@@ -244,7 +244,9 @@ def main():
|
||||
else:
|
||||
# FIXME: This doesn't work at all now that toolbox requires an 'app' instance
|
||||
# (to get at datatypes, might just pass a datatype registry directly)
|
||||
my_app = bunch.Bunch( datatypes_registry = galaxy.datatypes.registry.Registry() )
|
||||
datatypes_registry = galaxy.datatypes.registry.Registry()
|
||||
datatypes_registry.load_datatypes()
|
||||
my_app = bunch.Bunch( datatypes_registry )
|
||||
test_toolbox.toolbox = tools.ToolBox( 'tool_conf.xml.test', 'tools', my_app )
|
||||
|
||||
# ---- Find tests ---------------------------------------------------------
|
||||
|
||||
@@ -37,7 +37,9 @@ def __main__():
|
||||
# Set up datatypes registry
|
||||
config_root = sys.argv.pop( 1 )
|
||||
datatypes_config = sys.argv.pop( 1 )
|
||||
galaxy.model.set_datatypes_registry( galaxy.datatypes.registry.Registry( config_root, datatypes_config ) )
|
||||
datatypes_registry = galaxy.datatypes.registry.Registry()
|
||||
datatypes_registry.load_datatypes( root_dir=config_root, config=datatypes_config )
|
||||
galaxy.model.set_datatypes_registry( datatypes_registry )
|
||||
|
||||
job_metadata = sys.argv.pop( 1 )
|
||||
ext_override = dict()
|
||||
|
||||
Reference in New Issue
Block a user