exlab_wizard.config.models#
Pydantic models that mirror config.yaml. Backend Spec §9.
These models are the typed schema for the on-disk config.yaml. The loader
(exlab_wizard.config.loader) parses YAML into a plain dict, hands it to
Config.model_validate, and converts any Pydantic ValidationError into a
ConfigError at the boundary; nothing here raises ConfigError directly
except for cases that need a custom message before the model layer sees the
input.
Style:
- model_config = ConfigDict(extra="forbid", str_strip_whitespace=True) on
every model so unknown keys raise a clear validation error.
StrEnumvalues are accepted in either string or enum form; Pydantic v2 lax mode coerces raw strings to enum members, and the spec stores the string value verbatim on dump (viaStrEnum.valueor explicitfield_serializer).All cross-field invariants from §9 are encoded as ``model_validator``s.
Functions
|
Return a copy of |
Classes
|
|
|
One |
|
Top-level |
|
One |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One operator-defined extra README field. |
|
Parallelism knobs forwarded to rclone ( |
|
|
|
|
|
|
- class exlab_wizard.config.models.BandwidthConfig(**data)[source]#
Bases:
BaseModelbandwidth:sub-block on a transport.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- schedule: list[BandwidthWindow]#
- class exlab_wizard.config.models.BandwidthWindow(**data)[source]#
Bases:
BaseModelOne
{days, from, to}window. Backend Spec §9.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.Config(**data)[source]#
Bases:
BaseModelTop-level
config.yamlmodel. Mirrors §9 verbatim.- Parameters:
data (
Any)
- equipment: list[EquipmentConfig]#
- lims: LIMSConfig#
- logging: LoggingConfig#
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- nas_cleanup: NASCleanupConfig#
- operators: OperatorsConfig#
- orchestrator: OrchestratorConfig#
- paths: PathsConfig#
- plugins: PluginsConfig#
- readme: READMEConfig#
- sync: SyncConfig#
- update_check: UpdateCheckConfig#
- validator: ValidatorConfig#
- class exlab_wizard.config.models.EquipmentConfig(**data)[source]#
Bases:
BaseModelOne
equipment:list entry. Backend Spec §9.sync_mode(Redesign Spec §3.2) is the per-equipment role this device plays for the equipment:nasmeans this device acquires runs and syncs them directly to the NAS;stagemeans this device acquires runs and pushes them to a connected staging PC’s staging area instead.rclone.conf NAS-sync migration: neither mode carries a per-equipment connection block. The NAS connection is defined once by the
nas:block (a single rclone remote); the staging hop is defined once byorchestrator.staging_remote/orchestrator.staging_base_root(a second rclone remote in the samerclone.conf). The push target is selected bysync_modeat sync time, not by a per-equipment block.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sync_mode: SyncMode#
- class exlab_wizard.config.models.FileStabilityConfig(**data)[source]#
Bases:
BaseModelsync.stability:sub-block. Pre-rclone size-stability guard.A complete file passes in
(checks - 1) * interval_seconds(~4 s with the defaults);timeout_secondsbounds a still-growing file before it is deferred to a later sweep. On NFS-mounted sources raiseinterval_secondsto at least the mount’sactimeo(typically >= 30 s) so attribute-cache staleness cannot mask an in-progress write.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.LIMSConfig(**data)[source]#
Bases:
BaseModellims:block. Read-only LIMS endpoint plus offline catalogue path.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.LoggingConfig(**data)[source]#
Bases:
BaseModellogging:block. Central app-log rotation + level.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.NASCleanupConfig(**data)[source]#
Bases:
BaseModelnas_cleanup:block. Local-copy retention after NAS verify.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.NasConfig(**data)[source]#
Bases:
BaseModelnas:block — the single rclone remote + base root for NAS sync.remoteis the name of a remote defined in the operator’srclone.conf(set up separately withrclone config). Equipment run folders live under<remote>:<base_root>/<equipment_id>/….rclone_config_pathoptionally pinsrclone --config <path>for when the app runs as a different OS user than the one who created the config; blank means rclone’s default discovery.- Parameters:
data (
Any)
- bandwidth: BandwidthConfig#
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- perf: RclonePerf#
- class exlab_wizard.config.models.OperatorsConfig(**data)[source]#
Bases:
BaseModeloperators:block. Optional case-sensitive allowlist.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.OrchestratorConfig(**data)[source]#
Bases:
BaseModelorchestrator:block. Backend Spec §9, §13.GUI/Orchestrator Redesign §3.1 collapsed the single-equipment / orchestrator distinction (no
enabledtoggle).labelis required by the setup-state gate – it identifies this workstation in every run’screation.json.staging_rootis opt-in: a blank value means this device is not a staging PC, so it does not gate setup and no staging directory is created until the operator saves a non-empty path.rclone.conf NAS-sync migration (Phase 8):
staging_remote/staging_base_rootdefine the orchestrator’s stage-mode hop as a named rclone remote (a second remote in the samerclone.confas thenas:remote). stage-mode equipment push run folders to<staging_remote>:<staging_base_root>/<equipment_id>/<run-leaf>using the sameRcloneDriverops as the NAS leg.staging_perfis the parallelism dial for that hop.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- staging_cleanup: OrchestratorStagingCleanup#
- staging_perf: RclonePerf#
- class exlab_wizard.config.models.OrchestratorStagingCleanup(**data)[source]#
Bases:
BaseModelorchestrator.staging_cleanup:sub-block. Backend Spec §13.7.- Parameters:
data (
Any)
- mode: StagingCleanupMode#
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.PathsConfig(**data)[source]#
Bases:
BaseModelpaths:block. A single app root with derived working subdirectories.Only
app_rootis stored (and serialized);templates/,plugins/and the experimentdata/root are derived read-only properties so the operator configures exactly one location.app_rootdefaults under the OS Documents folder (<Documents>/ExLabWizardviaexlab_wizard.paths.default_app_root()) so a fresh install needs no manual path entry.The derived names
templates_dir/plugin_dir/local_rootare kept so existing read-only consumers (run creation, browse, template resolution) keep readingconfig.paths.local_rootunchanged – it now resolves to<app_root>/data.local_rootis an alias ofdata_root; new code should preferdata_root.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.PluginsConfig(**data)[source]#
Bases:
BaseModelplugins:block. Master opt-in for network-declaring plugins.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.READMEConfig(**data)[source]#
Bases:
BaseModelreadme:block. Lab-policy fields layered on top of the core set.- Parameters:
data (
Any)
- defaults: list[READMEDefaultField]#
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.READMEDefaultField(**data)[source]#
Bases:
BaseModelOne operator-defined extra README field. Backend Spec §9, §10.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: FieldType#
- class exlab_wizard.config.models.RclonePerf(**data)[source]#
Bases:
BaseModelParallelism knobs forwarded to rclone (
--transfers/--checkers).These double as the memory dial on space- and RAM-constrained acquisition machines: peak memory scales with these counts times rclone’s per-stream buffer.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.SyncConfig(**data)[source]#
Bases:
BaseModelsync:block. NAS sync engine kill-switch + retry / quiescence policy.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- stability: FileStabilityConfig#
- class exlab_wizard.config.models.UpdateCheckConfig(**data)[source]#
Bases:
BaseModelupdate_check:block. Design Spec §15.6 / §15.8 item 3.Kill-switch for the startup update notifier (the §15.8 item 3 self-update channel, notifier-only stage). Default-ON; set
enabled: falseto stop the launch-time GitHub Releases probe on air-gapped or policy-locked hosts.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class exlab_wizard.config.models.ValidatorConfig(**data)[source]#
Bases:
BaseModelvalidator:block. Content-scan tuning. Backend Spec §8.1.1, §11.8.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'str_strip_whitespace': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].