toil.lib.plugins¶
Generic plugin system for Toil plugins.
Plugins come in Python packages named:
toil_{PLUGIN_TYPE}_{WHATEVER}
When looking for plugins, Toil will list all the Python packages with the right
name prefix for the given type of plugin, and load them. The plugin modules
then have an opportunity to import register_plugin() and register
themselves.
Attributes¶
Functions¶
|
Adds a plugin to the registry for the given type of plugin. |
|
Removes a plugin from the registry for the given type of plugin. |
|
Get the names of all the available plugins of the given type. |
|
Get a plugin class factory function by name. |
Module Contents¶
- toil.lib.plugins.PluginType¶
- toil.lib.plugins.register_plugin(plugin_type, plugin_name, plugin_being_registered)[source]¶
Adds a plugin to the registry for the given type of plugin.
- Parameters:
plugin_name (str) – For batch systems, this is the string the user will use to select the batch system on the command line with
--batchSystem. For URL access plugins, this is the URL scheme that the plugin implements.plugin_being_registered (Any) – This is a function that, when called, imports and returns a plugin-provided class type. For batch systems, the resulting type must extend
toil.batchSystems.abstractBatchSystem.AbstractBatchSystem. For URL access plugins, it must extendtoil.lib.url.URLAccess. Note that the function used here should return the class itself; it should not construct an instance of the class.plugin_type (PluginType)
- Return type:
None
- toil.lib.plugins.remove_plugin(plugin_type, plugin_name)[source]¶
Removes a plugin from the registry for the given type of plugin.
- Parameters:
plugin_type (PluginType)
plugin_name (str)
- Return type:
None