Read dynamics from API v1's dynamic_parameters and dynamic_parameter_values tables
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policyengine-sim-api
-
Rename Populace to Microcosm in docstrings and test namesPossibly taken @MaxGhenis claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PolicyEngine/policyengine-sim-api#1086 ·
Maintainers usually reply within 1 day
-
Update policyengine to 6.20.2Possibly taken @policyengine claimed this 10 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 63/100
PolicyEngine/policyengine-sim-api#1083 ·
Maintainers usually reply within 1 day
-
Update policyengine to 6.7.3May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 Half a day Newbie friendliness 70/100
PolicyEngine/policyengine-sim-api#823 ·
Maintainers usually reply within 1 day
-
Integration tests fail due to missing UV virtual environment setupPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
PolicyEngine/policyengine-sim-api#314 ·
Maintainers usually reply within 1 day
-
Run one warm-up calculation in the simulation workers' snapshot hookPossibly taken @anth-volk claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
PolicyEngine/policyengine-sim-api#1133 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/policyengine-sim-api
Similar issues
-
claude-subscription-directsdk: tool calls with raw control characters in string values are droppedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-official-plugins#538 ·
Maintainers usually reply within 3 days
-
bug(qdiffusion): EnergyModel.score_visible_logits computes biased visible/hidden on-ratios when solver returns variable solution counts per candidatePossibly taken @houzhongyu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
qboson/kaiwu-pytorch-plugin#2133 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MakazhanAlpamys/Soup#3415 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days