feat(postcodes/TN): 4,868 La Poste Tunisienne codes (#1039)#1505
Merged
Conversation
Adds the full Tunisian 4-digit postal code dataset from the JenhaniChedli/TunisiaGeodataAPI mirror. Why --- Closes the TN gap on issue #1039. The previously-tracked hajer77/postCodeTunisia-api source was a stub (~9 records, 8/24 governorates). JenhaniChedli's mirror covers all 24 governorates with the full Gouvernorat / Délégation / Cité hierarchy. Coverage -------- - 4,868 codes / 100% state FK - All 24 CSC TN governorates covered State FK strategy ----------------- ASCII-fold + name match against states.json + 1 alias for 'Mannouba' -> CSC 'Manouba' (single-letter spelling drift). 'Beja'/'Gabes' (no diacritics in source) match CSC 'Béja'/'Gabès' via ASCII fold. License ------- Source: JenhaniChedli/TunisiaGeodataAPI (no formal LICENSE file). Upstream: La Poste Tunisienne publicly published codes. Tier 5 per #1039 license-tier policy. Each row: source: "la-poste-tunisienne-via-jenhani-chedli" Validation ---------- - python3 -m py_compile passes - 100% regex match (^\d{4}$) - 100% state_id valid + state.country_id == 224 + state_code agrees - No auto-managed fields (id, created_at, updated_at, flag) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
CSC Validation ReportPR Format
Labels applied:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hajer77/postCodeTunisia-apistub (~9 records / 8 govs)Source
JenhaniChedli/TunisiaGeodataAPI—postcodes.jsonResearch-doc correction
Per the research doc Tier B note, Tunisia was previously categorised as
Stub only (8/24 governorates, 9 records). That was based onhajer77/postCodeTunisia-api. Direct probe shows two community mirrors with full 24-governorate coverage:hbj/tnpostcodes— 4,859 records (uppercase)JenhaniChedli/TunisiaGeodataAPI— 4,868 records (Title Case)Both scrape La Poste Tunisienne's public lookup. JenhaniChedli has slightly more records and standard JSON.
State FK
ASCII-fold + name match handles 23 of 24 governorates. One alias:
'Mannouba'(source spells with doublen) → CSC'Manouba''Beja'/'Gabes'(no diacritics in source) match CSC'Béja'/'Gabès'via NFKD fold.Distribution (top 5)
All 24 govs covered.
Test plan
python3 -m py_compile bin/scripts/sync/import_tunisia_postcodes.py^\d{4}$id,created_at,updated_at,flag)🤖 Generated with Claude Code