phenotypic.gui.builder._state._DagBuilderScope#

class phenotypic.gui.builder._state._DagBuilderScope(blocks: ~typing.List[~phenotypic.gui.builder._state.BlockNode] = <factory>, edges: ~typing.List[~phenotypic.gui.builder._state.Edge] = <factory>, name: str = 'Pipeline', desc: str = '', nrows: int | None = None, ncols: int | None = None)[source]#

Bases: object

A DAG of blocks + edges (per scope).

A scope corresponds to one ImagePipeline once converted via the DAG conversion path (_conversion_dag.py). Stage (ops/meas/post) is inferred per block from its class via the operation registry at convert time; the canvas does not constrain block ordering by stage.

Every scope (root and every nested container scope) auto-seeds an BlockNode with class_name == INPUT_IMAGE_CLASS_NAME at construction time via _seed_input_image() (called from __post_init__()). The Rule 6 idempotency invariant is therefore established eagerly.

Parameters:
blocks#

Ordered BlockNode list. The order is not execution order — the DAG’s image-flow edges dictate execution order during conversion. The first block is (post-seed) always the InputImage sentinel.

Type:

List[phenotypic.gui.builder._state.BlockNode]

edges#

Edge list backing every wire on the canvas.

Type:

List[phenotypic.gui.builder._state.Edge]

name#

Pipeline name to assign on conversion.

Type:

str

desc#

Pipeline desc to assign on conversion.

Type:

str

nrows#

Optional grid row preset (forwarded to ImagePipeline on the root scope; ignored for nested container scopes).

Type:

int | None

ncols#

Optional grid column preset (root scope only — see §4.5 of the spec).

Type:

int | None

Methods

__init__

Attributes

blocks: List[BlockNode]#
edges: List[Edge]#
name: str = 'Pipeline'#
desc: str = ''#
nrows: int | None = None#
ncols: int | None = None#