Record each run of a v2 simulation and report, and key results by run
維護者通常 2 天內回覆
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 12/100
研究方向
The v2 simulation tables live in the Supabase database, so start with the schema migrations that create simulations, reports, report_runs and household_jobs, and the result tables they feed. The issue asks for a new simulation_runs table, a join record between report runs and simulation runs, and role grants for two new database roles, so the migration needs to apply cleanly before the roles exist. Done means the migration applies on a fresh database, existing rows are kept, and no foreign keys cross from the simulation API tables to the Public API tables.
由索引模型根據 Issue 內容生成。
描述
API v2's simulation tables in the v2 Supabase database (simulations, reports, report_runs, household_jobs and the result tables) were designed for an execution model where each simulation ran once. We now want every run of a simulation or a report saved, with the PolicyEngine.py and country package versions it used, so a re-run keeps the earlier results, and the simulation API and its Modal workers will write these rows themselves.
What needs to change in the v2 schema:
- a
simulation_runstable: one row per run of a simulation, with its versions, status, Modal call and output file, instead of execution columns onsimulations; - a record of which simulation runs each report run combines, so a budget window's run can combine one pair per year;
- result rows keyed by the run that produced them;
household_jobsshaped for one household, one year and one policy, with its versions and Modal call;- no foreign keys between the tables the simulation API writes and the tables the Public API writes: each service checks the rows it refers to;
- table privileges for two new database roles, one for the simulation API and one for its Modal workers, declared so the deploy can apply them once an operator has created the roles, without failing before then.
No table is dropped.
- 主要語言
- 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
-
難度 2/5 1-3 小時 新手友好度 72/100
huggingface/deep-rl-class#723 ·
-
[tool] bug: Qwen3 XML tool parser raises on `...` argument values (Ellipsis is not JSON serializable)可能已有人在做 @super-yuki 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 87/100
verl-project/verl#8559 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
TencentCloud/octop-harness#228 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
google/osv-scalibr#2585 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
NousResearch/hermes-agent#149323 ·
維護者通常 1 天內回覆