Data fixes: BCY/QOW had airline names as name_zh ('衣索比亞航空',
'馬拉維航空'); NEL/ROW had facility names ('萊克湖海軍航空總站',
'羅斯威爾國際航空中心'). All replaced with city transliterations.
Strict script-purity tests for name_zh and name_ru
Replaces the earlier no-Latin/no-Cyrillic checks with comprehensive tests
that flag any letter character outside the target script (catches Greek,
Arabic, etc., not just Latin/Cyrillic).
Data fix: SKU name_ru contained Greek omicron (U+03BF) where Cyrillic o
(U+043E) was intended ('Скирοс' → 'Скирос').
- test_name_zh_no_cyrillic: no Cyrillic in Chinese name field
- test_name_ru_no_foreign_letters: no Latin or CJK in Russian name field
Data fixes: SBH name_ru 'Густав III' (airport) → 'Сен-Бартелемі';
SPR name_ru 'Джона Грейфа II' (airport) → 'Амбергрис-Кей'
New tests:
- test_subdiv_matches_region: subdiv parent country matches region, with
overseas territory exception (PF, GP, PR, etc.)
- test_no_null_island: no lat=0, lon=0
- test_links_are_urls: links must be http:// or https://
- test_alt_names_not_duplicate_primary: alt lists must not echo primary name
- test_no_newlines_in_names: no \n/\r/\t in name fields
- test_name_zh_no_latin: name_zh with CJK must not contain Latin letters
Add 7 more invariant tests using iso_3166-1_alpha-2 and iso_3166-2
- test_code_format: code is exactly 3 uppercase ASCII letters
- test_code_unique: no duplicate IATA codes
- test_region_valid: region is a valid code per cterdam/iso_3166-1_alpha-2
- test_subdiv_valid: subdiv (when present) is valid per cterdam/iso_3166-2
- test_no_whitespace_in_names: no leading/trailing whitespace in name fields
- test_name_en_starts_uppercase: name_en does not start lowercase
- test_name_ru_starts_uppercase: name_ru does not start lowercase
Use Language Rule lists from /home/llz/llz/doc/README.md
Corrects SLAVIC_REGIONS and SINOPHONE_REGIONS to match the authoritative
Language Rule in doc/README.md. Key differences from the previous lists:
- Sinophone adds PH, ID (Philippines, Indonesia)
- Slavic adds AL, HU, RO (Albania, Hungary, Romania)
Restore hardcoded region lists, sourced from iso_3166-1_alpha-2
Replace fixture-based lookup with the same hardcoded SLAVIC_REGIONS /
SINOPHONE_REGIONS sets defined in cterdam/iso_3166-1_alpha-2
test/test_invariants.py, which is the authoritative source per the README.
Load region→lang mapping from cterdam/iso_3166-1_alpha-2
Replace hardcoded SLAVIC_REGIONS / SINOPHONE_REGIONS sets with a
session-scoped fixture that loads the authoritative mapping directly
from cterdam/iso_3166-1_alpha-2, as documented in the README.
Add invariant tests: coords, dedup, name fields, zh/ru quality
- test_all_coords_present: no null lat/lon
- test_no_duplicate_metro_rows: unique (lat, lon, name_en) — one row per metro
- test_all_name_fields_present: name_en, name_ru, name_zh all non-null
- test_name_zh_contains_cjk: name_zh must have CJK characters
- test_name_ru_has_cyrillic: name_ru must have Cyrillic
- test_no_typographic_quotes_in_ru: no «» in name_ru
- test_no_airport_words_in_zh: no 機場/空港 in name_zh
- test_balanced_parentheses: matched parens in all name fields
13/14 tests pass; test_lang_matches_region was already failing (pre-existing
ID/PH lang='zh' vs SINOPHONE_REGIONS definition gap).