Let a season be an estimate: the validator takes a method ending in its confidence and a climate source, refuses an ordinary page naming it, and requires a season on every trail

This commit is contained in:
swaits committed 2026-11-20 12:55:30 -07:00
1 parent 748186d306
commit ebccfb2e33
5 files changed
+160 -32

No files matched your search

+2 -2
View File
@@ -412,7 +412,7 @@ def sourced_trails(root, fetch, log=None):
out = []
for tid, rec in _records(root):
hike = rec.get("hike") or {}
if not hike.get("season") or hike.get("season_basis") == "estimate":
if not season.read_from_a_page(hike):
continue
points, kind = sample_points(root, rec)
med = season_model.medians(normals_at(points, fetch))
@@ -622,7 +622,7 @@ def _phrases(root):
out = {}
for tid, rec in _records(root):
hike = rec.get("hike") or {}
if hike.get("season") and hike.get("season_basis") != "estimate":
if season.read_from_a_page(hike):
out[tid] = str(hike.get("season"))
_PHRASES[root] = out
return _PHRASES[root]