Skip to content

Remove mixed computation metadata from variables#1677

Merged
MaxGhenis merged 1 commit into
mainfrom
remove-uprating-from-formula-variables
May 17, 2026
Merged

Remove mixed computation metadata from variables#1677
MaxGhenis merged 1 commit into
mainfrom
remove-uprating-from-formula-variables

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

@MaxGhenis MaxGhenis commented May 17, 2026

Summary

  • remove redundant uprating metadata from variables already computed by adds
  • move aggregation lists used by formulas to module constants so variables no longer declare both formula and adds/subtracts
  • keep a changelog fragment so this cleanup releases before PolicyEngine Core enforces mutually exclusive computation modes

Verification

  • AST scan for variables mixing formula, adds/subtracts, and uprating: conflicts=0
  • uv run --no-sync ruff check on touched variable files
  • uv run --no-sync ruff format --check on touched variable files
  • uv run --no-sync python -c "from policyengine_uk import CountryTaxBenefitSystem; CountryTaxBenefitSystem(); print('uk import OK')"
  • PYTHONPATH=/Users/maxghenis/policyengine-core uv run --no-sync python -c "from policyengine_uk import CountryTaxBenefitSystem; CountryTaxBenefitSystem(); print('uk import OK with local core')"
  • uv run --with towncrier towncrier build --draft --version 2.88.18

Companion cleanup for US: PolicyEngine/policyengine-us#8330. Core guard PR to follow after UK and US releases are live.

@MaxGhenis MaxGhenis force-pushed the remove-uprating-from-formula-variables branch from 49e9c2a to b2c399d Compare May 17, 2026 14:01
@MaxGhenis MaxGhenis changed the title Remove uprating metadata from formula variables Remove mixed computation metadata from variables May 17, 2026
@MaxGhenis MaxGhenis merged commit 495b88d into main May 17, 2026
9 checks passed
@MaxGhenis MaxGhenis deleted the remove-uprating-from-formula-variables branch May 17, 2026 14:17
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