Files
RFG_Receiver_GUI/AGENTS.md

36 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Repository Guidelines
## Project Structure & Module Organization
- `main.py`: Tkinter GUI for radar data analysis; watches a data folder, parses RAW/SYNC_DET/FOURIER files, and renders Bscan/Fourier views.
- `datagen.py`: Test data generator for RAW, SYNC_DET, and FOURIER; produces timestamped files to feed the GUI.
- `testLadArrayGround.m`: MATLAB scratch for algorithm experiments.
- Tests: none yet. Add under `tests/` (e.g., `tests/test_io.py`). If processing grows, factor helpers into a `processing/` package (e.g., `processing/signal.py`).
## Build, Test, and Development Commands
- Create venv: `python3 -m venv .venv && source .venv/bin/activate` (Win: `.venv\Scripts\activate`).
- Install deps: `pip install numpy scipy matplotlib`. Linux may require Tk: `sudo apt-get install -y python3-tk`.
- Run GUI: `python main.py`.
- Generate sample data: `python datagen.py` and choose 1/2/3; files go to the configured data folder.
- Run tests (when added): `pytest -q`.
## Coding Style & Naming Conventions
- Follow PEP 8 with 4space indents; add type hints for new/edited functions.
- Naming: snake_case (functions/vars), PascalCase (classes), UPPER_SNAKE_CASE (constants).
- Keep GUI logic in `main.py`; move pure processing/IO into small, testable modules.
## Testing Guidelines
- Framework: pytest (recommended). No suite exists yet.
- Naming: `tests/test_*.py`. Use temp dirs for filebased tests; dont write to system paths.
- Aim for ≥70% coverage on new modules. Add smoke tests for file parsing and queue/processing logic; use a noninteractive Matplotlib backend for tests.
## Commit & Pull Request Guidelines
- Commits: imperative mood with scope, e.g., `gui: improve Bscan update`, `datagen: add FOURIER mode`.
- PRs: include description, linked issues, reproduction steps, and screenshots/GIFs for UI changes. Keep changes focused and update docs when constants/paths change.
## Configuration Tips
- Data paths are hardcoded; update before running on nonWindows systems:
- `main.py:18``data_dir = r"D:\\data"`
- `datagen.py:11``DATA_DIR = r"D:\\data"`
- Prefer a writable local path (e.g., `/tmp/data`) and do not commit generated data.