Skip to content

Source local LA uprating factors from policyengine-uk#330

Merged
MaxGhenis merged 2 commits intomainfrom
codex/local-la-uprating-from-uk
Apr 12, 2026
Merged

Source local LA uprating factors from policyengine-uk#330
MaxGhenis merged 2 commits intomainfrom
codex/local-la-uprating-from-uk

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • read the LA ONS income uprating assumptions from policyengine-uk when that parameter subtree is available
  • replace the direct use of raw module constants in the LA loss builder with a helper call
  • keep a compatibility fallback for the current released policyengine-uk dependency so this PR can merge before the next policyengine-uk release
  • add focused tests for the parameter-backed path, fallback path, and missing-year failure

Testing

  • uv run pytest -q policyengine_uk_data/tests/test_local_la_extras.py
  • uv run python - <<"PY"
    from policyengine_uk_data.datasets.local_areas.local_authorities.loss import create_local_authority_target_matrix
    print(create_local_authority_target_matrix.name)
    PY
  • uvx ruff check policyengine_uk_data/targets/sources/local_la_extras.py policyengine_uk_data/datasets/local_areas/local_authorities/loss.py policyengine_uk_data/tests/test_local_la_extras.py

@MaxGhenis MaxGhenis merged commit 392180e into main Apr 12, 2026
3 checks passed
@MaxGhenis MaxGhenis deleted the codex/local-la-uprating-from-uk branch April 12, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant