Skip to content

Map CPS farm income to farm operations#828

Open
MaxGhenis wants to merge 1 commit intomainfrom
codex/fix-cps-farm-operations-income
Open

Map CPS farm income to farm operations#828
MaxGhenis wants to merge 1 commit intomainfrom
codex/fix-cps-farm-operations-income

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Apr 25, 2026

Summary

  • Map CPS FRSE_VAL farm self-employment income to farm_operations_income instead of farm_income.
  • Add a focused regression test for CPS personal income construction.
  • Add a towncrier changelog fragment.

Companion model PR: PolicyEngine/policyengine-us#8156

Root cause

PolicyEngine distinguishes Schedule J-style farm_income from Schedule F farm operations income. The PUF pipeline already maps these separately, but the raw CPS builder was storing FRSE_VAL in farm_income, which makes CPS inconsistent with the model semantics and the PolicyEngine US SECA fix.

Tests

  • uv run python -m pytest tests/unit/datasets/test_cps_income_variables.py -q
  • uv run ruff check policyengine_us_data/datasets/cps/cps.py tests/unit/datasets/test_cps_income_variables.py
  • uv run python -m pytest tests/unit/datasets/test_cps_income_variables.py tests/unit/datasets/test_cps_tax_unit_construction.py tests/unit/datasets/test_cps_file_handles.py -q

@MaxGhenis MaxGhenis force-pushed the codex/fix-cps-farm-operations-income branch from a6a987b to 3cd3d3c Compare April 25, 2026 21:28
@MaxGhenis MaxGhenis marked this pull request as ready for review April 25, 2026 23:22
@MaxGhenis MaxGhenis enabled auto-merge (squash) April 25, 2026 23: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