spacr.flowview.model¶
Dependency-free data model for a FlowView run graph.
Classes¶
Module Contents¶
- class spacr.flowview.model.Edge[source]¶
A directed transfer between two nodes.
- Parameters:
src – identifier of the node producing the transfer.
dst – identifier of the node receiving the transfer.
label – optional relationship or payload caption, such as
"consumes"or"produces".volume – optional number of objects, files, or rows transferred; the renderer uses it to scale edge width.
- class spacr.flowview.model.Node[source]¶
One immutable snapshot of a pipeline stage or artifact.
- Parameters:
id – stable identifier used by events and graph edges.
label – human-readable stage or artifact name shown in FlowView.
kind – input, process, or output role controlling the node’s meaning and presentation.
state – current lifecycle state, normalized to
NodeState.started_at – start time in seconds on the producer’s clock, if known.
ended_at – completion, failure, or skip time on that clock, if known.
progress – completed and total work-unit counts, or
Nonebefore a stage reports progress.metrics – named scalar results displayed on the node and retained in exported provenance.
thumbnail – path of a cached representative image, if provided.
params – stage configuration or provenance values displayed in the inspector and retained in exports.
error – formatted failure diagnostic, or
Nonewhen no failure was recorded.
- class spacr.flowview.model.NodeKind[source]¶
-
The role a node plays in a pipeline graph.
Initialize self. See help(type(self)) for accurate signature.
- class spacr.flowview.model.NodeState[source]¶
-
Lifecycle state of a pipeline node.
Initialize self. See help(type(self)) for accurate signature.
- class spacr.flowview.model.RunGraph[source]¶
A serialisable snapshot of one FlowView run.
- Parameters:
run_id – stable identifier for the captured run.
started_at – run start time in seconds on the producer’s clock.
nodes – node identifiers mapped to their immutable snapshots.
edges – directed transfers connecting the recorded nodes.
spacr_version – spaCR version that produced the run.
settings_digest – hash of the settings used for the run.
- classmethod from_dict(payload: Mapping[str, Any]) RunGraph[source]¶
Restore a graph from
to_dict()output.- Parameters:
payload – mapping with the
run_id,started_at,nodes,edges,spacr_versionandsettings_digestkeysto_dict()writes; every key is required and a missing one raisesKeyError.