From 4fc86e68f595d5508de4c2a1178e410cfd32af3d Mon Sep 17 00:00:00 2001 From: maxime Date: Mon, 16 Nov 2026 15:48:42 +0100 Subject: [PATCH] CLAUDE.md, README.md: data.py is the one reader of the app, the tools and the detectors Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 208a1fa..7be660d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,5 +14,6 @@ Rules: - A change to improve the tools touches `scripts/` and `GUIDE.md` only; `README.md`, `CLAUDE.md` and `DATA.md` (the user's) are not part of it. - Remove nothing: no tool, no option, no output, no sentence of the guide; a tool that did not help on one range may help on another, and a single analysis is not enough to clean the list. Optimise or add. - The simplest first: a sentence of the guide or a better default; otherwise an option of an existing tool; a new tool as a last resort. A new script has a docstring at the top, like the others, and enters the table of `GUIDE.md` in the same change. -- `scripts/data.py` is the common reader of the app and the tools: touch it only to fix a reading error. The app passes these measurements to the detectors (the events of the Data page), which otherwise read with `detectors/scripts/data.py` (benchmark, Optimizer): a reading fix here is carried over there, otherwise the page and the benchmark diverge silently. A change to `data.py` is said at the top of the change's report; the same fix in `detectors/scripts/data.py` is left to the user, named in that report. +- `scripts/data.py` is the one reader of the station data, shared by the app, the tools and the detectors (which import it: benchmark, Optimizer): touch it only to fix a reading error, never remove or rename a public name. A change to it changes the detectors' benchmark: rerun `python3 detectors/bench/regression.py --labels labeling/auto --data data` from aimsight-app, and say the change at the top of the change's report. Standard library only, no import from the other scripts. +- `scripts/common.py`: what the tools share beyond reading (columns, steps, noise, sensor list, runs, file names); standard library, no matplotlib (some tools run with `python3`). A tool imports `data` and `common`, never another tool. - Every time is in UTC. Commits by path, never `git add -A`. Language: English. diff --git a/README.md b/README.md index bae86f3..a989bd3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The reading harness: the methods given to the agent to make sense of the data of - `scripts/`: the tools, one script each; `GUIDE.md`: which tool for which question, and how to read what it returns. The agent reads it first. - `DATA.md`: the files of a station and the meaning of their columns, maintained by hand; the agent reads it with the guide. -- `scripts/data.py`: the common reader of the data (also that of the aimsight-app app, which passes these measurements to the detectors); the detectors keep their own (`detectors/scripts/data.py`), to stay autonomous: a reading fix in one is carried to the other. +- `scripts/data.py`: the one reader of the data, shared by the aimsight-app app, the tools and the detectors (which import it); a change to it changes the detectors' benchmark (`python3 detectors/bench/regression.py --labels labeling/auto --data data`, from aimsight-app). `scripts/common.py`: the helpers the tools share. - The tools: `inventory`, `summary`, `ranges`, `days`, `overview`, `metrics`, `quality`, `stations`, `plot`, `thumbnails`, `gif` (details in the guide). ## Using it