Add CTC calibration follow-up targets and validation#721
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
baogorek
approved these changes
Apr 10, 2026
Collaborator
baogorek
left a comment
There was a problem hiding this comment.
Looks good to me. The new national AGI-split refundable/nonrefundable CTC targets, diagnostics, and validation coverage all line up, and the focused test coverage here is solid.
One thing to keep in mind when merging or rebasing: PR #708 is currently checked out on my side and it changes the CPS identification inputs / TIN handling. This PR does not directly modify that logic, but those identification changes can still affect the composition of CTC results, so it is worth re-checking the new CTC diagnostics after #708 lands or if this branch is rebased onto it.
20356f6 to
4a24b48
Compare
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
validate_national_h5and cover the new paths with unit testsIssue linkage
Notes
This lands the admin-backed part of #717: national AGI-band CTC targets plus AGI-by-filing-status diagnostics. I am not claiming true admin-backed filing-status-split refundable/nonrefundable CTC targets here, because the IRS geography and workbook sources currently ingested in this repo do not expose those component splits directly.
Supersedes #720, which was blocked by the repo's
check-forkpolicy.Validation
uv run pytest tests/unit/calibration/test_ctc_diagnostics.py tests/unit/calibration/test_validate_national_h5.py tests/unit/calibration/test_target_config.py tests/unit/test_etl_irs_soi_overlay.pyuv run pytest tests/unit/test_schema_views_and_lookups.py tests/unit/calibration/test_unified_matrix_builder.pyuv run ruff check changelog.d/719.added.md policyengine_us_data/calibration/ctc_diagnostics.py policyengine_us_data/calibration/validate_national_h5.py policyengine_us_data/db/etl_irs_soi.py tests/unit/calibration/test_ctc_diagnostics.py tests/unit/calibration/test_validate_national_h5.py tests/unit/calibration/test_target_config.py tests/unit/test_etl_irs_soi_overlay.pyuv run towncrier check --compare-with origin/main