nvalchemi.hooks.HookRegistryMixin#
- class nvalchemi.hooks.HookRegistryMixin[source]#
Mixin providing flat-list hook storage and dispatch.
The host class must provide a
step_countattribute. Override_build_contextto populate workflow-specific fields.Set
_stage_typeon the host class to restrict which stage enum types may be registered. When set,register_hookraisesTypeErrorifhook.stageis not an instance of the declared type(s).- step_count#
Current step number (must be provided by the engine).
- Type:
int
- _stage_type#
Accepted stage enum type(s).
Nonedisables validation.- Type:
type[Enum] | tuple[type[Enum], …] | None
- __init__()#
Methods
__init__()register_hook(hook[, stage])Register a hook.
Attributes