34ecaf360b
Rename radar_dashboard.py -> GUI_V65_Tk.py and add core feature parity with the v7 PyQt dashboard while keeping Tkinter as the framework: Replay mode: - _ReplayController with threading.Event-based play/pause/stop - Reuses v7.ReplayEngine and v7.SoftwareFPGA for all 3 input formats - Dual dispatch routes FPGA control opcodes to SoftwareFPGA during raw IQ replay; non-routable opcodes show user-visible status message - Seek slider with re-emit guard, speed combo, loop checkbox - close() properly releases engine file handles on stop/reload Demo mode: - DemoTarget kinematics scaled to physical range grid (~307m max) - DemoSimulator generates synthetic RadarFrames with Gaussian blobs - Targets table (ttk.Treeview) updates from demo target list Mode exclusion (bidirectional): - Connect stops active demo/replay before starting acquisition - Replay load stops previous controller and demo before loading - Demo start stops active replay; refuses if live-connected - --live/--replay/--demo in mutually exclusive CLI arg group Bug fixes: - seek() now increments past emitted frame to prevent re-emit on resume - Failed replay load nulls controller ref to prevent dangling state Tests: 17 new tests for DemoTarget, DemoSimulator, _ReplayController CI: all 4 jobs pass (167+21+25+29 = 242 tests)
117 lines
3.4 KiB
YAML
117 lines
3.4 KiB
YAML
name: AERIS-10 CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, develop]
|
|
push:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
# ===========================================================================
|
|
# Python: lint (ruff), syntax check (py_compile), unit tests (pytest)
|
|
# CI structure proposed by hcm444 — uses uv for dependency management
|
|
# ===========================================================================
|
|
python-tests:
|
|
name: Python Lint + Tests
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --group dev
|
|
|
|
- name: Ruff lint (whole repo)
|
|
run: uv run ruff check .
|
|
|
|
- name: Syntax check (py_compile)
|
|
run: |
|
|
uv run python - <<'PY'
|
|
import py_compile
|
|
from pathlib import Path
|
|
|
|
skip = {".git", "__pycache__", ".venv", "venv", "docs"}
|
|
for p in Path(".").rglob("*.py"):
|
|
if skip & set(p.parts):
|
|
continue
|
|
py_compile.compile(str(p), doraise=True)
|
|
PY
|
|
|
|
- name: Unit tests
|
|
run: >
|
|
uv run pytest
|
|
9_Firmware/9_3_GUI/test_GUI_V65_Tk.py
|
|
9_Firmware/9_3_GUI/test_v7.py
|
|
-v --tb=short
|
|
|
|
# ===========================================================================
|
|
# MCU Firmware Unit Tests (20 tests)
|
|
# Bug regression (15) + Gap-3 safety tests (5)
|
|
# ===========================================================================
|
|
mcu-tests:
|
|
name: MCU Firmware Tests
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install build tools
|
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
|
|
|
- name: Build and run MCU tests
|
|
run: make test
|
|
working-directory: 9_Firmware/9_1_Microcontroller/tests
|
|
|
|
# ===========================================================================
|
|
# FPGA RTL Regression (25 testbenches + lint)
|
|
# ===========================================================================
|
|
fpga-regression:
|
|
name: FPGA Regression
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Icarus Verilog
|
|
run: sudo apt-get update && sudo apt-get install -y iverilog
|
|
|
|
- name: Run full FPGA regression
|
|
run: bash run_regression.sh
|
|
working-directory: 9_Firmware/9_2_FPGA
|
|
|
|
# ===========================================================================
|
|
# Cross-Layer Contract Tests (Python ↔ Verilog ↔ C)
|
|
# Validates opcode maps, bit widths, packet layouts, and round-trip
|
|
# correctness across FPGA RTL, Python GUI, and STM32 firmware.
|
|
# ===========================================================================
|
|
cross-layer-tests:
|
|
name: Cross-Layer Contract Tests
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --group dev
|
|
|
|
- name: Install Icarus Verilog
|
|
run: sudo apt-get update && sudo apt-get install -y iverilog
|
|
|
|
- name: Run cross-layer contract tests
|
|
run: >
|
|
uv run pytest
|
|
9_Firmware/tests/cross_layer/test_cross_layer_contract.py
|
|
-v --tb=short
|