Stop income imputation scaling housing costs#375
Conversation
|
Hi @MaxGhenis — this looks like a duplicate of #372 (opened 2026-04-20), which fixes the same rent/mortgage rescaling in policyengine_uk_data/datasets/imputations/income.py. The branch prefix here (codex/) suggests Codex didn't have visibility into the open-PR list — was that the case? If you're happy to consolidate, I'd suggest closing this in favour of #372 — that PR is tied to the root-cause issue #367 (with the full element-by-element audit), and its regression test injects a ×100 dividend multiplier so the original 2.5× bug couldn't slip back in. I can pull your changelog.d/375.md and the additional behaviour test from here into #372 so nothing's lost. |
|
Closing as obsolete: #372 has already landed the income-imputation housing-cost rescaling fix, and this branch is now conflicting/duplicative. |
Summary
Rationale
Housing costs should come from the housing data path, calibration, and uprating logic. SPI income imputation changes person income components; it should not mechanically multiply household rent or mortgage costs as a side effect.
Tests
uv run pytest policyengine_uk_data/tests/test_income_imputation_housing_costs.py policyengine_uk_data/tests/test_frs_only_imputation.py policyengine_uk_data/tests/test_housing_targets.py -quv run ruff check policyengine_uk_data/datasets/imputations/income.py policyengine_uk_data/tests/test_income_imputation_housing_costs.py