Show each trail's own emblem, keep a history on every record, and list what was left out
- Emblems for 81 trails, up from 41. Each is the trail's own crest, badge or roundel alone, cropped out of a larger logo where need be and made transparent where that could be done cleanly. Records without one say where an emblem was looked for. The validator checks the logo state. - Every record has a `[[history]]` list: what changed or was asked for, on what basis, who asked and whether it was applied or declined. `tools/check_history.py` fails a changed fact with no history entry and prints earlier entries about a changed field. It runs in CI before the site deploys. Each trail page shows the history. - A new page, "Considered and left out", built from `left-out.toml`: 35 trails and routes with the reason, the deciding fact and its source. - The Hoosier Heritage Trail has its ends, its free map set and its emblem from its association (issue 2). Any trail may list its holder's own guide or map set. - A stated permission is quoted in the download credit box. - `tools/gpx_track.py` turns a GPX file from a holder or a hiker into a record's track files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
d34a9617cd
commit
24bfbb2fa8
374 files changed
+7796
-703
No files matched your search
@@ -494,13 +494,14 @@ class RenderUnitTest(unittest.TestCase):
|
||||
def test_logo_source_without_a_logo_file_is_not_called_taken_from(self):
|
||||
# A record can name where its logo is held without including the logo.
|
||||
rec = sample_record("X Trail")
|
||||
rec["shield"] = {"status": "use-real-logo", "logo_source": "https://holder.example/", "contact": "Holder",
|
||||
rec["shield"] = {"status": "logo-not-found", "logo_source": "https://holder.example/", "contact": "Holder",
|
||||
"note": "No policy found.", "logo_file": "", "logo_owner": "Holder & Co"}
|
||||
_, _, body, _ = trail.render(rec, site.Site("N", "T"))
|
||||
self.assertIn('href="https://holder.example/"', body)
|
||||
self.assertNotIn("logo was taken from", body)
|
||||
self.assertIn("the logo is not included here", body)
|
||||
self.assertIn("The trail has a logo, held by Holder & Co, but no copy of it is in this dataset.", body)
|
||||
self.assertIn("Emblem not found.", body)
|
||||
self.assertIn("An emblem exists or may exist, but no usable artwork of it was found at a source the dataset allows.", body)
|
||||
|
||||
def test_trail_correction_links_github_branch(self):
|
||||
gh = site.Site("N", "T", repo_url="https://github.com/o/r/", repo_branch="dev")
|
||||
@@ -549,8 +550,8 @@ class RenderUnitTest(unittest.TestCase):
|
||||
rec = sample_record(name="A & B")
|
||||
n = pages.render_site([rec], out, repo, site=site.Site("N", "T"))
|
||||
# trail page + home + 404 + places hub + 1 place + lists hub + routes,
|
||||
# sources, logos, about, data, schema, changelog, saved (no list holds MIN_SIZE trails)
|
||||
self.assertEqual(n, 14)
|
||||
# sources, logos, about, data, schema, changelog, left out, saved (no list holds MIN_SIZE trails)
|
||||
self.assertEqual(n, 15)
|
||||
with open(os.path.join(out, "trails", "x", "index.html"), encoding="utf-8") as f:
|
||||
self.assertIn("A & B", f.read())
|
||||
with open(os.path.join(out, "index.html"), encoding="utf-8") as f:
|
||||
|
||||
Reference in new issue
Block a user