020c(gui): Generate scenario button — sidecar-only output + CLI parity #35
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/020c-gui-generate-scenario"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements backlog step 020c (
docs/backlog/020c-gui-generate-scenario.md, now archived todocs/done/with outcome). Depends on 020a (merged, #32) and 020b (merged, #33).What it adds
A Generate scenario button in the bottom controls row (left of Generate): runs the step-014 pre-flight (
can_generategate ->scenario_from_model->validate(), identical status messages), draws the channels (draw_channelssoresolved_seedand all drawn values are recorded), then serializes only the scenario JSON to a.scenario.jsonfile chosen via save dialog (initialfilederived from the output-path stem). Users get a reproducible spec forgengnss scenario FILE -o out.i16or a receiver harness without generating IQ first.scenario.to_json()+ drawn channel entries (incl.fdma_channel) +generated_by, via the newscenario_sidecar_documenthelper in controllers.py — same shape asgenerate_to_file's artifact minus the IQ-run-only fields (feasibilityverdicts are recomputed by the CLI;peak/samplesbelong to the IQ run), per the work order.Tests (
tests/test_gui_generate_scenario.py):chan+ power offset;resolved_seedrecorded; drawn channels present); CLI parity —cli_main(["scenario", gui_file, "--output", a.i16])produces byte-identical IQ to in-processgenerate_to_fileof the same scenario (same seed); invalid-model refusal documented at model level.scenario written: ... (2 signals, seed ...), dialoginitialfile, lock behavior.Verification
ruff check src/gengnss testsclean;pytest: 201 passed, 6 skipped (gui-marked skip headless; run in CI with a display).Backlog updates (in this PR)
docs/backlog/000-overview.md: 020a/020b/020c rows marked done (020a -> PR #32, 020b -> PR #33).docs/done/with outcome notes.Remaining backlog items (020b untouched items beyond the merged ones are none — next candidates are the Remaining list:
sigfront-end wiring, BeiDou B2b, spec 7.2 external cross-check).