Skip to content

Use Populace geoslices in policyengine.py#442

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/populace-geoslices-20260627
Jun 28, 2026
Merged

Use Populace geoslices in policyengine.py#442
MaxGhenis merged 1 commit into
mainfrom
codex/populace-geoslices-20260627

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • make populace_us_2024 the default US dataset used by create_datasets, load_datasets, and ensure_datasets
  • scope US state and congressional district regions from the certified national Populace H5 via state_fips and congressional_district_geoid, including the at-large SS00 district convention
  • stop vendoring derived Populace state/CD H5 slices into the runtime bundle manifest; keep places as hierarchy metadata until Populace emits place_fips
  • harden dataset reference resolution so bundled logical names win over same-named local files, while explicit local paths still require unmanaged opt-in for managed resolution
  • regenerate bundle TRO sidecars with pe:emittedIn=repository-bundle

Validation

  • uv run --python 3.13 ruff format ... && uv run --python 3.13 ruff check ...
  • uv run --python 3.13 --extra us --extra uk --with pytest python -m pytest tests/test_us_regions.py tests/test_release_manifests.py tests/test_entity_utils.py
  • uv run --python 3.13 --extra us --extra uk --with pytest python -m pytest tests/test_scoping_strategy.py tests/test_entity_utils.py tests/test_us_regions.py tests/test_release_manifests.py tests/test_certify_data_release.py tests/test_bundle.py tests/test_bundle_metadata.py tests/test_dataset_sources.py tests/test_region.py tests/test_trace_tro.py
  • HUGGING_FACE_TOKEN=... HF_TOKEN=... uv run --python 3.13 python scripts/bundle.py check --include-tros
  • git diff --check

Notes

A local full-CD Populace build was interrupted by the computer crash before release manifest completion, so this PR does not certify or publish any new Populace dataset. It only updates policyengine.py to consume the already-certified national Populace artifact as the default and derive geoslices by row filtering.

@MaxGhenis MaxGhenis force-pushed the codex/populace-geoslices-20260627 branch from 046b336 to a0c5513 Compare June 28, 2026 12:19
@MaxGhenis MaxGhenis merged commit c1e33f0 into main Jun 28, 2026
13 checks passed
@MaxGhenis MaxGhenis deleted the codex/populace-geoslices-20260627 branch June 28, 2026 12:44
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