exlab_wizard.ui.pages.wizard_project#

New Project Wizard (Frontend Spec §4).

Seven steps in a ui.stepper:

  1. LIMS Project picker (Backend §7.2 cache or offline catalogue).

  2. Template Selection.

  3. Equipment Selection.

  4. Variable Form (auto-generated from copier.yml).

  5. README Form (mandatory core fields pinned at top).

  6. Preview (validator gate; Frontend §4 step 6).

  7. Confirm & Create (progress bar, error pane, success card).

The page is split into render-time-only logic (this module) and the controller-side validation, which is delegated to the FastAPI session endpoints. The UI’s per-step validation is for UX immediacy; the backend remains authoritative.

Functions

can_advance(state)

Return True when the active step's preconditions are satisfied.

disk_space_pre_flight_message(state)

Return a copy-ready message when disk space is low; else None.

preview_step_clear(state)

Pre-flight checks for the Preview step (Frontend §10.5.4).

render_project_wizard(*[, state, on_submit])

Render the seven-step project wizard.

Classes

ProjectWizardState([active_step, ...])

Mutable state for the in-flight wizard.

class exlab_wizard.ui.pages.wizard_project.ProjectWizardState(active_step='lims_project', selected_lims_short_id=None, selected_template=None, selected_equipment=None, template_variables=<factory>, readme_fields=<factory>, validator_findings=<factory>, free_disk_bytes=None, plugin_host_ok=True)[source]#

Bases: object

Mutable state for the in-flight wizard.

Parameters:
active_step: str = 'lims_project'#
free_disk_bytes: int | None = None#
plugin_host_ok: bool = True#
readme_fields: dict[str, str]#
selected_equipment: str | None = None#
selected_lims_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_project.can_advance(state)[source]#

Return True when the active step’s preconditions are satisfied.

Centralised here so the Next button enablement and any Cmd/Ctrl+Enter shortcut share a single rule set.

Parameters:

state (ProjectWizardState)

Return type:

bool

exlab_wizard.ui.pages.wizard_project.disk_space_pre_flight_message(state)[source]#

Return a copy-ready message when disk space is low; else None.

Parameters:

state (ProjectWizardState)

Return type:

str | None

exlab_wizard.ui.pages.wizard_project.preview_step_clear(state)[source]#

Pre-flight checks for the Preview step (Frontend §10.5.4).

Parameters:

state (ProjectWizardState)

Return type:

bool

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

Render the seven-step project wizard.

Returns the NiceGUI dialog (or, in tests, a payload describing the rendered steps).

Parameters:
Return type:

Any