phenotypic.tools_.register.register_dashboard#

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

Decorator to register a dashboard class.

The class must have a call_name class attribute that matches the method name for dispatch.

Parameters:

cls (type) – Dashboard class to register.

Returns:

The registered class (unchanged).

Return type:

type

Examples

>>> @register_dashboard
... class MyDashboard(BaseDashboard):
...     call_name = "my_dashboard"
...
...     def my_dashboard(self, **kwargs):
...         ...