Review fixes; README and CLAUDE.md finalised
- cancel reverts only the run's commits (base..HEAD), never the caller's edits - validator diffs base..HEAD, not the working tree - fix commits carry their Co-Authored-By line; no redundant end benchmark - score.py: clear error on a missing labels file; docstring says end is not passed - usage lines; README and CLAUDE.md for the generic workflow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0de006bcb2
commit
388619685a
10 files changed
+63
-30
No files matched your search
@@ -25,7 +25,8 @@ HISTORY = timedelta(days=3) # as the batch command of categories.py
|
||||
|
||||
|
||||
def events(measurements, start, end, folder=None):
|
||||
"""Detectors' events touching the range, classified with its days of history (as the batch command)."""
|
||||
"""Detectors' events touching the range, classified with its days of history. Unlike the batch command, end is not
|
||||
passed: no_data does not see a hole touching the end of the range."""
|
||||
h, b = parse_time(start) - HISTORY, parse_time(end)
|
||||
chunk = {s: k for s, ms in measurements.items() if (k := [m for m in ms if h <= m["t"] < b])}
|
||||
return [v for v in (categories.events(chunk, folder=folder) if chunk else []) if v["end"] >= start]
|
||||
@@ -88,6 +89,8 @@ if __name__ == "__main__":
|
||||
p.add_argument("--from", dest="start", required=True)
|
||||
p.add_argument("--to", dest="end", required=True)
|
||||
a = p.parse_args()
|
||||
if not os.path.exists(a.labels):
|
||||
sys.exit(f"No labels file: {a.labels}")
|
||||
station, start, end = os.path.basename(os.path.normpath(a.folder)), iso(parse_time(a.start)), iso(parse_time(a.end))
|
||||
n, labels = family_scores(a.folder, a.labels, start, end)
|
||||
if not labels:
|
||||
|
||||
Reference in new issue
Block a user