exlab_wizard.ui.pages.wizard_run#

New Run Wizard (Frontend Spec §5).

Six-step wizard with mode bound at construction (experimental vs test). The mode is a single flag and cannot be changed mid-session; a misclicked mode is resolved by closing and reopening the wizard.

Steps:

  1. Project + Equipment.

  2. Template Selection (filtered by _exlab_run_scope).

  3. Variable Form.

  4. README Form.

  5. Preview (validator gate).

  6. Confirm & Create.

Functions

can_advance(state)

Return True when the active step's preconditions hold.

preview_path_segments(state, *, run_date)

Compute the destination-path segments for the Preview step.

primary_button_color(state)

Primary button color hint per Frontend §5.3.

primary_button_label(state)

Primary button label on the Confirm & Create step (Frontend §5.2).

render_run_wizard(*, state[, on_submit])

Render the six-step run wizard.

title_text(state)

Title-bar text per Frontend §5.1.

Classes

RunWizardState(run_kind[, active_step, ...])

Mutable state for the in-flight run wizard.

class exlab_wizard.ui.pages.wizard_run.RunWizardState(run_kind, active_step='project_equipment', selected_project_short_id=None, selected_equipment=None, selected_template=None, template_variables=<factory>, readme_fields=<factory>, validator_findings=<factory>)[source]#

Bases: object

Mutable state for the in-flight run wizard.

Parameters:
active_step: str = 'project_equipment'#
readme_fields: dict[str, str]#
run_kind: RunKind#
selected_equipment: str | None = None#
selected_project_short_id: str | None = None#
selected_template: str | None = None#
template_variables: dict[str, Any]#
validator_findings: list[dict[str, Any]]#
exlab_wizard.ui.pages.wizard_run.can_advance(state)[source]#

Return True when the active step’s preconditions hold.

Parameters:

state (RunWizardState)

Return type:

bool

exlab_wizard.ui.pages.wizard_run.preview_path_segments(state, *, run_date)[source]#

Compute the destination-path segments for the Preview step.

Test runs put the run inside a TestRuns/ folder with a TestRun_ leaf prefix that is highlighted in warning-tier color.

Parameters:
Return type:

dict[str, Any]

exlab_wizard.ui.pages.wizard_run.primary_button_color(state)[source]#

Primary button color hint per Frontend §5.3.

Parameters:

state (RunWizardState)

Return type:

str

exlab_wizard.ui.pages.wizard_run.primary_button_label(state)[source]#

Primary button label on the Confirm & Create step (Frontend §5.2).

Parameters:

state (RunWizardState)

Return type:

str

exlab_wizard.ui.pages.wizard_run.render_run_wizard(*, state, on_submit=None)[source]#

Render the six-step run wizard.

Parameters:
Return type:

Any

exlab_wizard.ui.pages.wizard_run.title_text(state)[source]#

Title-bar text per Frontend §5.1.

Parameters:

state (RunWizardState)

Return type:

str