Skip to content

Add Census SPM work expense formulas#8247

Merged
MaxGhenis merged 6 commits intomainfrom
codex/spm-work-expense-formula-upstream
May 7, 2026
Merged

Add Census SPM work expense formulas#8247
MaxGhenis merged 6 commits intomainfrom
codex/spm-work-expense-formula-upstream

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented May 7, 2026

Summary

  • add Census SPM weekly work-expense history as a parameter series with primary-source metadata
  • add weeks_worked, spm_unit_work_expenses, and spm_unit_head_spouse_earned_cap
  • compute spm_unit_capped_work_childcare_expenses from the model formula as combined work plus childcare expenses capped by the lower earner's earnings

Validation

  • PYTHONPATH=. uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/income/person/weeks_worked.yaml policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_work_expenses.yaml policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_capped_work_childcare_expenses.yaml policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_head_spouse_earned_cap.yaml -c policyengine_us
  • PYTHONPATH=. uv run pytest -q policyengine_us/tests/policy/baseline/parameters/test_uprating_extensions.py
  • uv run ruff format --check policyengine_us/variables/household/expense/childcare/spm_unit_capped_work_childcare_expenses.py policyengine_us/variables/household/expense/childcare/spm_unit_work_expenses.py policyengine_us/variables/household/expense/childcare/spm_work_childcare_earnings.py
  • uv run ruff check policyengine_us/variables/household/expense/childcare/spm_unit_capped_work_childcare_expenses.py policyengine_us/variables/household/expense/childcare/spm_unit_work_expenses.py policyengine_us/variables/household/expense/childcare/spm_work_childcare_earnings.py
  • git diff --check

Notes

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #8247    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           12         6     -6     
  Lines          173        73   -100     
  Branches         4         0     -4     
==========================================
- Hits           173        73   -100     
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 marked this pull request as ready for review May 7, 2026 21:22
@MaxGhenis MaxGhenis merged commit fefe4c2 into main May 7, 2026
25 checks passed
@MaxGhenis MaxGhenis deleted the codex/spm-work-expense-formula-upstream branch May 7, 2026 21:22
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