mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-08 14:44:56 +00:00
db6b220f92
Adds the T-6 independent reference drift cosim (PR-M.1, c30be89) as a
gated regression check so any future hand-edit drift in NCO_SINE_LUT,
fft_twiddle_*.mem, or DOPPLER_WINDOW_COEFF surfaces on every run.
run_regression.sh: new "Independent Reference Drift (T-6)" check after
the RX-B autocorrelation block in Phase 3. Plain `python3` (no path
sniffing). Distinguishes three states from the script's exit code +
markers:
rc=0, PASS markers -> PASS (counts toward `passed`)
rc=2, no markers -> SKIP (counts toward `skipped`)
rc!=0, FAIL markers -> FAIL (gates the regression)
compare_independent.py: detects missing numpy/scipy at startup and exits
with code 2 plus a [SKIP] marker pointing at `uv sync --group dev`.
Without that, an environment without scipy crashed mid-script and the
regression captured a partial 3-of-13 PASS count.
pyproject.toml: scipy>=1.13 added to the dev dependency group (used by
fpga_reference.doppler_window_ideal() for analytical Cheby ground truth).
.github/workflows/ci-tests.yml: fpga-regression now installs Python
3.12, sets up uv, runs `uv sync --group dev`, and activates the
resulting .venv before bash run_regression.sh. Without the activate
line the runner's system python3 (no scipy) would resolve first and
the drift check would [SKIP] in CI.
Verified locally:
with venv: Drift PASS (13 checks), Tests: 43 passed / 0 / 0
no scipy: Drift SKIP (msg points at install cmd), 42p / 0f / 1s
58 lines
2.4 KiB
TOML
58 lines
2.4 KiB
TOML
[project]
|
|
name = "aeris-10-radar"
|
|
version = "1.0.0"
|
|
description = "AERIS-10 FMCW Radar Platform — host software & FPGA cosim tools"
|
|
requires-python = ">=3.12"
|
|
|
|
# Runtime dependencies intentionally empty — GUI deps are optional and
|
|
# listed in requirements_*.txt files for local installs.
|
|
dependencies = []
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff>=0.5",
|
|
"pytest>=8",
|
|
"numpy>=1.26",
|
|
"scipy>=1.13", # PR-M: tb/cosim/compare_independent.py (T-6 drift cosim)
|
|
"h5py>=3.10",
|
|
]
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Ruff configuration
|
|
# ---------------------------------------------------------------------------
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"slow: full-sweep tests (opt-in via -m slow); audit F-3.2 100-seed fuzz",
|
|
]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"F", # pyflakes (unused imports, undefined names, duplicate keys, assert-tuple)
|
|
"B", # flake8-bugbear (mutable defaults, unreachable code, raise-without-from)
|
|
"RUF", # ruff-specific (unused noqa, ambiguous chars, implicit Optional)
|
|
"SIM", # flake8-simplify (dead branches, collapsible ifs, unnecessary pass)
|
|
"PIE", # flake8-pie (no-op expressions, unnecessary spread)
|
|
"T20", # flake8-print (stray print() calls — LLMs leave debug prints)
|
|
"ARG", # flake8-unused-arguments (LLMs generate params they never use)
|
|
"ERA", # eradicate (commented-out code — LLMs leave "alternatives" as comments)
|
|
"A", # flake8-builtins (LLMs shadow id, type, list, dict, input, map)
|
|
"BLE", # flake8-blind-except (bare except / overly broad except)
|
|
"RET", # flake8-return (unreachable code after return, unnecessary else-after-return)
|
|
"ISC", # flake8-implicit-str-concat (missing comma in list of strings)
|
|
"TCH", # flake8-type-checking (imports only used in type hints — move behind TYPE_CHECKING)
|
|
"UP", # pyupgrade (outdated syntax for target Python version)
|
|
"C4", # flake8-comprehensions (unnecessary list/dict calls around generators)
|
|
"PERF", # perflint (performance anti-patterns: unnecessary list() in for loops, etc.)
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Tests: allow unused args (fixtures), prints (debugging), commented code (examples)
|
|
"test_*.py" = ["ARG", "T20", "ERA"]
|
|
# Re-export modules: unused imports are intentional
|
|
"v7/hardware.py" = ["F401"]
|