Files
PLFM_RADAR/pyproject.toml
Jason 51740fd6f5 test(fpga): F-3.2 add DDC cosim fuzz runner with seed sweep
A new SCENARIO_FUZZ branch in tb_ddc_cosim.v accepts +hex / +csv / +tag
plusargs so an external runner can pick stimulus and output paths per
iteration. The three path registers are widened to 4 kbit each so long
temp-directory paths (e.g. /private/var/folders/...) do not overflow
the MSB and emerge truncated — a real failure mode caught while writing
this runner.

test_ddc_cosim_fuzz.py is a pytest-driven fuzz harness:
 - Generates a random plausible radar scene per seed (1-4 targets with
   random range/velocity/RCS/phase, random noise level 0.5-6.0 LSB
   stddev) via radar_scene.generate_adc_samples, fully deterministic.
 - Compiles tb_ddc_cosim.v once per session (module-scope fixture),
   then runs vvp per seed.
 - Asserts sample-count bounds consistent with 4x CIC decimation,
   signed-18 range on every baseband I/Q word, and non-zero output
   (catches silent pipeline stalls).
 - Ships with two tiers: test_ddc_fuzz_fast (8 seeds, default CI) and
   test_ddc_fuzz_full (100 seeds, opt-in via -m slow) matching the
   audit ask.

Registers the "slow" marker in pyproject.toml for the 100-seed opt-in.
2026-04-20 15:48:34 +05:45

57 lines
2.3 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",
"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"]