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 天 13 小时
- 30 天内合并 PR
- 56
环境准备
- 没有 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 天内回复
-
Serve economy reports on the v2 routes and save v2 report and simulation IDs可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 35/100
PolicyEngine/policyengine-api#4107 ·
维护者通常 2 天内回复
-
Drop the unused x and y columns from API v2's UK area impact tables可能已有人在做 @anth-volk 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
PolicyEngine/policyengine-api#4102 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/agent-lightning#661 ·
维护者通常 2 天内回复
-
area/profiles comp/cli P3 type/feature
难度 2/5 1-3 小时 新手友好度 74/100
NousResearch/hermes-agent#146372 ·
维护者通常 1 天内回复
-
[BUG] OpenAI-compatible embedding model alias breaks embedder construction可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies可能已有人在做 @github-actions 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
GeoSeries scale and skew tests fail with pytest 9.2.0可能已有人在做 @jiayuasu 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复