Impossible runs: one definition, left out of the route model and the site statistics (#21, #22)
CI / test (pull_request) Successful in 41s
CI / test (pull_request) Successful in 41s
- core/spec/form.yaml impossible_flags: the flags that mean a run cannot have happened as recorded (a dragon an encounter does not have, a Green or the Black in the valley, two bonds, two burns, a cadet path that does not follow, an early death that still reached the hour...). atlas.runs.impossible() reads it. - The route model and the site statistics (and the riders' paths) leave those runs out, from every source; every other run is used, however partial. The runs stay in runs_clean.csv, flagged. 80 runs: 75 form, 5 Reddit. Route-model odds move by at most 0.2 points. - collection/etl/runs.py: the community form gets the same game-rule checks as "Report a run" and the Reddit comments (10 form rows newly flagged); new rule: the Black in the valley. - The first-sighting pool stays a flag only: it is what riders have seen, not a rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
036c86a1d1
commit
46c1f00150
@@ -572,10 +572,12 @@ def main(argv=None):
|
||||
ap.add_argument("--data", default=str(runs_io.PATH))
|
||||
ap.add_argument("--out", default=str(ROOT / "data/public/stats.json"))
|
||||
a = ap.parse_args(argv)
|
||||
runs = runs_io.read(a.data, sources=M["sources"])
|
||||
# a run that cannot have happened as recorded (core/spec/form.yaml impossible_flags) is left out, as in the model
|
||||
runs = [r for r in runs_io.read(a.data, sources=M["sources"]) if not runs_io.impossible(r)]
|
||||
for r in runs:
|
||||
r["_deliberate"] = deliberate(r)
|
||||
out = build(runs, len(runs), exported(), every_run=runs_io.read(a.data))
|
||||
every = [r for r in runs_io.read(a.data) if not runs_io.impossible(r)]
|
||||
out = build(runs, len(runs), exported(), every_run=every)
|
||||
Path(a.out).write_text(json.dumps(out, separators=(",", ":"), ensure_ascii=False), encoding="utf-8")
|
||||
print(f"{a.out}: {len(runs)} runs, {len(out['presets'])} presets, {Path(a.out).stat().st_size / 1e6:.1f} MB")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user