programs.yaml names variables that do not exist (JSA, ESA, DLA, winter_fuel_payment)

クローズ 初心者向け
#2,116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@juaristi22 がすでに取り組んでいます。

2026年10月16日 から。

  • #2443 @juaristi22 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

policyengine_uk/programs.yaml から始めて、CountryTaxBenefitSystem().variables と parameters.get_child を調べます。pytest スイートを実行してレジストリチェックを理解します。要求された整合性テストを追加し、古いエントリを更新します。すべての変数が存在し、すべてのパラメータプレフィックスが解決されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

policyengine_uk/programs.yaml is the program registry served through /uk/metadata as modelled_policies. Four entries name a variable that does not exist in CountryTaxBenefitSystem().variables (checked on main at bfc5fea16):

id variable in programs.yaml variable in the model
jsa JSA jsa (benunit, adds jsa_income and jsa_contrib)
esa ESA esa (benunit, adds esa_contrib and esa_income)
dla DLA dla (person, adds dla_sc and dla_m)
winter_fuel_payment winter_fuel_payment winter_fuel_allowance (household); draft #2038 later adds a person-level winter_fuel_payment

Every parameter_prefix resolves with parameters.get_child. The uppercase prefixes gov.dwp.JSA and gov.dwp.ESA are correct, because those are the directory names. One prefix is wrong in a different way: maternity_allowance has parameter_prefix: gov.dwp, the whole DWP tree, but the model has no Maternity Allowance parameters (maternity_allowance adds maternity_allowance_reported).

No test checks the registry against the model, so these names went stale without anything failing. Wanted:

  • fix the four variables and drop the Maternity Allowance prefix;
  • add a pytest asserting that every variable is in CountryTaxBenefitSystem().variables and every parameter_prefix resolves.

Other open PRs already fix related entries: benefit_cap in #2089, minimum_wage (gov.hmrc → gov.hmrc.minimum_wage) in #2053, and #2038 adds a pawhp entry.

主要言語
Python
スター
53
フォーク
34
平均マージ
3日 10時間
マージ済み PR(30日)
321

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine-uk のほかの issue

PolicyEngine/policyengine-uk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。