Include each variable's quantity type (stock or flow) in the country metadata
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 30/100
調査の方向性
Start with PolicyEngineCountry.build_variables in policyengine_api/country.py and check how each variable exposes its quantity type. Add the requested quantityType field with the stock or flow value, then verify the shared metadata document includes it for variables such as household_rental_property_value. A linked pull request is already open, so this work is underway.
索引モデルが issue の本文から書いたものです。
説明
What
Add each variable's quantity type to the variable descriptions that GET /{country_id}/metadata returns, as quantityType, with the value "stock" or "flow".
"household_rental_property_value": {
"definitionPeriod": "year",
"quantityType": "stock",
"unit": "currency-USD",
...
}
Why
PolicyEngine core gives every variable a quantity_type:
"stock": a balance or value at one point in time, such ashousehold_vehicles_valueorhousehold_rental_property_valuein the US model, ormortgage_debtin the UK model;"flow": an amount over a period, such asemployment_incomeorrent.
A model sets it explicitly, or core picks a default: "stock" for yes-or-no, whole-number, list, text and date variables and for rates (unit /1), and "flow" for every other number.
The Public API's metadata leaves it out, so clients can't tell a balance from an amount per year. PolicyEngine/policyengine-app-v2#1360 shows "Annually" under each money input in the household builder, and leaves it off for stocks, but it can only do that once the metadata says which variables are stocks. Until then, money stocks such as "Rental property value" are labelled "Annually".
Scope
- One new field per variable in
PolicyEngineCountry.build_variables(policyengine_api/country.py). Both the Flask route and the native FastAPI route serve this same document, so both get the field. - Existing fields are unchanged. The field adds one short string per variable to a document that is already about 70MB for the US.
- No database, route, or deployment change.
- 主要言語
- Python
- スター
- 18
- フォーク
- 33
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 35
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-api のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
PolicyEngine/policyengine-api#3911 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PolicyEngine/policyengine-api#3910 ·
メンテナーはふだん 3 日以内に返信
-
Let a saved reform or household point at a new v2 policy or household without changing its ID対応中かも @anth-volk が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
PolicyEngine/policyengine-api#4004 ·
メンテナーはふだん 3 日以内に返信
-
Releases do not check that each environment calls its own simulation service対応中かも @anth-volk が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
PolicyEngine/policyengine-api#4002 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
PolicyEngine/policyengine-api#4000 ·
メンテナーはふだん 3 日以内に返信
PolicyEngine/policyengine-api の issue をすべて見る
似ている issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yunaremaia/proto-drift#22 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yunaremaia/memwatch#96 ·
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
yunaremaia/ci-gate-watch#34 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
yunaremaia/agent-capability-attestation#64 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
yunaremaia/agent-call-graph#43 ·
メンテナーはふだん 1 日以内に返信