Step#

class causalpy.pipeline.Step[source]#

Protocol that all pipeline steps must satisfy.

Implementations must provide two methods:

  • validate – called before any step runs. Should raise on configuration errors (wrong types, missing parameters, etc.).

  • run – called sequentially. Receives the shared PipelineContext, mutates it, and returns it.

Methods

Step.__init__(*args, **kwargs)

Step.run(context)

Execute the step, mutating and returning the context.

Step.validate(context)

Check configuration before execution.

__init__(*args, **kwargs)#
classmethod __new__(*args, **kwargs)#