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.
policyengine_uk/programs.yamlis the program registry served through/uk/metadataasmodelled_policies. Four entries name avariablethat does not exist inCountryTaxBenefitSystem().variables(checked onmainat bfc5fea):variablein programs.yamljsaJSAjsa(benunit, addsjsa_incomeandjsa_contrib)esaESAesa(benunit, addsesa_contribandesa_income)dlaDLAdla(person, addsdla_scanddla_m)winter_fuel_paymentwinter_fuel_paymentwinter_fuel_allowance(household); draft #2038 later adds a person-levelwinter_fuel_paymentEvery
parameter_prefixresolves withparameters.get_child. The uppercase prefixesgov.dwp.JSAandgov.dwp.ESAare correct, because those are the directory names. One prefix is wrong in a different way:maternity_allowancehasparameter_prefix: gov.dwp, the whole DWP tree, but the model has no Maternity Allowance parameters (maternity_allowanceaddsmaternity_allowance_reported).No test checks the registry against the model, so these names went stale without anything failing. Wanted:
variableis inCountryTaxBenefitSystem().variablesand everyparameter_prefixresolves.Other open PRs already fix related entries:
benefit_capin #2089,minimum_wage(gov.hmrc→gov.hmrc.minimum_wage) in #2053, and #2038 adds apawhpentry.