init commit

This commit is contained in:
Ayzen
2026-03-05 14:42:33 +03:00
commit fd4618b20d
964 changed files with 325114 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Validation helpers for GUI processing mode constraints."""
from __future__ import annotations
from python_app.models.run_config_model import RunConfigModel
def validate_processing_mode_constraints(processing_mode: str, config: RunConfigModel) -> None:
"""Validate mode-specific constraints for current run configuration."""
if processing_mode != "bscan":
return
any_native_switch = config.input_switch.driver_mode == "native" or config.output_switch.driver_mode == "native"
if not any_native_switch:
return
combo_count = len({(int(combo.input), int(combo.output)) for combo in config.combos})
if combo_count != 1:
raise RuntimeError(
f"B-scan with native switches requires exactly one run combo (now {combo_count})"
)