Repository navigation
Add the six April 2023 unitary authorities to LocalAuthority - #1870
Conversation
Cumberland, North Northamptonshire, North Yorkshire, Somerset, West Northamptonshire and Westmorland and Furness are the April 2023 local authority districts absent from the enum, so a dataset on that roster could not supply local_authority for their households (about 1.4 million people fell to the MAIDSTONE default). Members are inserted in the enum's display-name order; every predecessor district stays a valid member. Requested on #1855; consumed by PolicyEngine/microcosm#953. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Adversarial review — one small required fixReviewed C1 / P2 — Give the changelog fragment a configured Towncrier typechangelog.d/local-authority-2023-unitaries.md:1 lacks a configured type. The repository requires Running installed Towncrier 26.9.0 against this exact snapshot with Fix: rename the fragment to Validation
No material evidence gaps remain in the reviewed scope. No dependencies were installed, source files changed, or population data downloaded. Review performed with Codex and the PolicyEngine review-program workflow. |
Review C1: a typeless fragment yields no release note and no minor bump; the repository requires <slug>.<type>.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
C1 addressed in c0f089f: the fragment is now |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Review at c0f089f4 (worktree checkout; CI green).
Checked first-hand:
- Pulled the ONS April 2023 LAD roster (361 rows) and matched every
LAD23NMagainst the enum's display names: zero missing after this PR, so the six really are the only gaps. Codes match (E06000061 N Northants, E06000062 W Northants, E06000063 Cumberland, E06000064 Westmorland and Furness, E06000065 N Yorkshire, E06000066 Somerset). policyengine-core test .../gov/local_authorities: 36 passed.- Encode/decode round trip on the new member names goes through
Enum.encodeby name, and the H5 path stores names, so inserting members mid-list (which shifts ~300int16indices) is safe for the supported dataset format. Anything that persisted raw enum indices would remap silently, but nothing in this repo does. - Only other
LocalAuthorityconsumer is the CTR schemeconfig.py, which compares against five specific members; unaffected. - The Towncrier rename from the Codex round is in place (
.added.md).
One nit on the body: "about 1.4 million people" for the six authorities. ONS mid-2023 estimates for the six sum to roughly 2.5 million (North Yorkshire ~0.62m and Somerset ~0.58m alone are 1.2m). If 1.4m is the dataset-weighted count of households currently falling to the MAIDSTONE default, say so; otherwise correct it.
Approving.
Adds the six April 2023 unitary authorities to
LocalAuthority: Cumberland (E06000063), North Northamptonshire (E06000061), North Yorkshire (E06000065), Somerset (E06000066), West Northamptonshire (E06000062) and Westmorland and Furness (E06000064).They are the only April 2023 local authority district codes with no member, so a dataset on that roster cannot supply
local_authorityfor their households (about 1.4 million people) and they fall to theMAIDSTONEdefault. Microcosm assigns an authority per household row and is about to supply the input (PolicyEngine/microcosm#953); the ask was first raised in the review of #1855, whoseamounts.yamlcan then carry Band D for these six as well.Members are inserted in the enum's existing display-name order; every predecessor district stays a valid member.
policyengine_uk/tests/policy/baseline/gov/local_authoritiespasses (36 tests).🤖 Generated with Claude Code