mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-05-19 22:31:54 +00:00
cosim_dir revival:
- gen_realdata_hex.py: also emit decimated_range_{i,q}.npy (48x512)
and doppler_map_{i,q}.npy (512x48) at production dimensions; the
same Python pipeline that produces the RTL .hex stimuli now writes
the .npy intermediates v7.replay COSIM_DIR loads. Replaces the
workflow lost when golden_reference.py was deleted in e8b495c
- test_v7.py: update test_get_frame_cosim shape from pre-PR-O.6
(64,32) to (NUM_RANGE_BINS, NUM_DOPPLER_BINS)
- check in 4 .npy reference files (~400 KB, deterministic SCENE_SEED=42)
Ruff lint cleanup (was 66 errors; now 0):
- pyproject.toml: ignore T20 in tb/cosim/**.py (CLI tools)
- compare_independent.py: drop redundant int() casts (RUF046),
swap try/except scipy import for importlib.util.find_spec,
remove dead duplicate np import, ASCII-ize comment unicode,
wrap E501 format strings
- fpga_reference.py: drop unused fs arg from nco_reference,
collapse if/else to ternary, mark _out_im unused
- v7/processing.py: ASCII-ize x in docstring, collapse if-branches
- {dashboard,software_fpga,workers,radar_protocol}.py: wrap E501
- test_v7.py: ASCII-ize comment unicode, _alias renames where unused
Result: test_v7 100/100 (0 skips on radar_venv, was 9 graceful
skips); 5 cosim_dir orphan tests now active and passing.
60 lines
2.5 KiB
TOML
60 lines
2.5 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"]
|
|
# FPGA cosim scripts: CLI tools — print() is the intended output channel
|
|
"9_Firmware/9_2_FPGA/tb/cosim/**.py" = ["T20"]
|