calculate_household raises SPMInputError for households without county_fips
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start at the pe.us.calculate_household entry point and read policyengine_us/spm.py, especially require_county_input and the default SPM selection. Reproduce the state-only example, then verify county and explicit national selections against the stated behavior, including the skill-examples failures. Done means state-only households return results without weakening explicit-selection or population-data validation.
索引モデルが issue の本文から書いたものです。
説明
pe.us.calculate_household fails for every household that gives a state but no county. With policyengine 6.2.0 (policyengine-us 2.2.1, spm-calculator 1.0.0):
import policyengine as pe
pe.us.calculate_household(
people=[{"age": 40, "employment_income": 50_000}, {"age": 8}],
tax_unit={"filing_status": "HEAD_OF_HOUSEHOLD"},
household={"state_code": "CA"},
year=2026,
)
raises SPMInputError: County selection has no county FIPS input ('') from policyengine_us/spm.py require_county_input. The default output columns include spm_unit_is_in_spm_poverty, and the bundle's default SPM selection is county measurement, so the whole call fails even when the caller wants only taxes and benefits. Adding county_fips or spm={"geography_kind": "national"} works around it.
Impact: every state-only household call since 6.0.0, including the examples in the PolicyEngine skills (PolicyEngine/policyengine-skills skill-examples fails on 8 examples, e.g. run 36653351748).
Expected: a state-only household returns a result. A state alone does not identify a Census SPM estimation area, so it should be measured nationally, and the result should say that national measurement replaced the default county selection. A household with county_fips keeps its county's area. Explicit selections keep failing closed, and population data keeps requiring observed counties.
- 主要言語
- Python
- スター
- 8
- フォーク
- 9
- 平均マージ
- 15時間 28分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine.py のほかの issue
-
Raise the simulation cache memory warning to 16 GiB対応中かも @anth-volk が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PolicyEngine/policyengine.py#549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PolicyEngine/policyengine.py#473 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
PolicyEngine/policyengine.py#436 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Certify populace-uk as the UK certified default再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PolicyEngine/policyengine.py#408 ·
メンテナーはふだん 1 日以内に返信
-
Resolve US state and congressional-district regions to the ACS local-area dataset対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
PolicyEngine/policyengine.py#551 ·
メンテナーはふだん 1 日以内に返信
PolicyEngine/policyengine.py の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Juniper/ansible-junos-stdlib#904 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pollen-robotics/reachy_mini#1457 ·
メンテナーはふだん 1 日以内に返信
-
area:runtime good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WATonomous/wato_f1tenth#39 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
FireDynamics/fdsreader#123 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100