feat(postcodes/SV): bulk-import 262 El Salvador postcodes via Correos de El Salvador (#1039)#1468
Merged
Merged
Conversation
… de El Salvador 2025 (#1039) Source: 2025 Correos de El Salvador catalogue redistributed via the micryptosv/SV-Postales-2025-API CSV. All 14 departments resolve at 100% via case-insensitive name match. Codes are normalised by stripping the always-present leading "0" so the canonical 4-digit form matches the country regex ^(?:CP)*(\\d{4})$. Refs #1039. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
CSC Validation ReportPR Format
Labels applied: Schema Validation (262 records)✅ All records passed validation Cross-Reference Validation✅ 524 reference(s) verified Source URL Verification✅ 2 source URL(s) accessible ✅ All checks passed | Status: Ready for review |
There was a problem hiding this comment.
Pull request overview
Adds El Salvador (SV) postcode coverage to the contributions/postcodes/ dataset and introduces a helper importer script to (re)generate/merge the SV postcode file from an upstream CSV source.
Changes:
- Add
contributions/postcodes/SV.jsonwith El Salvador postcodes keyed to SV departments (state_id/state_code). - Add
bin/scripts/sync/import_el_salvador_postcodes.pyto fetch/parse the upstream CSV and write/merge SV postcodes idempotently.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| contributions/postcodes/SV.json | New SV postcode contribution dataset (country/state-linked records). |
| bin/scripts/sync/import_el_salvador_postcodes.py | New importer to fetch the upstream CSV, validate/transform codes, resolve state_id, and write/merge SV.json. |
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
Adds 262 El Salvador postcodes spanning all 14 departments, sourced
from the 2025 Correos de El Salvador catalogue redistributed via the
micryptosv/SV-Postales-2025-APICSV.(4-digit code, distrito + municipio)pair.How it works
The source ships codes in a 5-digit form (e.g.
02103) where thealways-present leading
0is a regional grouping prefix. Theimporter strips it to obtain the canonical 4-digit form expected by
the country regex
^(?:CP)*(\d{4})$.Source & licence
"source": "correos-el-salvador-via-micryptosv"Validation
python3 -m py_compileclean.country.postal_code_regex(^(?:CP)*(\d{4})$).state_idwhosecountry_id == 66and whose
iso2matchesstate_code.id,created_at,updated_at,flag).Test plan
Refs #1039.
🤖 Generated with Claude Code