base_registry

Functionality to register, initialize and retrieve glotaran plugins.

Since this module is imported at the root __init__.py file all other glotaran imports should be used for typechecking only in the ‘if TYPE_CHECKING’ block. This is to prevent issues with circular imports.

Functions

Summary

add_instantiated_plugin_to_registry

Add instances of plugin_class to the given registry.

add_plugin_to_registry

Add a plugin with name plugin_register_key to the given registry.

full_plugin_name

Full name of a plugin instance/class similar to the repr.

get_method_from_plugin

Retrieve a method callabe from an class or instance plugin.

get_plugin_from_registry

Retrieve a plugin with name plugin_register_key is registered in a given registry.

is_registered_plugin

Check if a plugin with name plugin_register_key is registered in the given registry.

load_plugins

Initialize plugins registered under the entrypoint 'glotaran.plugins'.

methods_differ_from_baseclass

Check if a plugins methods implementation differ from its baseclass.

methods_differ_from_baseclass_table

Create table of which plugins methods differ from their baseclass.

registered_plugins

Names of the plugins in the given registry.

set_plugin

Set a plugins short name to a specific plugin referred by its full name.

show_method_help

Show help on a method as if it was called directly on it.

supported_file_extensions

Get file extensions for plugins that support all methods in method_names.

Exceptions

Exception Summary

PluginOverwriteWarning

Warning used if a plugin tries to overwrite and existing plugin.