From 014a01cbbdbef309c762d632f3f4a442eb3db917 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 29 Nov 2026 18:28:40 -0700 Subject: [PATCH] Say 'No page states a season' once in the note under an estimated season Co-Authored-By: Claude Fable 5.2 --- CHANGELOG.md | 4 ++++ web/olt/facets.py | 3 +++ web/tests/test_facets.py | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c01280e..9d23b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2026-11-29 - "No page states a season" is said once + +- On three trail pages (the Big South Fork loop, the Buckley Lake to Mowdade Lake Route and Little Heaven – Upper Blue Creek) the note under an estimated season said "No page states a season" twice, once from the site and once from the record's own account of how the season was worked out. The site now says it once. + ## 2026-11-29 - John Muir Trail-Rock Creek-West Entrance (Big South Fork) corrected after a second reading - The record no longer credits the 2015 map sheet with the start: no Park Service page names one, so Bandy Creek is stated as the record's own reading. The note on why no line is included now says what the Park Service publishes, the caution adds what its Horseback Riding page says about horses on legs of the loop, and the link between the 2015 sheet and the current listing is said to rest on length and the places passed. diff --git a/web/olt/facets.py b/web/olt/facets.py index cde15cd..723a585 100644 --- a/web/olt/facets.py +++ b/web/olt/facets.py @@ -266,6 +266,9 @@ def season_note(rec): if not season_estimated(rec): return "" reason = season_reason(rec) + said = "No page states a season." + if reason.startswith(said): # a record's own method may open with it; the lead says it once + reason = reason[len(said):].strip() if season_pages_differ(rec): lead = "No one page states this season." elif "estimated from the climate" in reason: diff --git a/web/tests/test_facets.py b/web/tests/test_facets.py index 1e83a05..7e8ecf1 100644 --- a/web/tests/test_facets.py +++ b/web/tests/test_facets.py @@ -195,6 +195,14 @@ class SeasonTextTest(unittest.TestCase): self.assertNotIn("walk it outside", note) self.assertNotIn("Judged from", note) # the standard lead is said once, in the note's own words + def test_a_method_that_opens_with_no_page_states_a_season_is_not_said_twice(self): + rec = fake(1, hike=est_hike(season_method=( + "No page states a season. The loop is on a plateau where summers are hot, so spring and fall " + "are set as the window. Confidence: low."))) + note = facets.season_note(rec) + self.assertEqual(note.count("No page states a season"), 1, note) + self.assertIn("spring and fall are set as the window", note) + def test_a_page_that_contradicts_itself_is_said_once_not_twice(self): rec = fake(1, hike=est_hike(season_method=( "A page was found but it contradicts itself, so no page is relied on. The season was estimated "