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
The UK constituency comparison code reads statistical weights from the private UK data repository and reads constituency codes, names, and hex-layout coordinates from the public UK data repository. It calculates constituency impacts, then places frontend-specific x and y positions in each API result. The planned API v2 ConstituencyImpact persistence model also stores those positions.
Required change
Preserve constituency statistical aggregation and return the constituency identity, average household income change, and relative household income change without presentation coordinates.
Use a stable constituency identifier in the response contract so app-v2 can join results to its versioned layout.
Remove x and y from the applicable API response models, serializers, tests, OpenAPI contract, and API v2 constituency-impact persistence model.
Add the required v2 Alembic migration if the coordinate columns have already been created in a retained target.
Add contract coverage proving that constituency values and identities are preserved while layout positions are absent.
Deployment order
PolicyEngine/policyengine-app-v2#1190 is the compatibility prerequisite. Release the API contract change only after the frontend renders the same map from its own layout artifact.
Supersedes PolicyEngine/policyengine-uk#1152 together with PolicyEngine/policyengine-app-v2#1190.
Current behavior
The UK constituency comparison code reads statistical weights from the private UK data repository and reads constituency codes, names, and hex-layout coordinates from the public UK data repository. It calculates constituency impacts, then places frontend-specific x and y positions in each API result. The planned API v2 ConstituencyImpact persistence model also stores those positions.
Required change
Deployment order
PolicyEngine/policyengine-app-v2#1190 is the compatibility prerequisite. Release the API contract change only after the frontend renders the same map from its own layout artifact.