Points: the runs of the emulator too (<SERIAL>@<run>), each with its own points

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-20 08:31:18 +01:00
1 parent dcd255ab1f
commit f21fcebeae
3 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -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:
+1 -2
View File
@@ -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 (<SERIAL>@<run>), 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]
+1 -1
View File
@@ -54,7 +54,7 @@ export default function Points({ selection, choose }) {
{station && !exists && !loading && <Card withBorder>
<Group justify="space-between">
<Text>No dataset for {station} from {start} to {end} (excluded).</Text>
<Button onClick={create} disabled={!start || !end || station.includes("@")}>Create the dataset (every point valid)</Button>
<Button onClick={create} disabled={!start || !end}>Create the dataset (every point valid)</Button>
</Group>
</Card>}
{d && <Card withBorder>