phenotypic.sdk_.ImageState#

class phenotypic.sdk_.ImageState(work_id: str, dataset: str, image_stem: str, stages: Mapping[str, Mapping[str, object]], verdict: Literal['verified', 'unverified', 'failed'], reason: str | None = None)[source]#

Bases: object

One image’s stages and whether its declared artifacts still match disk.

stages is the open map from spec §6.1 – stage1/stage2/ stage3/measured today, more later. Nothing here enumerates its keys; a caller asking “did stage 3 run?” reads "stage3" in state.stages, which is what makes a future stage additive rather than a schema break.

Under D-A there is no backfilled stage: per-store metadata is written in the store’s original promote, so there is nothing to record having happened afterwards.

Methods

__init__

Attributes

reason

work_id

dataset

image_stem

stages

verdict

Spec §9 annotates images as "work_id -> stages + VERDICT".

Parameters:
work_id: str#
dataset: str#
image_stem: str#
stages: Mapping[str, Mapping[str, object]]#
verdict: Literal['verified', 'unverified', 'failed']#

Spec §9 annotates images as “work_id -> stages + VERDICT”. A bool plus an unread reason was not that (SIMP-R1-09).

reason: str | None = None#