phenotypic.tools_.register.DashboardRegistry#
- class phenotypic.tools_.register.DashboardRegistry[source]
Bases:
BaseRegistryRegistry for dashboard classes (duck-typed, no strict base).
Dashboards are registered by their
call_nameclass attribute, which must match the method name used for dispatch (e.g.,call_name = "detect_modes"corresponds toimage.panel.detect_modes()).Dashboards may have optional dependencies (e.g., Panel). Classes should only be registered when their dependencies are available.
Methods
__init__Return names of all registered components.
Look up registered class by name.
Decorator that registers a class by its
call_nameclass attribute.- classmethod get(name: str) type[T]
Look up registered class by name.
- Parameters:
name (str) – The registered name of the component.
- Returns:
The registered class.
- Raises:
ValueError – If name is not registered.
- Return type:
type[T]
- classmethod register(target_cls: type[T]) type[T]
Decorator that registers a class by its
call_nameclass attribute.If
call_nameis not defined on the class, defaults to the class name.- Parameters:
target_cls (type[T]) – The class to register.
- Returns:
The registered class (unchanged).
- Raises:
ValueError – If a component with the same name is already registered.
- Return type:
type[T]