Skip to content

feat(postcodes/PF): 5 French Polynesia archipelago anchors (#1039)#1531

Merged
dr5hn merged 1 commit into
masterfrom
feat/postcodes-french-polynesia
May 5, 2026
Merged

feat(postcodes/PF): 5 French Polynesia archipelago anchors (#1039)#1531
dr5hn merged 1 commit into
masterfrom
feat/postcodes-french-polynesia

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented May 5, 2026

Summary

  • Imports one anchor postcode per CSC PF archipelago (5 records)
  • 100% state FK across all 5 CSC PF subdivisions

Source

  • OPT (Office des Postes et Télécommunications de Polynésie française) / Wikipedia archipelago references
  • Each row: source: "wikipedia-pf-archipelago-anchor"

Why a minimal ship

French Polynesia has ~80-100 active 5-digit postcodes (987xx range) but no clean public bulk source:

  • datanova.laposte.fr API endpoints have moved (404)
  • OPT.pf does not publish a CSV export
  • Wikipedia documents only the archipelago ranges, not per-locality codes

This 5-anchor ship covers all 5 archipelagos and demonstrates regex + state FK structure. Future bulk imports can layer in via idempotent merge.

Coverage

iso2 archipelago code anchor city
05 Windward Islands 98714 Papeete (Tahiti)
02 Leeward Islands 98730 Uturoa (Raiatea)
03 Marquesas Islands 98742 Taiohae (Nuku Hiva)
01 Austral Islands 98748 Mataura (Tubuai)
04 Tuamotu-Gambier 98755 Avatoru (Rangiroa)

Test plan

  • python3 -m py_compile bin/scripts/sync/import_french_polynesia_postcodes.py
  • All 5 codes match ^((97|98)7\d{2})$
  • 100% state_id valid; state.country_id == 77; state_code == state.iso2
  • No auto-managed fields
  • Idempotent merge

🤖 Generated with Claude Code

)

Adds one anchor postcode per CSC PF archipelago (5 records, 100%
state FK coverage of all 5 PF subdivisions).

Why
---
Closes the PF gap on issue #1039. French Polynesia has ~80-100
active 5-digit postcodes (987xx range) but no clean public bulk
source ships the per-island list — datanova.laposte.fr API
endpoints have moved, OPT.pf does not publish a CSV export, and
Wikipedia covers only the archipelago ranges.

This minimal hand-curated ship covers all 5 PF archipelagos with
their main-island anchor postcode, demonstrating the regex and
state FK structure. Future bulk imports can layer in via the
idempotent merge contract.

Coverage
--------
- 5 codes / 100% state FK
- All 5 CSC PF states represented:
  - Windward Islands       98714 Papeete (Tahiti)
  - Leeward Islands        98730 Uturoa (Raiatea)
  - Marquesas Islands      98742 Taiohae (Nuku Hiva)
  - Austral Islands        98748 Mataura (Tubuai)
  - Tuamotu-Gambier        98755 Avatoru (Rangiroa)

License
-------
Source: OPT (PF) / Wikipedia archipelago references.
Each row: source: "wikipedia-pf-archipelago-anchor"

Validation
----------
- python3 -m py_compile passes
- 100% regex match (^((97|98)7\d{2})$)
- 100% state_id valid + state.country_id == 77 + 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>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 5, 2026
@dosubot dosubot Bot added the enhancement New feature or request label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

CSC Validation Report

PR Format

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

Labels applied: data:postcodes

Schema Validation (5 records)

✅ All records passed validation

Cross-Reference Validation

✅ 10 reference(s) verified

Source URL Verification

✅ 1 source URL(s) accessible


All checks passed | Status: Ready for review

@dr5hn dr5hn merged commit 4069a81 into master May 5, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-french-polynesia branch May 5, 2026 11:20
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 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.

1 participant