Skip to content

Remove policyengine-us-data runtime imports#162

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/wic-takeup-parity-20260601
Jun 2, 2026
Merged

Remove policyengine-us-data runtime imports#162
MaxGhenis merged 1 commit into
mainfrom
codex/wic-takeup-parity-20260601

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • move MP take-up/WIC inputs into MP-owned constants instead of importing policyengine_us_data.parameters
  • make PUF pre-tax contribution imputation fall back to MP CPS ASEC training data instead of spawning/importing policyengine-us-data
  • demote nonzero pe_l0 to an explicit experimental adapter requiring an injected fitter; zero-L0 stays on the local dense no-gate path
  • add an AST regression guard that fails on direct policyengine_us_data imports in src/microplex_us

Notes

This removes production runtime imports of policyengine_us_data from MP package code. Benchmark/comparison/parity entrypoints can still accept explicit eCPS H5/repo paths because MP still needs to compare against eCPS while replacing it.

L0 is intentionally not part of the current production MP/eCPS path. The active eCPS replacement builds use entropy/no-L0; nonzero L0 now requires deliberate experimental injection rather than implicit policyengine-us-data loading.

Tests

  • uv run ruff check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py src/microplex_us/pipelines/pe_l0.py tests/pipelines/test_pe_l0.py src/microplex_us/data_sources/puf.py tests/test_puf_source_provider.py tests/test_no_policyengine_us_data_runtime_imports.py
  • uv run ruff format --check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py src/microplex_us/pipelines/pe_l0.py tests/pipelines/test_pe_l0.py src/microplex_us/data_sources/puf.py tests/test_puf_source_provider.py tests/test_no_policyengine_us_data_runtime_imports.py
  • uv run pytest tests/pipelines/test_us.py tests/pipelines/test_pe_l0.py tests/test_puf_source_provider.py tests/test_no_policyengine_us_data_runtime_imports.py -q -k "(policyengine_entity_tables and (takeup or wic or stochastic or child_count)) or pe_l0 or pre_tax_contributions or no_policyengine_us_data"
  • AST scan over src/microplex_us/**/*.py for direct policyengine_us_data imports

@MaxGhenis MaxGhenis merged commit a7f0bc1 into main Jun 2, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/wic-takeup-parity-20260601 branch June 2, 2026 00:51
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