Let a place carry its own label and preposition, keep the count in every place title, and test that slugs follow names

A registry entry may now set label and prep. A plateau reads "Plateau" and "on the Colorado
Plateau", the Mogollon Rim "Escarpment" and "along the Mogollon Rim", a national monument or a
parkway its own word; the default is still "Mountain range" and "in the". Every national park,
provincial park, monument, recreation area and parkway in the registry is labelled.

A place title no longer gives up its ": N Trails" ending when it is long: it drops the state first
and then keeps the count over the cap, and the state is left out where the name already holds
it (Oregon Cascades, California Coast Ranges). A test checks that every slug is the slug of its
display name, with the Arizona White Mountains as the one stated exception.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Sonnet 5.5 committed 2026-11-20 12:28:03 -07:00
1 parent a97ea85093
commit 30d03b8069
10 files changed
+307 -43

No files matched your search

+6 -2
View File
@@ -1050,8 +1050,8 @@ def write_registry(root, entries):
lines.pop()
for e in sorted(entries, key=lambda e: (_KIND_ORDER.get(e["kind"], 9), e["slug"])):
lines += ["", "[[place]]"]
for key in ("slug", "kind", "name", "where", "within", "source", "source_id",
"source_version", "box"):
for key in ("slug", "kind", "name", "label", "prep", "where", "within", "source",
"source_id", "source_version", "box"):
if key in e and e[key] not in (None, [], ()):
lines.append(f"{key} = {refresh._scalar(e[key])}")
with open(path, "w", encoding="utf-8") as f:
@@ -1132,6 +1132,10 @@ def apply(proposal_path, root, today, exclude=frozenset()):
"where": old.get("where") or v["where"],
"source": v["source"], "source_id": v["source_id"],
"source_version": versions.get(v["source"], ""), "box": v["box"]}
# a reviewed label and preposition ("Plateau", "on the") are kept too
for kept in ("label", "prep"):
if old.get(kept):
entry[kept] = old[kept]
if v.get("within"):
entry["within"] = list(v["within"])
entries.append(entry)