Skip to content

feat(scottish): expose 2025 Scottish Parliament constituency and region#1366

Merged
cblanc merged 3 commits into
mainfrom
onspd_may_2026
Jun 10, 2026
Merged

feat(scottish): expose 2025 Scottish Parliament constituency and region#1366
cblanc merged 3 commits into
mainfrom
onspd_may_2026

Conversation

@cblanc

@cblanc cblanc commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Surfaces the new 2025 Scottish Parliament boundaries (SPC25/SPR25) on /scotland/postcodes/:postcode, the API half of #1348.

  • 2025 is now canonical. scottish_parliamentary_constituency / scottish_parliamentary_region (and their codes.*) now serve the 2025 designation; the superseded 2021 values move to _2021 suffixed fields - matching the house style of top-level = latest vintage. Second Review of Scottish Parliament Boundaries (SSI 2025/285), effective at the 7 May 2026 Holyrood election - boundaries and names changed.
  • Data refresh. latestpostcodesio-2026-06-10-1135 (the dump that carries the 2025 columns) and the test seed regenerated from it.
  • Drift reconciled. The new dump shifts outcode centroids and nearest-neighbour ordering by a few metres; queries.outcodes / queries.postcodes contract expectations updated to match (captured from ground truth).
  • Regenerated static/openapi.*, docs/api/*.api.mdx, and the full docusaurus build/.

Commits are ordered to build incrementally: data refresh → feature → regenerated docs.

Notes

  • Shipped as a minor release (feat:): the top-level constituency/region values change 2021→2025 but the field shape is additive (_2021 added), consistent with a routine boundary-vintage update.
  • Dump is live on S3 (postcodesio/public/postcodesio-2026-06-10-1135.sql.gz).

Test plan

  • Full vitest suite passes (275/275) against the regenerated seed
  • tsc clean
  • AB10 verified end to end: 2025 Aberdeen Central S16000151 / North East Scotland S17000026, 2021 retained as _2021
  • Dump confirmed live on S3

cblanc added 3 commits June 10, 2026 13:06
Point `latest` at postcodesio-2026-06-10-1135 and regenerate the test seed
from it (the new dump carries the SPD Scottish Parliament 2025 columns). The
refreshed data shifts outcode centroids and nearest-neighbour ordering by a
few metres, so reconcile the queries.outcodes / queries.postcodes contract
expectations to match.
The Second Review of Scottish Parliament Boundaries (SSI 2025/285) took effect
at the 7 May 2026 Holyrood election - boundaries and names changed. Serve the
2025 designation at the canonical scottish_parliamentary_constituency /
_region fields and move the superseded 2021 values to _2021 suffixed fields
(names and codes), matching the house style of top-level = latest vintage.

Closes the API half of #1348.
Rebuild static/openapi.{json,yaml}, docs/api/*.api.mdx, and the full build/
site from source: picks up the Scottish Parliament 2025 fields plus a
previously unregenerated outcode admin_county example.
@cblanc cblanc merged commit cc2cbf3 into main Jun 10, 2026
1 check passed
@idealbot

Copy link
Copy Markdown
Member

🎉 This issue has been resolved in version 19.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants