Fix the season wording and checks after review

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-20 10:22:29 -07:00
1 parent 157f268974
commit 1c60e0c14c
7 files changed
+19 -5

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
## 2026-11-20 - Every season now says where it came from
- The 109 trails that have a season now record where it came from: 86 are from the body that manages the trail, or for a route its author, and 23 are from one page that is not the trail's own. None rests on several agreeing pages yet. A trail's "About this data" says which, in one sentence under the pages the facts were read on.
- The 109 trails that have a season now record where it came from: 86 are from the body that manages the trail or the trail's own association, or for a route its author, and 23 are from one page that is not the trail's own. None rests on several agreeing pages yet. A trail's "About this data" says which, in a sentence or two under the pages the facts were read on.
- A season from a route author's guidebook, cited through the publisher's page, counts as the author's own.
- This is the first step toward a season on every trail. The other 114 have none yet, and the "By month" lists still say so. A season that is worked out from climate rather than found on a page will be marked as an estimate wherever it appears.
- For contributors: a season now needs a basis (`hike.season_basis`) and a page that states it, and the validator checks both. A change to the basis gets a history entry like any other fact.
+1 -1
View File
@@ -1,6 +1,6 @@
# Season research brief
For a worker with nothing else to go on. You do this task yourself and start no subagents. Read `.claude/skills/refresh-trails/rules.md` and `.claude/skills/refresh-trails/proposal-format.md` first; this brief adds to them and does not replace them. The audit uses the same brief when it looks for a source for a season that is still an estimate (see `docs/audit.md`).
For a worker with nothing else to go on. You do this task yourself and start no subagents. Read `.claude/skills/refresh-trails/rules.md` and `.claude/skills/refresh-trails/proposal-format.md` first; this brief adds to them and does not replace them. The audit will use the same brief when it looks for a source for a season that is still an estimate.
## Goal
@@ -156,7 +156,7 @@ outcome = "applied"
date = "2026-11-20"
change = "The season is recorded as coming from one page that is not the trail's own."
fields = ["hike.season_basis"]
basis = "The season is stated by National Park Service, Glacier National Park (trail status page, last updated 2026-08-28). The season and months are the Ptarmigan Tunnel's season, on which the loop depends: the tunnel doors generally open in mid-July and usually close by late September; July, August and September each have half a month or more in season as: Mid-July to late September."
basis = "The season is stated by National Park Service, Glacier National Park (trail status page, last updated 2026-08-28), as: Mid-July to late September. It is the Ptarmigan Tunnel's season, on which the loop depends. The tunnel doors generally open in mid-July and usually close by late September, so July, August and September each have half a month or more in season."
basis_url = "https://www.nps.gov/glac/planyourvisit/trailstatusreports.htm"
asked_by = "the dataset's own check"
outcome = "applied"
+1 -1
View File
@@ -108,7 +108,7 @@ outcome = "applied"
date = "2026-11-20"
change = "The season is recorded as coming from the page of the body that manages the trail or, for a route, its author."
fields = ["hike.season_basis"]
basis = "The season is stated by Explore Minnesota; Superior Hiking Trail Association as: June to September."
basis = "The season is stated by Superior Hiking Trail Association as: June to September."
basis_url = "https://superiorhiking.org/plan-your-adventure/"
asked_by = "the dataset's own check"
outcome = "applied"
+7
View File
@@ -55,6 +55,13 @@ def check_season(tid, hike, errors):
if not naming_season:
errors.append(
f"{tid}: hike.season_basis \"{basis}\" needs a [[hike.source]] naming season")
elif basis == "source":
publishers = {str(s.get("publisher", "")).strip().casefold()
for s in naming_season}
if len(publishers) != 1:
errors.append(
f"{tid}: hike.season_basis \"source\" needs exactly one publisher "
"naming season (two or more is \"sources\")")
elif basis == "sources":
publishers = {str(s.get("publisher", "")).strip().casefold()
for s in naming_season if str(s.get("publisher", "")).strip()}
+7
View File
@@ -73,6 +73,13 @@ class SeasonBasisTest(unittest.TestCase):
errors = check(season_basis="source", source=[src("Guide A", facts=("days",))])
self.assertTrue(errors)
def test_source_basis_needs_exactly_one_publisher(self):
two = [src("Park Service"), src("Blog", url="https://example.org/b")]
errors = check(season_basis="source", source=two)
self.assertTrue(any("exactly one publisher" in e for e in errors), errors)
same = [src("Park Service"), src("Park Service", url="https://example.org/b")]
self.assertEqual(check(season_basis="source", source=same), [])
def test_primary_needs_a_naming_source(self):
errors = check(source=[src("Park Service", facts=("days",))])
self.assertTrue(errors)
+1 -1
View File
@@ -186,7 +186,7 @@ def season_text(rec):
SEASON_BASIS_TEXT = {
"primary": "The season comes from the page of the body that manages the trail or, for a route, its author.",
"primary": "The season comes from the page of the body that manages the trail or the trail's own association or, for a route, its author.",
"sources": "Two or more pages from different publishers agree on the season.",
"source": "One page states the season. It is not the trail's own page.",
}