Skip to content

Clean up reform validation cache and add regression tests#651

Open
MaxGhenis wants to merge 2 commits intomainfrom
codex/pr639-cleanup
Open

Clean up reform validation cache and add regression tests#651
MaxGhenis wants to merge 2 commits intomainfrom
codex/pr639-cleanup

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Follow-up to merged PR #639.

This cleanup PR addresses a few non-blocking review items from the JCT/SOI target fix:

  • make the validation helper cache the final reform income_tax delta, rather than briefly caching raw reform values and then overwriting them in the caller
  • add a unit test covering the reform-delta cache contract in validate_staging.py
  • add an ETL regression test covering stale baseline-row deactivation and rerun behavior for national tax expenditure targets

Why

PR #639 fixed the economics and the calibration path. This PR just tightens the maintenance story around that fix and adds regression coverage for two of the follow-up risks reviewers flagged.

Validation

  • python3 -m py_compile policyengine_us_data/calibration/validate_staging.py policyengine_us_data/tests/test_calibration/test_validate_staging.py policyengine_us_data/tests/test_etl_national_targets.py
  • ruff format on the touched files

Environment limitation

I did not run the full pytest path locally in this workspace because the available local environments are still broken on torch / missing sqlmodel.

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