You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
programs.yaml names variables that do not exist (JSA, ESA, DLA, winter_fuel_payment) #2116
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 bfc5fea):
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.
Activity