Register weighted-microdata rules: weights aren't values
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 18/100
Hướng nghiên cứu
The work is registering four rules in rules/registry.toml plus AST guards for the shapes they describe. Read the issue's list of rule IDs and the cited Simulation API line first, then check whether linked pull request #3938 already covers them, since it is still open. Done means the three guarded rules are enforced with no findings on the current code, and the doc-only rule is registered.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A weighted MicroSeries or MicroDataFrame weights every .sum(), .mean() and .count(). Aggregating a weight column through one weights it by itself, and returns the sum of squared weights.
That happened in the Simulation API (PolicyEngine/policyengine-sim-api#766, fixed by PolicyEngine/policyengine-sim-api#767). budget.households was about 10^4 times too high on every run, and its test missed it because it used plain pd.DataFrames.
Once the unused economy comparison module is removed, nothing in the Public API handles microdata. Nothing stops new code from making the same mistake, though.
Proposal
Phase 1 step 1.9. Register the rule that weights aren't values, plus AST guards for the shapes a source check can recognise, in rules/registry.toml:
api.microdata.weights-not-values(doc-only): weights, values, labels and counts each allow different operations.api.microdata.weights-not-aggregated-as-values: a weight is never the value of a weightedMicroSeries, the variable of a weighted aggregator, orframe[<weight>]followed by a weighted reduction.api.microdata.weight-stripping-confined: raw values (np.array,.values,.to_numpy()and so on) are read from weighted microdata only in a designated module. None is designated yet.api.microdata.unweighted-series-are-labels: aMicroSeriesbuilt withoutweights=is only a grouping or filter key.
The aggregation rule's proof is the real pre-#767 Simulation API line. With no current code in scope, all three guarded rules start enforced, with no findings.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-api
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
PolicyEngine/policyengine-api#3946 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
PolicyEngine/policyengine-api#3945 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Remove the unused economy comparison moduleCó thể đã có người làm @anth-volk đã nhận 2 ngày trước. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 18/100
PolicyEngine/policyengine-api#3935 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PolicyEngine/policyengine-us#10262 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
kellyjonbrazil/jc#788 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`/search.json` ignores the documented `editions.sort` parameterCó thể đã có người làm @PranavD2905 đã nhận hôm nay. Đang mởAffects: Server Good First Issue Module: Solr Needs: Triage Theme: Public APIs Theme: Search
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
internetarchive/openlibrary#13989 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2: misleading query
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jeffknupp/association#478 ·