Files
Support-Agent/labeling/auto/revue-croisee/2026-11-04/no-data/outils/grille.py
T
maximeandClaude Opus 5.5 35b5ed4d74 Auto labels reviewed per station and cross-reviewed; all labeling knowledge in labeling/ (D-130)
- Every station's auto labels reviewed by an analyst (/review-auto-labels), then a
  cross-review per family across all stations (new skill /cross-review-labels),
  a finishing pass, and descriptions rewritten in words (no numeric values).
- The three never-labeled ranges (WILDSTRUBEL 07/09-01/10, NORDEND 16/08-01/10)
  labeled and reviewed: 991 auto labels on 11 stations, labeling/controle.py at 0 errors.
- Labeling knowledge gathered in labeling/: regles-d-etiquetage.md (new), familles.md
  (settled boundaries), connaissances/ (notes moved from docs/, links updated),
  the label map rebuilt from reviewed labels, events and cases; events tied to their
  stations (PS_DES_COUDRES is JUNGFRAU). The labeler and reviewers read only labeling/.
- labels-map reads auto labels and events; decision D-130; living plan points 73-75.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:21:57 +01:00

26 lines
1.4 KiB
Python

"""Grille de toutes les stations sur une fenêtre, par pas de P min (défaut 15) : M = au moins une mesure, s = une synchronisation
(last_sync) sans mesure, . = rien ; puis par heure BusVoltage présent (V) et DB_not_uploaded.
Usage : python3 grille.py DEBUT FIN [P] (UTC, AAAA-MM-JJTHH:MM ; lancé depuis la racine)"""
import ast, sys, os
from datetime import timedelta
exec(open(os.path.join(os.path.dirname(__file__), 'trous.py')).read().split('tous = {}')[0])
a, b = UTC(sys.argv[1]), UTC(sys.argv[2]); P = int(sys.argv[3]) if len(sys.argv) > 3 else 15
cases = []; t = a
while t < b: cases.append(t); t += timedelta(minutes=P)
print(' ' * 12 + ''.join(f'{c:%H}'[1] if c.minute == 0 else ' ' for c in cases))
for st in LOTS:
ts = [x for x in instants(st, a, b) if a <= x < b]
ls = metrique(st, 'last_sync', a, b); syncs = set()
for v in ls.values():
try: syncs |= {UTC(s) for s in ast.literal_eval(v)}
except Exception: pass
bv, nu = metrique(st, 'BusVoltage', a, b), metrique(st, 'DB_not_uploaded', a, b)
lig = ''
for c in cases:
f = c + timedelta(minutes=P)
lig += 'M' if any(c <= x < f for x in ts) else 's' if any(c <= x < f for x in syncs) else '.'
print(f'{st:<12}{lig}')
hrs = [c for c in cases if c.minute == 0]
print(f'{" BV":<12}' + ''.join(('V' if c in bv else '-') + ' ' for c in hrs))
if nu: print(f'{" notupl":<12}' + ''.join(f'{str(nu.get(c, "-"))[:3]:<4}' for c in hrs))