Document UK breakdown results' withheld area codes, and stop serving breakdowns cached without them
維護者通常 2 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 43/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- openapi, python
- 領域
- api, backend, documentation
研究方向
Read the completed breakdown result description around line 887 in openapi_spec.yaml and inspect _breakdown_result_kind_error in services/economy_impact_execution.py. Find the options hash and its schema version handling, then check the contract tests for breakdown results. Done means the OpenAPI description documents withheld codes and older breakdown cache entries are bypassed while national result cache entries remain unaffected.
由索引模型根據 Issue 內容生成。
描述
Problem
The simulation API will return, for each level of a UK local-area breakdown, the ONS codes of the areas disclosure control withheld (https://github.com/PolicyEngine/policyengine-sim-api/issues/968). The Public API already stores and returns a breakdown result unchanged once its kind is local_areas (_breakdown_result_kind_error in services/economy_impact_execution.py), so the new fields will pass through. Two things still need doing.
- Documentation. The OpenAPI description of the annual economy route's completed breakdown result (
openapi_spec.yaml, about line 887) listskind, the two area lists and the dataset and version fields. It should also describe the withheld codes, and that they are absent from results computed before the simulation API reported them. - Cached results. Breakdown results cached before the change stay cached for up to 30 days without the new fields. A simulation API deploy that keeps the same .py version doesn't change the cache key, so clients would get the list for existing reports only once those entries expire. Bumping
RUNTIME_CACHE_SCHEMA_VERSIONS["economy_impact"]would recompute every cached economy result, not just breakdowns. Instead, give breakdown requests their own schema version in the options hash, so that only breakdown results computed before the change are recomputed on the next request.
Done when
- The OpenAPI description covers the withheld codes.
- A contract test shows a breakdown result with the withheld codes is stored and returned unchanged.
- Breakdown results cached before the change are not served, and national results' cache entries are unaffected.
Notes
- Order: merge after the simulation API change is deployed.
- Related: the app will hatch only the listed codes as "Not reported" and show any other absent area as "No data" (PolicyEngine/policyengine-app-v2#1448 review).
- 主要語言
- Python
- 星號
- 18
- 分支
- 33
- 平均合併
- 2 天 7 小時
- 30 天內合併 PR
- 64
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
維護者通常 2 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
維護者通常 2 天內回覆
-
Split the release tests over six runners, and stop repeating the merge run's checks on the release commit可能已有人在做 @anth-volk 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4133 ·
維護者通常 2 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
PolicyEngine/policyengine-api#4131 ·
維護者通常 2 天內回覆
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
Support .aac audio uploads可能已有人在做 @julien731 今天認領。 未關閉feature
難度 2/5 1-3 小時 新手友好度 78/100
nimblehq/audio-transcriber#153 ·
-
help wanted
難度 2/5 1-3 小時 新手友好度 68/100
antonyrag/ragleap-core#1062 ·
-
needs-triage
難度 2/5 1-3 小時 新手友好度 76/100
gke-labs/kube-agents#4321 ·
維護者通常 1 天內回覆
-
enhancement help wanted
難度 2/5 1-3 小時 新手友好度 76/100
Git-Hospital/githealthcheck#61 ·
維護者通常 1 天內回覆
-
changelog investigate
難度 2/5 1-3 小時 新手友好度 67/100
ramnes/notion-sdk-py#433 ·