Skip to content

Make input variables pure leaves#8162

Draft
MaxGhenis wants to merge 2 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/pure-leaf-inputs
Draft

Make input variables pure leaves#8162
MaxGhenis wants to merge 2 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/pure-leaf-inputs

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • remove non-geographic defined_for gates from pure input variables
  • make medicare_enrolled default to false so data must populate enrollment explicitly
  • require NY Drive Clean rebate calculations to check the qualifying-purchase input directly
  • fix il_aabd_institutional_status so its state gate is Illinois, not Massachusetts
  • add code-health tests preventing input variables from using formulas, adds, subtracts, or non-geographic defined_for gates

Testing

  • uv run ruff format ...
  • uv run ruff check ...
  • uv run pytest policyengine_us/tests/core/test_input_variable_definitions.py
  • uv run policyengine-core test policyengine_us/tests/policy/baseline/gov/states/ny/nyserda/drive_clean_rebate.yaml -c policyengine_us
  • Earlier targeted policy run covering Medicare, LA relief/DSS, WI Works, MA TAFDC, KY pension exclusion, SC rebate, and NY Drive Clean: 62 passed.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (20705b0) to head (847f023).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #8162       +/-   ##
============================================
+ Coverage   85.36%   100.00%   +14.63%     
============================================
  Files           3        10        +7     
  Lines          41        97       +56     
  Branches        2         0        -2     
============================================
+ Hits           35        97       +62     
+ Misses          6         0        -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (+14.63%) ⬆️

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