Link DEU, Deutschlandweit, the German remote regions, AMER and North America
DEU and Deutschlandweit are spellings of Germany, AMER and North America of the United States. Seevetal and Neukirchen-Vluyn are German towns, and Niedersachsen, Nord-, Ost- and Süddeutschland are regions of Germany named without towns. Fleet Place Office and Solaris SE stay unlinked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a19c528e3f
commit
5410131f4a
3 files changed
+19
-6
No files matched your search
+4
-3
@@ -149,7 +149,7 @@ CW Curaçao
|
|||||||
CX Christmas Island
|
CX Christmas Island
|
||||||
CY Cyprus | Κύπρος | Kypros | Kibris
|
CY Cyprus | Κύπρος | Kypros | Kibris
|
||||||
CZ Czechia | Czech Republic | Česko | Česká republika
|
CZ Czechia | Czech Republic | Česko | Česká republika
|
||||||
DE Germany | Deutschland
|
DE Germany | Deutschland | DEU | Deutschlandweit
|
||||||
DJ Djibouti
|
DJ Djibouti
|
||||||
DK Denmark | Danmark
|
DK Denmark | Danmark
|
||||||
DM Dominica
|
DM Dominica
|
||||||
@@ -325,7 +325,7 @@ TZ Tanzania
|
|||||||
UA Ukraine | Україна | Ukraina
|
UA Ukraine | Україна | Ukraina
|
||||||
UG Uganda
|
UG Uganda
|
||||||
UM United States Minor Outlying Islands
|
UM United States Minor Outlying Islands
|
||||||
US United States | United States of America | USA | U.S.A. | US | U.S. | Americas
|
US United States | United States of America | USA | U.S.A. | US | U.S. | Americas | AMER | North America
|
||||||
UY Uruguay
|
UY Uruguay
|
||||||
UZ Uzbekistan
|
UZ Uzbekistan
|
||||||
VA Vatican City | Holy See
|
VA Vatican City | Holy See
|
||||||
@@ -393,7 +393,8 @@ _CITIES: dict[str, str] = {
|
|||||||
"oldenburg", "emmendingen", "wuppertal", "wiesbaden", "tubingen", "mainz", "lubeck",
|
"oldenburg", "emmendingen", "wuppertal", "wiesbaden", "tubingen", "mainz", "lubeck",
|
||||||
"bayreuth", "bad homburg", "homburg", "ettlingen", "bremerhaven",
|
"bayreuth", "bad homburg", "homburg", "ettlingen", "bremerhaven",
|
||||||
"breidenbach", "bielefeld", "saarbrucken", "hildesheim", "moers", "kiel",
|
"breidenbach", "bielefeld", "saarbrucken", "hildesheim", "moers", "kiel",
|
||||||
"ulm", "regensburg", "freiburg", "obersulm"), "DE"),
|
"ulm", "regensburg", "freiburg", "obersulm", "seevetal",
|
||||||
|
"neukirchen vluyn"), "DE"),
|
||||||
**dict.fromkeys(("athens", "thessaloniki"), "GR"),
|
**dict.fromkeys(("athens", "thessaloniki"), "GR"),
|
||||||
**dict.fromkeys(("budapest",), "HU"),
|
**dict.fromkeys(("budapest",), "HU"),
|
||||||
**dict.fromkeys(("dublin", "cork", "galway", "limerick"), "IE"),
|
**dict.fromkeys(("dublin", "cork", "galway", "limerick"), "IE"),
|
||||||
|
|||||||
+10
-1
@@ -135,6 +135,7 @@ _ALIAS_GROUPS: tuple[tuple[str, ...], ...] = (
|
|||||||
("Lübeck", "Luebeck", "Lubeck"),
|
("Lübeck", "Luebeck", "Lubeck"),
|
||||||
("Münster", "Muenster", "Munster"),
|
("Münster", "Muenster", "Munster"),
|
||||||
("Saarbrücken", "Saarbruecken", "Saarbrucken"),
|
("Saarbrücken", "Saarbruecken", "Saarbrucken"),
|
||||||
|
("Neukirchen-Vluyn",),
|
||||||
# Austria
|
# Austria
|
||||||
("Vienna", "Wien", "Vienne"),
|
("Vienna", "Wien", "Vienne"),
|
||||||
("Salzburg",),
|
("Salzburg",),
|
||||||
@@ -304,8 +305,16 @@ _ORESUND = Region(
|
|||||||
_split("Øresund, Öresund, Oresund, Oresund Region, Øresundsregionen, Öresundsregionen"),
|
_split("Øresund, Öresund, Oresund, Oresund Region, Øresundsregionen, Öresundsregionen"),
|
||||||
(), includes=("hovedstaden", "skane"))
|
(), includes=("hovedstaden", "skane"))
|
||||||
|
|
||||||
|
# Germany's by the names boards write for a remote role's area, towns not
|
||||||
|
# listed: a town in Germany is found through the country.
|
||||||
|
_GERMANY = tuple(Region(key, label, _split(names), (), "DE") for key, label, names in (
|
||||||
|
("niedersachsen", "Niedersachsen", "Niedersachsen, Lower Saxony"),
|
||||||
|
("norddeutschland", "Norddeutschland", "Norddeutschland, Northern Germany"),
|
||||||
|
("ostdeutschland", "Ostdeutschland", "Ostdeutschland, Eastern Germany"),
|
||||||
|
("suddeutschland", "Süddeutschland", "Süddeutschland, Southern Germany")))
|
||||||
|
|
||||||
REGIONS: dict[str, Region] = {
|
REGIONS: dict[str, Region] = {
|
||||||
r.key: r for r in (_SKANE, _HOVEDSTADEN, _ZEALAND, _ORESUND, _JUTLAND, _FUNEN)}
|
r.key: r for r in (_SKANE, _HOVEDSTADEN, _ZEALAND, _ORESUND, _JUTLAND, _FUNEN, *_GERMANY)}
|
||||||
|
|
||||||
|
|
||||||
def _phrases(region: Region) -> tuple[str, ...]:
|
def _phrases(region: Region) -> tuple[str, ...]:
|
||||||
|
|||||||
@@ -351,10 +351,13 @@ def test_null_columns_match_nothing_and_do_not_raise() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_every_region_has_names_and_towns() -> None:
|
def test_every_region_has_names_and_towns() -> None:
|
||||||
assert set(REGIONS) == {"skane", "hovedstaden", "zealand", "oresund", "jutland", "funen"}
|
germany = {"niedersachsen", "norddeutschland", "ostdeutschland", "suddeutschland"}
|
||||||
|
assert set(REGIONS) == {"skane", "hovedstaden", "zealand", "oresund", "jutland",
|
||||||
|
"funen"} | germany
|
||||||
for key, region in REGIONS.items():
|
for key, region in REGIONS.items():
|
||||||
assert region.key == key and region.label and region.names
|
assert region.key == key and region.label and region.names
|
||||||
assert region.towns or region.includes
|
# Germany's are named only; its towns are found through the country.
|
||||||
|
assert region.towns or region.includes or key in germany
|
||||||
|
|
||||||
|
|
||||||
def test_the_bare_word_zealand_is_no_name_since_new_zealand_has_it() -> None:
|
def test_the_bare_word_zealand_is_no_name_since_new_zealand_has_it() -> None:
|
||||||
|
|||||||
Reference in new issue
Block a user