Design note: a weighted module inside policyengine.py, replacing the microdf dependency
@MaxGhenis is already working on this.
Since Sep 22, 2026.
Assessment
This issue has not been assessed yet.
Description
Tracking issue for docs/weighted-module-design.md, the decision record for replacing policyengine.py's microdf dependency with an internal policyengine.weighted module: pure numpy estimator kernels (shared with microcosm.frame.accounting), weights as an ordinary <entity>_weight column, and a closed df.weighted(...) accessor that exposes only weighted operations.
Context: the September 2026 review of microdf (PolicyEngine/microdf#315, #333) found that a pandas subclass cannot fail closed, and PolicyEngine/policyengine.py#527 found outputs/inequality.py reimplementing Gini and top shares with a different tie rule from microdf. microcosm-frame already declares itself microdf's successor.
The note fixes the three-layer design, pins every estimator definition against a named reference, and stages the migration: Stage 1 (module lands, inequality.py, decile_grouping.py and labor_supply_response.py move onto it), Stage 2 (MicroDataFrame leaves the public data model; major version), Stage 3 (engine return types; a separate decision).
- Dominant language
- Python
- Stars
- 7
- Forks
- 9
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 11
Contributor 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.py
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#473 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PolicyEngine/policyengine.py#436 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#408 ·
-
PolicyEngine/policyengine.py#527 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PolicyEngine/policyengine.py#523 ·
All issues in PolicyEngine/policyengine.py
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·