Skip to content

feat(postcodes/AR): bulk-import 23,184 Argentina postcodes via Correo Argentino (#1039)#1447

Merged
dr5hn merged 1 commit into
masterfrom
feat/postcodes-argentina
Apr 27, 2026
Merged

feat(postcodes/AR): bulk-import 23,184 Argentina postcodes via Correo Argentino (#1039)#1447
dr5hn merged 1 commit into
masterfrom
feat/postcodes-argentina

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 27, 2026

Summary

Adds 23,184 Argentina postcodes spanning all 24 provinces, sourced from
Correo Argentino's free CPA consultation feed via the community
androdron/localidades_AR mirror.

  • Coverage: 100% of provinces (all 24 in states.json) resolve.
  • Format: Legacy 4-digit Correo postal codes; matches the country's
    ^[A-Z]?\d{4}[A-Z]{0,3}$ regex (which also accepts the modern
    CPA-Argentino B1234ABC form).
  • Idempotent merge: Re-running the importer never overwrites
    curated rows; new (code, locality) pairs are appended.

Source & licence

How it works

  • ASCII-fold (NFKD strip combining marks) the source provincia
    column to join with states.json (handles Cordoba/Córdoba,
    Tucuman/Tucumán, Rio Negro/Río Negro, etc.).
  • Single STATE_ALIASES entry maps "Ciudad Autonoma de Buenos
    Aires" -> CSC's "Autonomous City of Buenos Aires".
  • Per-row state_id + state_code populated against the
    single-letter ISO 3166-2 codes used in states.json (B/C/J/K/...).

Validation

  • python3 -m py_compile clean.
  • 100% of 23,184 codes match country.postal_code_regex.
  • 100% of records resolve a valid state_id whose
    country_id == 11 (Argentina) and whose iso2 matches the
    emitted state_code.
  • No auto-managed fields (id, created_at, updated_at,
    flag) in any row.

Test plan

  • Importer compiles and runs on a clean checkout.
  • Cross-reference validator passes (regex + FK + state_code agreement).
  • Idempotent merge verified.
  • CI pipeline green.

Refs #1039.

🤖 Generated with Claude Code

… Argentino (#1039)

Source: androdron/localidades_AR (Correo Argentino consultation feed).
All 24 provinces resolved (100% state FK) via ASCII-fold name match;
"Ciudad Autonoma de Buenos Aires" aliased to CSC's "Autonomous City of
Buenos Aires". Codes are the legacy 4-digit Correo numbers (matched by
the country regex which already accepts both legacy and CPA Argentino).

Refs #1039.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 27, 2026 12:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 27, 2026
@dosubot dosubot Bot added the enhancement New feature or request label Apr 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CSC Validation Report

PR Format

  • ✅ Description provided
  • ✅ Data source linked
  • ✅ Issue linked (recommended for data changes)
  • ✅ Justification / context provided

Labels applied: data:postcodes, large-contribution

⚠️ Large Contribution

This PR contains 23184 records. Large contributions require manual review.

Schema Validation (23184 records)

✅ All records passed validation

Cross-Reference Validation

✅ 46368 reference(s) verified

Source URL Verification

✅ 2 source URL(s) accessible


All checks passed | Status: Ready for review

@dr5hn dr5hn merged commit 6dd2546 into master Apr 27, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-argentina branch April 27, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:postcodes enhancement New feature or request large-contribution ready-for-review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants