Add 19 trails and 20 tracks, record stated permission, and remove the C&O Canal Towpath
Mirror to forge / mirror (push) Canceled after 0s
Validate / validate (push) Canceled after 0s
Validate / site (push) Canceled after 0s
Validate / deploy (push) Canceled after 0s

A deeper, region-by-region search of the web added 14 official trails and
4 routes. The Hoosier Heritage Trail was added at its association's request
(issue 2) with the association's own track, shared by written permission.

- New licence value `stated-permission`, with the quoted words, who gave
  them, when and where as fields of the record, shown on the trail page
  and carried in the GPX description.
- Tracks from OpenStreetMap or the Forest Service's open trail data for
  eleven of the new trails and seven existing ones. `tools/osm_track.py`
  can join several relations and leave ways out by name.
- The C&O Canal Towpath is removed: the rule leaves out canal towpaths.
- The Grand Enchantment Trail is recorded as a route by its author, with
  no track.
- Corrections to the Finger Lakes, Ozark Highlands, Eastern Continental
  and Knobstone records, checked against the pages they cite.
- Site: the list pages' own units switch is gone in favour of the header
  one; the map switch and a swapped length range stay in step with the
  page.
- CHANGELOG.md brought up to date from the site's opening to today.

204 trails: 147 official trails and 57 routes; 126 have a track.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-16 12:22:56 -07:00
1 parent c11a72a7dd
commit d34a9617cd
127 files changed
+2612 -358

No files matched your search

+6 -3
View File
@@ -60,7 +60,7 @@ class ExtraPagesTest(unittest.TestCase):
def test_all_routes_on_routes_page(self):
routes = [r for r in self.records if r["derived"]["kind"] == "route"]
self.assertEqual(len(routes), 52)
self.assertEqual(len(routes), 57)
page = read_out("routes/index.html")
import html as _html
text = _html.unescape(page)
@@ -137,8 +137,9 @@ class ExtraPagesTest(unittest.TestCase):
doc = read_out(rel)
results = doc[doc.index('<div class="results"'):]
for part in ('<div class="list-head" aria-hidden="true">', '<ol class="entries"',
'name="units-list"', '<ul class="key"', "Sort by", 'data-sort-select'):
'<ul class="key"', "Sort by", 'data-sort-select'):
self.assertIn(part, results, f"{rel}: {part}")
self.assertNotIn('name="units-list"', doc, rel) # the header's switch is the only one
scale = re.search(r'<div class="list-head".*?</div>', results, re.S).group(0)
self.assertEqual(scale.count('class="len__km"'), 3, rel)
self.assertEqual(scale.count('class="len__mi"'), 3, rel)
@@ -232,7 +233,9 @@ class ExtraPagesTest(unittest.TestCase):
for lic in {r["source"]["licence"] for r in lines}:
n = sum(1 for r in lines if r["source"]["licence"] == lic)
label = html.escape(words.label(words.LICENCES, lic), quote=True)
self.assertIn(f"Tracks licensed {label}: {n} record", page, lic)
what = (f"Tracks shared with permission: {n} record" if lic == "stated-permission"
else f"Tracks licensed {label}: {n} record")
self.assertIn(what, page, lic)
for name in ("trails.json", "overview.geojson"):
self.assertRegex(page, rf'<a href="/data/{re.escape(name)}">')
for name in ("all-gpx.zip", "all-geojson.zip"):