From f21fcebeae39e239a877d14bba32f98227fbeed4 Mon Sep 17 00:00:00 2001 From: maxime Date: Fri, 20 Nov 2026 08:31:18 +0100 Subject: [PATCH] Points: the runs of the emulator too (@), each with its own points Co-Authored-By: Claude Opus 5.5 --- app/server/check.py | 2 +- app/server/validity.py | 3 +-- app/web/src/pages/Points.jsx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/server/check.py b/app/server/check.py index a1a14c3..39f65a7 100644 --- a/app/server/check.py +++ b/app/server/check.py @@ -440,7 +440,7 @@ def check_points(): s, o = next(iter(d["sensors"].items())) assert validity.mark(n["name"], {"sensor": s, "times": o["t"][:2], "valid": False})["invalid"] == 2 refuses(validity.create, {"station": "NIEDERHORN", "start": "2026-09-25", "end": "2026-09-26"}) # exists - refuses(validity.create, {"station": "NIEDERHORN@run", "start": "2026-09-25", "end": "2026-09-26"}) + refuses(validity.create, {"station": "NIEDERHORN@nope", "start": "2026-09-25", "end": "2026-09-26"}) # unknown run refuses(validity.dataset, "../x") refuses(validity.mark, n["name"], {"sensor": s, "times": ["2026-09-27 00:00:00"], "valid": False}) finally: diff --git a/app/server/validity.py b/app/server/validity.py index a5db065..7a04af3 100644 --- a/app/server/validity.py +++ b/app/server/validity.py @@ -1,6 +1,6 @@ """The Points page: the point labels of labeling/points/, one boolean per measurement (valid or not) on a range, set by the user. Their format, their files and their check are labeling/scripts/points.py; the measurements are read by -tools/scripts/data.py, as everywhere. A station of data/ only (a run of data_diff/ refused). +tools/scripts/data.py, as everywhere. A station of data/ or a run of the emulator (@), each its own points. """ import threading @@ -33,7 +33,6 @@ def listing(st=""): @refused def create(body): st, start, end = body.get("station", ""), body.get("start", ""), body.get("end", "") - station.pumped(st) n = points.name(st, start, end) a, b = station.bounds(start, end) points.create(n, {s: [m["t"] for m in ms if a <= m["t"] < b and m["corr_x"] is not None and m["corr_y"] is not None] diff --git a/app/web/src/pages/Points.jsx b/app/web/src/pages/Points.jsx index 484fbc5..62e3851 100644 --- a/app/web/src/pages/Points.jsx +++ b/app/web/src/pages/Points.jsx @@ -54,7 +54,7 @@ export default function Points({ selection, choose }) { {station && !exists && !loading && No dataset for {station} from {start} to {end} (excluded). - + } {d &&