Remove the tracer patches in build-parameter-dependency-map.py once policyengine-core records scale and undated reads
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start in app/scripts/build-parameter-dependency-map.py, where patch_tracer patches get_traced_child and ParameterNode._get_at_instant, and where IGNORED_PARAMETER_PREFIXES is defined. The issue is blocked until a policyengine-core release contains PolicyEngine/policyengine-core#664, so first confirm that release exists, then check whether trace_microdata can replace the script's edge-building. Done when the patches and the prefix filter are removed and the script's output is unchanged.
Written by the indexing model from the issue text.
Description
PolicyEngine/policyengine-core#664 makes core's tracer record two kinds of read that app/scripts/build-parameter-dependency-map.py now adds by patching core:
- scale and bracket reads such as
p.base.calc(age), which theget_traced_childpatch inpatch_traceradds; - calls of a node below the root with a period, such as
parameters.gov.usda.snap.emergency_allotment(period), which theParameterNode._get_at_instantpatch adds.
With that core, each patch records those reads a second time. The script collects names into sets, so its output does not change, but both patches can be removed.
Two other changes in #664 affect the script:
- Core's own abolition check (
gov.abolitions.<variable>) is no longer recorded.IGNORED_PARAMETER_PREFIXESwould then only drop formula reads of abolition switches, which do change the reading variable, such as policyengine-us's SSI income helpers. It can be removed. - Core adds
policyengine_core.tools.dependency_map.trace_microdata(Microsimulation, households, year), which builds the samereadersandconsumersedge sets from a traced microdata subsample. The script could call it and keep its own output format.
Do this after the first policyengine-core release that contains #664.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 113
Getting set up
- No Dockerfile or Docker Compose file
- No 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-app-v2
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
PolicyEngine/policyengine-app-v2#1587 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PolicyEngine/policyengine-app-v2#1157 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PolicyEngine/policyengine-app-v2#954 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PolicyEngine/policyengine-app-v2#951 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine-app-v2#952 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/policyengine-app-v2
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
kunchenguid/firstmate#8796 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
swc-project/swc-next-issues#1043 ·
-
Inbox: numbered choices in a :::question become free text, and context bullets become the choicesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
backnotprop/plannotator#4132 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
When version > 2.4, Failed to Connect to the Backend Error: pkgJson.main?.endsWith is not a functionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
antfu/node-modules-inspector#219 ·