Consolidate UC work allowance parameters into a single file (#289)#1651
Merged
Conversation
Merge `work_allowance/with_housing.yaml` and `work_allowance/without_housing.yaml` into a single `work_allowance.yaml` with shared metadata (period, unit, uprating, reference) propagated to children via `propagate_metadata_to_children`. The parameter path `gov.dwp.universal_credit.means_test.work_allowance.with_housing` (and `...without_housing`) is unchanged — OpenFisca treats a file's dict keys and subdirectory files equivalently. All 5 work_allowance and uc_earned_income baseline tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis
approved these changes
May 1, 2026
Collaborator
MaxGhenis
left a comment
There was a problem hiding this comment.
Reviewed: this preserves the same UC work allowance parameter paths while consolidating the YAML node and shared metadata. CI is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merges
parameters/gov/dwp/universal_credit/means_test/work_allowance/with_housing.yamland.../without_housing.yamlinto a singlework_allowance.yaml, with the shared metadata (period: month,unit: currency-GBP,uprating: gov.benefit_uprating_cpi, and the SI 2013/376 reg. 22 reference) lifted to the parent node and propagated to children viapropagate_metadata_to_children: true.Per #289, this is "effectively a groupby by whether UC includes housing" and makes related values visible in one place.
The parameter paths
gov.dwp.universal_credit.means_test.work_allowance.with_housingand...without_housingare unchanged — OpenFisca resolves a subdirectory's files and a file's nested dict keys identically, so anything reading these paths (variables, reforms, tests) keeps working.Closes #289.
Test plan
CountryTaxBenefitSystem().parameters.gov.dwp.universal_credit.means_test.work_allowance.{with,without}_housing(...)returns the same values as before (spot-checked 2019-05-01 and 2025-01-01).work_allowance/is_uc_work_allowance_eligible.yaml,work_allowance/uc_work_allowance.yaml,income/uc_earned_income.yaml.🤖 Generated with Claude Code