phenotypic.tools_.register.register_analysis#

phenotypic.tools_.register.register_analysis(cls: type[BaseAnalysisPlugin]) type[BaseAnalysisPlugin][source]

Decorator to register an analysis plugin class.

The class must have a call_name class attribute used as the registration key and HTML ID prefix.

Parameters:

cls (type[BaseAnalysisPlugin]) – Analysis plugin class to register.

Returns:

The registered class (unchanged).

Return type:

type[BaseAnalysisPlugin]

Examples

>>> @register_analysis
... class MyPlugin(BaseAnalysisPlugin):
...     call_name = "my_analysis"
...     display_name = "My Analysis"
...
...     def css(self): ...
...     def html(self): ...
...     def js(self): ...