Move the simulation executor to policyengine.py 6.14.0 and keep accepting US 2022 and 2023
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Read _load_dataset in projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py and the dependency lists in projects/policyengine-simulation-executor/pyproject.toml; inspect the existing unit tests and the precompute calls. Update the dependency and lockfile, add the temporary opt-out and a test for US 2022 or 2023, then confirm precompute calls are unchanged.
索引モデルが issue の本文から書いたものです。
説明
Problem
Since policyengine.py 6.13.0 (PolicyEngine/policyengine.py#730), create_datasets and ensure_datasets raise UnsupportedDatasetYearError when a requested year is outside the years the installed country model supports the source dataset for. For the US, that refuses 2022 and 2023, which come before the 2024 data year of the certified dataset. Passing allow_unsupported_years=True skips the check. Year files that already exist are loaded without it, so the check applies whenever a year file has to be created.
The executor loads the dataset year for every simulation job through country_module.ensure_datasets(...) in _load_dataset (projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py). That covers the main simulation runtime and the Stage 12 society-wide worker. The Public API and the app still offer US 2022 and 2023 for society-wide runs. If the executor moved to policyengine.py 6.13.0 or later without a change, those runs would fail partway through with an error the caller is not told the reason for.
The executor pins policyengine[models]==6.12.0, whose ensure_datasets has no allow_unsupported_years argument, so the opt-out and the version change have to ship in the same pull request. The automated update pull requests (#1011 for 6.14.0, #1002 for 6.13.0 and #990 for 6.12.1) change only the version.
Plan
- Move the executor to policyengine.py 6.14.0, and pass
allow_unsupported_years=Truefrom_load_dataset, so the simulation service keeps accepting every year the Public API offers. The precompute steps that build dataset year files keep the check; they build 2025, 2026 and 2027, which are supported. - The Public API stops offering US 2022 and 2023 for society-wide runs and refuses them with a 400.
- This repository then removes the opt-out, so the executor refuses unsupported years as well.
This issue covers step 1. Until step 3, policyengine.py updates are not held back by the year check.
Acceptance criteria
projects/policyengine-simulation-executor/pyproject.tomlrequirespolicyengine[models]==6.14.0in both of its dependency lists, anduv.lockis regenerated._load_datasetpassesallow_unsupported_years=Truetoensure_datasets, with a comment saying the opt-out is temporary and when it is removed.- The precompute calls to
ensure_datasetsare unchanged. - A unit test with a fake country module shows that a request for US 2022 or 2023 loads its dataset.
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 2日 48分
- マージ済み PR(30日)
- 87
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-sim-api のほかの issue
-
Update policyengine to 6.7.3再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 半日 初心者へのやさしさ 70/100
PolicyEngine/policyengine-sim-api#823 ·
メンテナーはふだん 2 日以内に返信
-
Integration tests fail due to missing UV virtual environment setup対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
PolicyEngine/policyengine-sim-api#314 ·
メンテナーはふだん 2 日以内に返信
-
Update policyengine to 6.15.0対応中かも @policyengine が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 1/100
PolicyEngine/policyengine-sim-api#1014 ·
メンテナーはふだん 2 日以内に返信
-
Update policyengine to 6.14.0対応中かも @policyengine が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
PolicyEngine/policyengine-sim-api#1010 ·
メンテナーはふだん 2 日以内に返信
-
Move the deploy workflow's routing and sentinel steps into tested scripts対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
PolicyEngine/policyengine-sim-api#1003 ·
メンテナーはふだん 2 日以内に返信
PolicyEngine/policyengine-sim-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
didi/helixharness#18 ·
-
request-theme
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
LizardByte/ThemerrDB#9883 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NousResearch/hermes-agent#149885 ·
メンテナーはふだん 1 日以内に返信
-
Set cache_ok = True on GUID TypeDecorator to enable SQLAlchemy query caching対応中かも @patelshivani2283-lab が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
fedora-infra/anitya#2157 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Project-MONAI/MONAI#9258 ·
メンテナーはふだん 3 日以内に返信