Skip to content

Add CPS SPM takeup source inputs#126

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/cps-spm-takeup-gap-fill-20260601
Jun 1, 2026
Merged

Add CPS SPM takeup source inputs#126
MaxGhenis merged 1 commit into
mainfrom
codex/cps-spm-takeup-gap-fill-20260601

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Jun 1, 2026

Summary

Fills a distinct CPS/SPM slice of the remaining eCPS column gap without overlapping PR #125's G7 income-copy lane or PR #127's G6/G8/G9 recode lane.

  • derive observed housing assistance and housing takeup from CPS SPM_CAPHOUSESUB
  • derive Medicare takeup from CPS Medicare coverage
  • carry CPS SPM_ENGVAL to spm_unit_energy_subsidy on the SPM-unit table and allow it as a data-overridable computed export
  • add source, entity-table, and export-map regressions

Validation

  • uv run --extra dev python -m pytest tests/test_cps_source_provider.py::test_load_cps_asec_derives_policyengine_value_inputs tests/pipelines/test_us.py::TestUSMicroplexPipeline::test_build_policyengine_entity_tables_preserves_spm_source_inputs tests/policyengine/test_us.py::TestPolicyEngineUSProjection::test_build_policyengine_us_export_variable_maps_includes_contract_inputs -q
  • uv run --extra dev ruff check src/microplex_us/data_sources/cps.py src/microplex_us/microdata_roles.py src/microplex_us/pipelines/us.py src/microplex_us/policyengine/us.py tests/test_cps_source_provider.py tests/pipelines/test_us.py tests/policyengine/test_us.py

Note: I did not run file-wide ruff format --check because current origin/main would reformat unrelated existing lines in touched files; the patch intentionally avoids that churn.

Release gate

This should merge before the next CPS-spine rebuild, but it is not by itself enough to replace eCPS. Any policyengine-bundles release / policyengine.py dataset switch should wait for a fresh build plus sound eCPS comparison, reform benchmark, and reproducibility checks.

@MaxGhenis MaxGhenis force-pushed the codex/cps-spm-takeup-gap-fill-20260601 branch from d70ad71 to a63305b Compare June 1, 2026 03:26
@MaxGhenis MaxGhenis marked this pull request as ready for review June 1, 2026 10:08
@MaxGhenis MaxGhenis merged commit 0868dc5 into main Jun 1, 2026
5 checks passed
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