Skip to content

Publish the AOTC scale instead of the IRS PTC folder in the installed-folders test - #4406

Open
DTrim99 wants to merge 1 commit into
masterfrom
installed-folders-drop-irs-ptc
Open

DTrim99 wants to merge 1 commit into
masterfrom
installed-folders-drop-irs-ptc

Conversation

@DTrim99

@DTrim99 DTrim99 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Fixes #4405

Summary

  • Companion to Remove orphaned IRS premium tax credit parameter files policyengine-us#11756, which deletes the orphaned gov.irs.credits.premium_tax_credit parameters (nothing in policyengine-us reads them).
  • tests/integration/test_v2_catalog_installed_folders.py published gov.irs.credits.premium_tax_credit.phase_out as its US bracket scale. Once a bundle update brings in a policyengine-us release without that folder, selected_model raises LookupError and the installed-folders tests fail.
  • This PR swaps it for gov.irs.credits.education.american_opportunity_credit.amount, a three-bracket scale (amount[0].rate, amount[1].threshold, ...) that is the same in policyengine-us 2.2.2, the version pinned here, and on current main. It has held the same values since 2009.
  • The PTC folder was also the only US bracket scale with null values; no other US bracket scale holds one. The "a null" shape stays covered by gov.dwp.state_pension.triple_lock (outturn is null from 2012), and tests/fixtures/v2_catalog_value_shapes.py still covers null values and bracket scales on its own. Its reason now says so.
  • tests/unit/v2/test_parameter_search_file.py uses the PTC name only in a synthetic record, so it stays as it is.
  • Merge this before the bundle update that brings in policyengine-us#11756. It passes with the current bundle as well.

Testing

  • uv run --frozen --extra dev pytest tests/integration/test_v2_catalog_installed_folders.py -k "not publish_and_come_back": 3 passed, run against the installed policyengine 6.20.5 (policyengine-us 2.2.2, policyengine-uk 2.179.2). This covers the shape coverage test with the new selection. The publication test needs the disposable v2 database, so CI's v2-integration-check runs it.
  • make quality passed through the pre-commit hook (shellcheck isn't installed locally, so that check was skipped).
  • check_changelog_fragment.sh against origin/master: one fragment, changelog.d/4405.changed.md.

🤖 Generated with Claude Code

…-folders test

policyengine-us is deleting gov.irs.credits.premium_tax_credit, a leftover
of IRS premium tax credit variables it removed earlier. Once a bundle update
brings that in, selected_model raises LookupError for the missing folder.
Use gov.irs.credits.education.american_opportunity_credit.amount as the US
bracket scale instead; the UK triple lock folder still holds a null value.

Fixes #4405

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.94%. Comparing base (0a30630) to head (580c0ce).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4406      +/-   ##
==========================================
- Coverage   93.96%   93.94%   -0.02%     
==========================================
  Files         459      459              
  Lines       26261    26261              
  Branches     4088     4088              
==========================================
- Hits        24675    24670       -5     
- Misses        901      907       +6     
+ Partials      685      684       -1     
Flag Coverage Δ
integration 60.85% <ø> (ø)
unit 90.41% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99
DTrim99 marked this pull request as ready for review December 4, 2026 18:49
@DTrim99
DTrim99 requested a review from anth-volk December 4, 2026 18:49

This branch was previously deployed

1 inactive deployment
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.

Stop publishing the IRS premium tax credit folder in the installed-folders catalog test

1 participant