Serve household reports at /v2/reports
维护者通常 2 天内回复
评估
调研方向
Start by tracing the existing economy report routes and simulation service flow for POST /v2/reports, report reads, reruns, and saved reports. Then follow the household and policy validation paths described in the issue, including country checks and default-year handling. Done means household reports can be created, read, rerun, and saved by ID, including for household-only countries, while the specified invalid requests are rejected.
由索引模型根据 Issue 内容生成。
描述
What
Add the household kind of /v2/reports. A household report calculates a household stored through /v2/households under a baseline policy and an optional reform policy, each a stored /v2/policies policy or current law, for the household's default year. The simulation service calculates and stores it, as it does economy reports.
POST /v2/reportsacceptskind: "household"with the household and the policies.GET /v2/reports/{report_id}andGET /v2/reports?report_id=…read household reports beside economy reports.POST /v2/reports/{report_id}/runsruns a household report again, withforceto recalculate.- Saved reports (
/v2/user-reports) accept household report IDs.
It works for any country whose countries row has household_enabled, including a household-only country, where economy reports are refused with 422.
Why
The newer app interface needs persisted, shareable household reports with their own IDs once it moves to the v2 routes, and the economy kind of /v2/reports cannot hold a household. Before asking the simulation service, the Public API checks what it decides itself: that the country has household calculations, that the household and policies are the country's, and that the household has a default year. The simulation service reads the household and policies from the Public API's tables itself, so the Public API sends only their IDs.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 93
环境准备
- 没有 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 天内回复
-
Assign every v2 route and service file to a layer and enforce the doc-only v2 layer rules可能已有人在做 @anth-volk 今天认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 20/100
PolicyEngine/policyengine-api#4190 ·
维护者通常 2 天内回复
-
Check that every test function asserts something可能已有人在做 @anth-volk 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4187 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 2 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
Official-Space-AI/OpenPhysGraspGen#114 ·
维护者通常 2 天内回复
-
changelog investigate
难度 2/5 1-3 小时 新手友好度 62/100
ramnes/notion-sdk-py#441 ·
-
qa_bug
难度 2/5 1-3 小时 新手友好度 78/100
NVIDIA-NeMo/Gym#5644 ·
维护者通常 2 天内回复
-
BUG: catalog database credentials printed to logs at startup可能已有人在做 @cjboyle 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复