Request UK constituency and local-authority impacts separately from the national economy result
Maintainer thường phản hồi trong vòng 3 ngày
Một pull request liên quan đã được merge.
- #4024 của @anth-volk — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Read the annual economy route and its request validation, calculation options and cache key handling, then trace how it builds simulation API requests and handles upstream errors. Check the existing dataset and .py bundle configuration for the requested updates, including the Northern Ireland region mapping. Done means the supported UK requests produce separately cached local-area results and invalid combinations or upstream refusals return the specified errors; coordinate deployment with simulation API change #881 and the app change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What this is about
.py 6.10.0 runs UK national economy reports on a national dataset (microcosm_uk_2024_25) that has no area codes, so a national run no longer returns constituency or local-authority impacts. The simulation API (PolicyEngine/policyengine-sim-api#881) adds a separate run on the local-area dataset that returns only those impacts. The Public API needs a way to ask for that run.
What changes in the Public API
- The annual economy route,
GET /{country}/economy/{reform}/over/{baseline}, accepts a new optional query parameter,breakdown=local_areas. The budget-window route does not accept it. - The parameter is valid only for the UK, with
regionset toukor a UK country (country/*), and not withtarget=cliff. Any other combination, or any other value, returns HTTP 400. - When the parameter is set, it becomes part of the calculation options, so the request gets its own options hash and its own cached result. Requests without it keep their current options hash and cached results.
- The Public API sends
"breakdown": "local_areas"to the simulation API only when the parameter is set, and stores and returns the result the simulation API sends back (kind: "local_areas", withconstituency_impactandlocal_authority_impact). - If the simulation API refuses a breakdown request with HTTP 400 or 422 (for example, because the deployed .py release cannot run it), the Public API returns a 502 error that says so, instead of a generic 500.
- UK reports for Northern Ireland use
country/niin the Public API's metadata, but .py's region registry names that regioncountry/northern_ireland. The Public API translates the name when it builds the simulation request. - The .py bundle moves from 6.7.5 to 6.10.0 (this replaces #3991), and the reviewed UK default dataset becomes
microcosm_uk_2024_25.
Order of deployment
This change has to merge after the simulation API change (PolicyEngine/policyengine-sim-api#881) is deployed with .py 6.10.0, and after the app change that requests the breakdown is merged.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-api
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Remove the unauthenticated v2 household listCó thể đã có người làm @MaxGhenis đã nhận 1 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-api#4031 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Remove the v1 user routes and keep complete simulation and report results finalCó thể đã có người làm @MaxGhenis đã nhận 2 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
PolicyEngine/policyengine-api#4028 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public recordsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PolicyEngine/policyengine-api#4022 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
bug P2 rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jscott3201/rusty-bacnet#2085 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
evarness-ai/iris-harness#401 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
sistemicorp/scripts#62 ·
-
area/mac help wanted needs-qa
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100