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:
Project + Equipment.
Template Selection (filtered by
_exlab_run_scope).Variable Form.
README Form.
Preview (validator gate).
Confirm & Create.
Functions
|
Return |
|
Compute the destination-path segments for the Preview step. |
|
Primary button color hint per Frontend §5.3. |
|
Primary button label on the Confirm & Create step (Frontend §5.2). |
|
Render the six-step run wizard. |
|
Title-bar text per Frontend §5.1. |
Classes
|
Mutable state for the in-flight run wizard. |
- class exlab_wizard.ui.pages.wizard_run.RunWizardState(run_kind, active_step='project_equipment', selected_project_name=None, selected_equipment=None, selected_template=None, selected_template_path=None, template_variables=<factory>, readme_fields=<factory>, validator_findings=<factory>, progress=<factory>, progress_refresh=None)[source]#
Bases:
objectMutable state for the in-flight run wizard.
- Parameters:
run_kind (
RunKind)active_step (
str)progress (
SessionProgressState)
- progress: SessionProgressState#
- run_kind: RunKind#
- exlab_wizard.ui.pages.wizard_run.can_advance(state)[source]#
Return
Truewhen the active step’s preconditions hold.- Parameters:
state (
RunWizardState)- Return type:
- 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 aTestRun_leaf prefix that is highlighted in warning-tier color.- Parameters:
state (
RunWizardState)run_date (
str)
- Return type:
- exlab_wizard.ui.pages.wizard_run.primary_button_color(state)[source]#
Primary button color hint per Frontend §5.3.
- Parameters:
state (
RunWizardState)- Return type:
- 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:
- exlab_wizard.ui.pages.wizard_run.render_run_wizard(*, state, templates=None, equipment_ids=None, template_questions=None, template_paths=None, on_resolve=None, on_submit=None, on_cancel=None)[source]#
Render the six-step run wizard.
templateslists run-scope template names appropriate to the run kind;equipment_idsis the configured equipment list;template_questionsmaps each template name to its parsedcopier.ymlquestions (drives the dynamic Variables step);template_pathsmaps each template name to the absolute path of the resolved source. Each step binds real inputs intostateso the confirm step’son_submitsees a fully-populatedRunWizardState.on_resolveenables per-instance template resolution: when supplied, the template step re-resolves the offered templates from the operator’s current project + equipment selection (step 1 precedes the template step, so both are known). It is called with(equipment_id, project_name)and returns aTemplateChoicesof the names / questions / absolute paths for that context, so a per-project or per-equipment run template shadows a same-named global one. Whenon_resolveisNonethe statictemplateslist is used unchanged (the pre-resolver behaviour).- Parameters:
state (
RunWizardState)template_questions (
dict[str,list[TemplateQuestion]] |None)on_resolve (
Callable[[str|None,str|None],TemplateChoices] |None)on_submit (
Callable[[RunWizardState],Any] |None)
- Return type:
- exlab_wizard.ui.pages.wizard_run.title_text(state)[source]#
Title-bar text per Frontend §5.1.
- Parameters:
state (
RunWizardState)- Return type: