hydromodpy.core.contracts.workflow_step#
Canonical Step Protocol shared by every workflow concern.
The runtime-checkable WorkflowStep Protocol enforces the minimum
contract every pipeline step must honour: a stable name and a run
method that maps an input state to an output state. Two extra hooks are
honoured opportunistically:
depends_on() -> tuple[str, ...]Names of upstream steps whose output state must exist. The Kahn DAG sort consumes this method to compute parallel cohorts.
rebuild_state(prior_state, workspace, run_id)Reconstruct an output state from durable artefacts only. Used at resume time so heavy work (solver runs, extraction) is not redone.
artifacts(state_out) -> tuple[str, ...]Workspace-relative paths persisted by the step. The runner hashes the set to produce
outputs_hashrows in the workflow ledger.
Concrete implementations live under hydromodpy.workflow.steps and
re-expose this Protocol via hydromodpy.workflow.internals.step.
Functions
|
Read the |
|
Return the canonical name of a workflow step (class attribute). |
Classes
|
Workflow step that persists durable artefacts and supports resume. |
|
Canonical workflow step contract with DAG dependency hooks. |