Stable ids for auto labels, a summary for the label map, reading tools improved (D-131)

- Every auto label carries an id (<STATION>-<n>, labeling/ids.py), kept on edit, given to
  new labels by labeling.py and by the reviews; controle.py requires it, unique. The
  cross-review matches labels by id, and an applied review is locked (applique.md).
- The label map starts with a summary (labels-map/sommaire.py): readers take the summary and
  sections 2-4 in full, then only the cards of the phenomena they meet.
- Tool-builder session on the reviewers' difficulties: jours.py --lissage/--fraction,
  ensemble.py --suivre and rejected measures left out of --rigide, --residus non, zero noise
  after a lost reference, new agent-tools/stations.py (several stations on one timeline),
  long outputs convention in lire-les-donnees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-05 08:49:54 +01:00
1 parent 7c0cdee8cf
commit d4520f9f46
23 files changed
+1216 -1003

No files matched your search

+3
View File
@@ -28,6 +28,7 @@ from urllib.parse import parse_qs, urlsplit
ICI = Path(__file__).resolve().parent
sys.path[:0] = [str(ICI.parent / "detectors-view"), str(ICI.parent / "detectors-view" / "data-loader")]
import chargeur # noqa: E402 (son formulaire, son serveur ; bascule seule sur .venv si plotly manque)
import ids # noqa: E402 (l'id stable des étiquettes automatiques, D-131 ; labeling/ est sys.path[0])
import detecteurs # noqa: E402 (les couleurs et les références de la page Status)
from common.stations import load_csv, parse_name # noqa: E402
from detecteurs import ROOT, donnees # noqa: E402
@@ -359,6 +360,8 @@ def ajouter(corps):
c = categorie(corps)
label = {"debut": debut, "fin": fin} | ({"categorie": c} if c else {}) | {"description": description}
f = fichier(station, corps.get("dossier", "manual"))
if corps.get("dossier") == "auto": # une étiquette automatique porte un id stable, le suivant de sa station (D-131)
ids.attribuer(station, lire(station, "auto") + [label])
# Une ligne retirée à la main peut laisser le fichier sans fin de ligne : la suivante se collerait à elle.
avant = f.read_bytes() if f.exists() else b""
with open(f, "ab") as sortie: