Read dynamics from API v1's dynamic_parameters and dynamic_parameter_values tables
維護者通常 1 天內回覆
已經有一個關聯 PR 被合併了。
- #1129 來自 @anth-volk —— 已合併
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 52/100
研究方向
Start by reading read_dynamic_reform in policy_reform.py, the model mappings for ParameterValue, and the service privilege list used by /ready. Check the existing tests and helpers that create parameter rows, then compare their table layout with API v1's C1 · 50 revision. Done means dynamic reads use the new tables, current-law rows are excluded, empty dynamics are refused, and the privilege and test helpers cover both tables.
由索引模型根據 Issue 內容生成。
描述
API v1's C1 · 50 moves dynamic parameters out of parameters into their own table, dynamic_parameters, and their current-law values and every dynamic's values out of parameter_values into dynamic_parameter_values (a nullable dynamic_id, where null means current law, and no policy_id). Its revision moves every stored row with its ID, and its grants give the simulation service's role SELECT on both tables. parameter_values.dynamic_id stays in API v1 until a later change drops it.
The simulation service still reads a dynamic's values from parameter_values rows that name it (read_dynamic_reform, policy_reform.py), and maps parameter_values.dynamic_id. Once C1 · 50's revision has run, it finds no values for any dynamic and refuses every one with 400 dynamic_without_values. Once API v1 drops parameter_values.dynamic_id, a sim release that still filters on it fails every dynamic read with a database error instead of that 400.
Wanted:
- sim maps
dynamic_parametersanddynamic_parameter_values, and reads a dynamic's values and names from them, checking the names against the running catalog version's dynamic parameters. Current-law rows are never read, and a dynamic with no values is still refused; ParameterValueno longer mapsdynamic_id, and policy reads are unchanged;- the service's privilege list, which
/readyand the deploy smoke check use, requiresSELECTon both tables; - the test helpers write each parameter and value in the table of its kind, as API v1 does;
public-api-commitmoves to C1 · 50's merge commit on API v1'smaster.
🤖 Generated with Claude Code
- 主要語言
- Python
- 星號
- 1
- 分支
- 1
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 63
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-sim-api 的其他 Issue
-
Rename Populace to Microcosm in docstrings and test names可能已有人在做 @MaxGhenis 於 11 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
PolicyEngine/policyengine-sim-api#1086 ·
維護者通常 1 天內回覆
-
Update policyengine to 6.20.2可能已有人在做 @policyengine 於 11 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 63/100
PolicyEngine/policyengine-sim-api#1083 ·
維護者通常 1 天內回覆
-
Update policyengine to 6.7.3可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 2/5 半天 新手友好度 70/100
PolicyEngine/policyengine-sim-api#823 ·
維護者通常 1 天內回覆
-
Integration tests fail due to missing UV virtual environment setup可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 65/100
PolicyEngine/policyengine-sim-api#314 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
PolicyEngine/policyengine-sim-api#1146 ·
維護者通常 1 天內回覆
查看 PolicyEngine/policyengine-sim-api 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
documentation good first issue help wanted
難度 1/5 1 小時以內 新手友好度 90/100
-
documentation good first issue help wanted
難度 1/5 1 小時以內 新手友好度 88/100
-
documentation good first issue help wanted
難度 2/5 1-3 小時 新手友好度 78/100
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 82/100