Skip to content

feat(postcodes/UA): bulk-import 15,086 Ukraine postcodes via Ukrposhta (#1039)#1452

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

feat(postcodes/UA): bulk-import 15,086 Ukraine postcodes via Ukrposhta (#1039)#1452
dr5hn merged 1 commit into
masterfrom
feat/postcodes-ukraine

Conversation

@dr5hn

@dr5hn dr5hn commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

Adds 15,086 Ukraine postcodes covering every city/town in the Ukrposhta
catalogue, sourced from the rvolykh/UAPostcodes SQL dump.

  • Coverage: 100% region resolution (27/27 in states.json), spanning
    all 24 oblasts plus the Autonomous Republic of Crimea and the two
    cities of national importance (Kyiv, Sevastopol).
  • Format: 5-digit Ukrposhta codes; locality_name in Ukrainian
    Cyrillic.

How it works

The source ships three SQL dumps. The importer parses
cities.sql (City rows have district_id not region_id) and
joins to districts.sql to obtain the oblast id, then maps that to
CSC's states.json iso2 via a hand-curated 27-entry table.

Source & licence

Validation

  • python3 -m py_compile clean.
  • 100% of 15,086 codes match country.postal_code_regex (^(\d{5})$).
  • 100% of records resolve a valid state_id whose country_id == 230
    and whose iso2 matches state_code.
  • No auto-managed fields (id, created_at, updated_at, flag).

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

#1039)

Source: Ukrposhta postcode catalogue redistributed via the
rvolykh/UAPostcodes SQL dump. Joins City -> District -> Region with a
hand-curated 27-entry region_id -> CSC iso2 map. All 27 oblasts /
cities of national importance / Crimea + Sevastopol resolve at 100%.

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 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
@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 15086 records. Large contributions require manual review.

Schema Validation (15086 records)

✅ All records passed validation

Cross-Reference Validation

✅ 30172 reference(s) verified

Source URL Verification

✅ 3 source URL(s) accessible


All checks passed | Status: Ready for review

@dosubot dosubot Bot added the enhancement New feature or request label Apr 27, 2026
@dr5hn dr5hn merged commit 6597c74 into master Apr 27, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-ukraine branch April 27, 2026 13:11
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