PlanDraft#

MemberKindWhat it is
okpropertyWhether every case validated.
to_dictmethodReturn the plan as JSON: its lines, then its grouped warnings and errors.
casesattributeSignature only
config_pathattributeSignature only
design_hashattributeSignature only
errorsattributeSignature only
inputsattributeSignature only
project_fileattributeSignature only
project_rootattributeSignature only
recipesattributeSignature only
sitesattributeSignature only
sites_configattributeSignature only
stepsattributeSignature only
warningsattributeSignature only
class PlanDraft(
project_root,
project_file,
config_path,
sites_config,
sites,
recipes,
cases,
errors=(),
warnings=(),
inputs=(),
steps=(),
design_hash=None,
)[source]#

A plan before it is written: its cases, and what is wrong with them.

to_dict()[source]#

Return the plan as JSON: its lines, then its grouped warnings and errors.

The lines are those hmp run --dry-run prints for a [sites] project, so a draft without [sites] has none to give.

cases: tuple[DraftCase, ...]#
config_path: Path | None#
design_hash: str | None#
errors: tuple[PlanIssue, ...]#
inputs: tuple[Path, ...]#
property ok: bool[source]#

Whether every case validated.

project_file: Path | None#
project_root: Path#
recipes: tuple[ResolvedRecipe, ...]#
sites: tuple[ResolvedSite, ...]#
sites_config: SitesConfig | None#
steps: tuple[str, ...]#
warnings: tuple[PlanIssue, ...]#