You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UK: build area results on the routed local-area dataset when the executor takes policyengine.py 6.10.0 #880
PolicyEngine/policyengine.py#685, released as policyengine.py 6.10.0, makes the Microcosm national dataset the UK default. It routes constituency and local-authority regions to the Microcosm local-area dataset. The national file has no area codes, so a bare bump of the executor's pin breaks four things:
National and nation-level runs. They raise in _require_uk_area_column, so the UK comparisons and the deploy sentinel fail.
Image smokes. The executor and Stage 12 smokes read local-authority codes from the installed default, so image-smoke fails.
Stage 12. It plans constituency_code_oa and la_code_oa for every UK child, so national children fail.
Names. policyengine-api sends constituency/{name} and local_authority/{name}. The new registry is keyed by GSS code, so a name misses it and falls back to a weight-matrix region, and the bundle no longer has the matrices.
Work
Build the constituency and local-authority breakdowns of national and nation-level runs from a second baseline and reform run on the routed dataset, with the same policies and nation filter. The national figures stay on the national file.
Make both image smokes check the routed dataset when the installed default carries no area codes.
Stop Stage 12 planning area columns for a routed national or nation-level report.
Map area names and lower-case codes to the registry's GSS codes. The 17 districts replaced in April 2023 stay unsupported.
Each change applies only when uk_area_regions_routed() is true. It is false on policyengine.py 6.7.5, so the change can merge before the bump and does nothing until then.
Done when
The change has merged, and the executor behaves as before on policyengine.py 6.7.5. On 6.10.0, the touched tests and an end-to-end UK run with the private data pass.
Activity