Skip to content

Avoid state formula warning noise#7924

Open
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/fix-us-formula-warnings
Open

Avoid state formula warning noise#7924
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/fix-us-formula-warnings

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • avoid divide-by-zero warnings in North Carolina TANF income eligibility
  • replace the Pennsylvania TANF boolean inversion with a scalar-safe expression
  • avoid invalid divide-by-zero arithmetic in Vermont military retirement phaseout without changing outputs
  • add a North Carolina edge-case regression and changelog fragment

Validation

  • PYTHONWARNINGS="error::RuntimeWarning,error::DeprecationWarning" UV_PYTHON=3.13 /opt/homebrew/bin/uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/states/nc/ncdhhs/tanf/nc_tanf_income_eligible.yaml policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/pa_tanf.yaml policyengine_us/tests/policy/baseline/gov/hhs/tanf/cash/tanf_negative_income_cap.yaml policyengine_us/tests/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_income_based_exemption.yaml -c policyengine_us
  • /opt/homebrew/bin/ruff check policyengine_us/variables/gov/states/nc/ncdhhs/tanf/nc_tanf_income_eligible.py policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf.py policyengine_us/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_income_based_exemption.py
  • python3 -m py_compile policyengine_us/variables/gov/states/nc/ncdhhs/tanf/nc_tanf_income_eligible.py policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf.py policyengine_us/variables/gov/states/vt/tax/income/adjusted_gross_income/subtractions/retirement_income_exemption/vt_military_retirement_income_based_exemption.py

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fd8a1f8) to head (e026f32).
⚠️ Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7924    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           12         3     -9     
  Lines          174        61   -113     
==========================================
- Hits           174        61   -113     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

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