Record the inputs of every estimate for the monthly check, and test that every trail has a season with its provenance

This commit is contained in:
swaits committed 2026-11-20 13:10:13 -07:00
1 parent 191b5cfc4f
commit 713fff78df
4 files changed
+721

No files matched your search

+8
View File
@@ -90,6 +90,14 @@ def check_season(tid, hike, errors):
elif basis == "estimate":
errors.append(f"{tid}: hike.season_method is required with season_basis \"estimate\"")
if basis == "estimate" and has_months and isinstance(hike.get("months"), list):
try:
if hike.get("season") != phrase_for(hike["months"]):
errors.append(f"{tid}: the season phrase of an estimate must be built from its "
f"months: {phrase_for(hike['months'])!r}")
except (ValueError, TypeError):
errors.append(f"{tid}: hike.months must be month numbers 1 to 12")
naming_season = _naming(sources, "season")
if basis != "estimate" and any(_is_climate(x) for x in naming_season):
errors.append(