Skip to content

Populate SPM subsidies and drop resource aggregates#989

Merged
MaxGhenis merged 2 commits into
mainfrom
populate-spm-energy-subsidy
May 16, 2026
Merged

Populate SPM subsidies and drop resource aggregates#989
MaxGhenis merged 2 commits into
mainfrom
populate-spm-energy-subsidy

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented May 16, 2026

Summary

  • Populate CPS SPM capped housing subsidy and energy subsidy under the canonical PolicyEngine concepts.
  • Stop bringing Census SPM resource aggregates (SPM_TOTVAL, SPM_RESOURCES) into generated pipeline datasets or clone QRF imputation.
  • Keep clone diagnostics based on modeled SPM poverty rather than comparing against imputed reported SPM resources.
  • Add guards so generated/uploaded datasets reject the Census SPM resource aggregate variables.

Contract

This builds on #974, which now fail-closes exported computed policyengine-us variables. Formula/adds/subtracts variables can still be temporary construction targets if a stage explicitly deconstructs or renames them to leaf inputs before export.

SPM_TOTVAL and SPM_RESOURCES are different: they are Census SPM output/control aggregates, not leaf inputs and not decomposable into PolicyEngine input variables in this pipeline. They should be used for validation or raw-CPS replication diagnostics only, not exported or imputed into ECPS.

Validation

  • uv run ruff format --check policyengine_us_data/datasets/cps/cps.py policyengine_us_data/datasets/cps/extended_cps.py policyengine_us_data/datasets/cps/enhanced_cps.py policyengine_us_data/calibration/formulaic_inputs.py policyengine_us_data/storage/upload_completed_datasets.py tests/integration/support/tiny_stage_3.py tests/integration/support/tiny_stage_4.py tests/integration/support/tiny_stage_5.py tests/integration/test_cps_generation.py tests/integration/test_tiny_stage_3_artifacts.py tests/integration/test_tiny_stage_4_artifacts.py tests/unit/test_enhanced_cps_clone_diagnostics.py tests/unit/test_upload_completed_datasets.py tests/unit/test_extended_cps.py
  • uv run ruff check policyengine_us_data/datasets/cps/cps.py policyengine_us_data/datasets/cps/extended_cps.py policyengine_us_data/datasets/cps/enhanced_cps.py policyengine_us_data/calibration/formulaic_inputs.py policyengine_us_data/storage/upload_completed_datasets.py tests/integration/support/tiny_stage_3.py tests/integration/support/tiny_stage_4.py tests/integration/support/tiny_stage_5.py tests/integration/test_cps_generation.py tests/integration/test_tiny_stage_3_artifacts.py tests/integration/test_tiny_stage_4_artifacts.py tests/unit/test_enhanced_cps_clone_diagnostics.py tests/unit/test_upload_completed_datasets.py tests/unit/test_extended_cps.py
  • uv run pytest tests/unit/test_extended_cps.py tests/unit/test_enhanced_cps_clone_diagnostics.py tests/unit/test_upload_completed_datasets.py tests/integration/test_cps_generation.py tests/integration/test_tiny_stage_3_artifacts.py tests/integration/test_tiny_stage_4_artifacts.py -q (95 passed)

@MaxGhenis MaxGhenis force-pushed the populate-spm-energy-subsidy branch 2 times, most recently from d543e53 to 7bf06d6 Compare May 16, 2026 14:34
@MaxGhenis MaxGhenis force-pushed the populate-spm-energy-subsidy branch 4 times, most recently from 7e2c90d to 9c1018e Compare May 16, 2026 15:10
@MaxGhenis MaxGhenis changed the title Populate SPM energy subsidy concept Populate SPM housing and energy subsidy concepts May 16, 2026
@MaxGhenis MaxGhenis force-pushed the populate-spm-energy-subsidy branch from 9c1018e to f6f74f5 Compare May 16, 2026 15:46
@MaxGhenis MaxGhenis changed the title Populate SPM housing and energy subsidy concepts Populate SPM subsidies and drop resource aggregates May 16, 2026
@MaxGhenis MaxGhenis force-pushed the populate-spm-energy-subsidy branch from 6c096f0 to b431c62 Compare May 16, 2026 17:23
@MaxGhenis MaxGhenis force-pushed the populate-spm-energy-subsidy branch from b431c62 to 9e8633d Compare May 16, 2026 17:26
@MaxGhenis MaxGhenis merged commit 71468a4 into main May 16, 2026
13 checks passed
@MaxGhenis MaxGhenis deleted the populate-spm-energy-subsidy branch May 16, 2026 19:30
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