Skip to content

Fix SPM childcare cap projection#8250

Merged
MaxGhenis merged 1 commit intomainfrom
codex/fix-spm-childcare-cap-projection
May 8, 2026
Merged

Fix SPM childcare cap projection#8250
MaxGhenis merged 1 commit intomainfrom
codex/fix-spm-childcare-cap-projection

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Fixes the SPM childcare earnings cap formula introduced in #8247 so SPM-unit-level any() results are projected back to person-level before combining them with person-level partner flags. Without this, projected-year microsimulations over datasets with multiple SPM units can fail with a shape/broadcasting error.

Testing

  • PYTHONPATH=. uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_head_spouse_earned_cap.yaml -c policyengine_us
  • uv run ruff check policyengine_us/variables/household/expense/childcare/spm_unit_head_spouse_earned_cap.py
  • uv run ruff format --check policyengine_us/variables/household/expense/childcare/spm_unit_head_spouse_earned_cap.py
  • git diff --check

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #8250    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           12         1    -11     
  Lines          173        25   -148     
  Branches         4         0     -4     
==========================================
- Hits           173        25   -148     
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.

@MaxGhenis MaxGhenis merged commit 4281529 into main May 8, 2026
25 checks passed
@MaxGhenis MaxGhenis deleted the codex/fix-spm-childcare-cap-projection branch May 8, 2026 09:08
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