Answer prose round 1 and product-owner round 1: plainer resolvedRef, checkCalcFields and name-fence docs, geo-se.py's pointers name their headings, Fake and Columns keep a godoc line, and arm.go's Layout line names what an arm is

This commit is contained in:
2026-10-07 01:15:50 +02:00
committed by Lillem4n
parent ee25212618
commit 1419673b96
8 changed files with 23 additions and 21 deletions
+4 -4
View File
@@ -37,9 +37,9 @@ NVDB_PAGE = 50000
OUT = Path(__file__).resolve().parent.parent / "data" / "geo" / "SE"
CACHE = Path(__file__).resolve().parent / "cache"
TIMEZONE = "Europe/Stockholm"
# This script's reading of the "exceptions in big cities" in docs/research/research-geo-se.md, postnummer Structure.
# This script's reading of the "exceptions in big cities" in docs/research/research-geo-se.md, Postal codes → Structure.
ONE_POSITION = {"Stockholm", "Göteborg", "Malmö"}
# A tätort's floor: "minst 200 invånare", docs/research/research-geo-se.md, Ortnamn.
# A tätort's floor: "minst 200 invånare", docs/research/research-geo-se.md, Lantmäteriet → Ortnamn.
UNMATCHED_POPULATION = 200
@@ -135,8 +135,8 @@ class Nearest:
def street_delivery(name, codes):
"""The codes delivered to a street: the digit after the postort's own prefix is 0 or 1 for boxes and 8 for reply mail,
per docs/research/research-geo-se.md, postnummer Structure."""
"""The codes delivered to a street: the digit after the postort's own prefix is 0 or 1 for boxes and 8 for reply mail
outside ONE_POSITION's cities, per docs/research/research-geo-se.md, Postal codes → Structure."""
if name in ONE_POSITION:
return [c for c in codes if c[1] != "0"]
largest = collections.Counter(c[:3] for c in codes).most_common(1)[0][1]