policyengine 6.2.1__tar.gz → 6.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {policyengine-6.2.1 → policyengine-6.2.2}/CHANGELOG.md +7 -0
- {policyengine-6.2.1/src/policyengine.egg-info → policyengine-6.2.2}/PKG-INFO +1 -1
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/bundles.md +11 -5
- policyengine-6.2.2/docs/engineering/runbooks/build-m-us-populace-certification.md +129 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/engineering/skills/data-certification.md +19 -8
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/microsim.md +6 -5
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/regions.md +9 -6
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/release-bundles.md +21 -13
- {policyengine-6.2.1 → policyengine-6.2.2}/pyproject.toml +1 -1
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/bundle.py +2 -2
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/certify_data_release.py +2 -2
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/region.py +9 -11
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/regions.py +12 -2
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/bundle/manifest.json +25 -20
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/bundle/uk.trace.tro.jsonld +5 -5
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/bundle/us.trace.tro.jsonld +5 -5
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/certification.py +123 -7
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/manifest.py +5 -1
- {policyengine-6.2.1 → policyengine-6.2.2/src/policyengine.egg-info}/PKG-INFO +1 -1
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_bundle.py +27 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_certify_data_release.py +144 -7
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_release_manifests.py +24 -20
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_regions.py +48 -10
- {policyengine-6.2.1 → policyengine-6.2.2}/uv.lock +1 -1
- policyengine-6.2.1/docs/engineering/runbooks/build-m-us-populace-certification.md +0 -145
- {policyengine-6.2.1 → policyengine-6.2.2}/.claude/policyengine-guide.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.claude/quick-reference.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/CONTRIBUTING.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/bump_version.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/capture-version.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/changelog_template.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/check-changelog.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/copilot-instructions.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/dispatch-policyengine-release.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/fetch_version.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/get-changelog-diff.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/has-functional-changes.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/publish-git-tag.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/wait-for-pypi.sh +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/workflows/draft-pdf.yml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/workflows/pr_code_changes.yaml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/workflows/pr_docs_changes.yaml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.github/workflows/push.yaml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.gitignore +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/.python-version +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/AGENTS.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/CITATION.cff +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/CLAUDE.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/CODE_OF_CONDUCT.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/CONTRIBUTING.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/LICENSE +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/Makefile +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/README.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/architecture.png +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/architecture.svg +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/changelog.d/.gitkeep +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/.gitignore +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/_generator/README.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/_generator/build_reference.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/_quarto.yml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/countries.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/data-publishing-design.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/decile-impact-spec.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/dev.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/engineering/runbooks/canonical-spm-development.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/engineering/skills/README.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/engineering/skills/repository-guidance.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/examples.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/getting-started.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/households.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/impact-analysis.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/index.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/methodology/index.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/methodology/model-architecture.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/methodology/us-health-costs.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/outputs.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/programs/index.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/programs/us-chip.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/reference/index.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/reforms.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/run-records.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/trace-case-study.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/docs/visualisation.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/belgium_axiom_pilot.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/employment_income_variation_uk.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/employment_income_variation_us.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/household_impact_example.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/income_bands_uk.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/income_distribution_us.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/paper_repro_uk.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/policy_change_uk.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/speedtest_us_simulation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/examples/us_budgetary_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/paper-preview.html +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/paper.bib +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/paper.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/check_data_staleness.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/check_native_spm_loading.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/check_release_credentials.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/export_bundle_release_assets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/generate_bundle_artifacts.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/generate_trace_tros.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/prepare_package_bundle_update.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/release_lock.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/scripts/spm_bundle.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/setup.cfg +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/bundle.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/cli.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/cache.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/dataset.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/dynamic.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/output.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/parameter.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/parameter_node.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/parameter_value.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/policy.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/run_record.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/scoping_strategy.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/simulation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/spm.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/tax_benefit_model.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/tax_benefit_model_version.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/core/variable.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/uk/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/uk/regions.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/data/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/data/districts.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/data/places.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/countries/us/data/states.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/schemas/trace_tro.schema.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/data/uk_geography_assets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/derivations/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/derivations/narrate.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/derivations/trace.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/graph/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/graph/extractor.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/graph/graph.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/aggregate.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/change_aggregate.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/cliff_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/congressional_district_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/constituency_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/decile_analysis.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/decile_grouping.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/decile_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/extra_variables.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/inequality.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/intra_decile_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/labor_supply_response.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/local_authority_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/poverty.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/program_statistics.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/uk_geography_assets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/outputs/uk_geography_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/bundle_validation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/dataset_materialization.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/pyproject_pins.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/spm_configuration.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/trace.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/verify.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/provenance/zenodo.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/results/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/results/schema.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/results/trace_tro.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/results/tracking.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/be/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/be/datasets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/be/model.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/axes.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/extra_variables.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/household.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/model_version.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/reform.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/common/result.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/uk/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/uk/analysis.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/uk/datasets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/uk/household.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/uk/model.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/analysis.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/datasets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/household.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/legacy_inputs.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/model.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/tax_benefit_models/us/spm.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/dates.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/design.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/entity_utils.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/errors.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/hashing.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/household_validation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/parameter_labels.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/parametric_reforms.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine/utils/plotting.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine.egg-info/SOURCES.txt +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine.egg-info/dependency_links.txt +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine.egg-info/entry_points.txt +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine.egg-info/requires.txt +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/src/policyengine.egg-info/top_level.txt +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/conftest.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/filtering_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/uk_model_surface.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/us_married_two_kids_high_income.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/us_model_surface.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/us_single_adult_employment_income.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/us_single_adult_no_income.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/household_calculator_snapshots/us_single_parent_one_child.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/parameter_labels_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/parametric_reforms_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/poverty_by_demographics_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/region_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/release_tros/README.md +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/release_tros/country-models.lock.toml +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/release_tros/manifest.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/release_tros/us-release_manifest.json +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/release_tros/us.trace.tro.jsonld +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/spm_development.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/us_reform_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/fixtures/variable_label_fixtures.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_aggregate.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_be_axiom_pilot.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_budgetary_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_bump_version.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_bundle_metadata.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_cache.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_change_aggregate.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_cliff_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_cliff_impact_analysis.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_congressional_district_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_constituency_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_dataset_materialization.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_dataset_persistence.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_dataset_runtime.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_dataset_source.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_decile_grouping.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_derivations.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_dict_reforms_on_simulation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_entity_mapping.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_entity_utils.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_entity_utils_characterization.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_errors.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_extra_variables.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_filtering.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_generate_trace_tros.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_graph/__init__.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_graph/conftest.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_graph/test_extractor.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_household_calculator_snapshot.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_household_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_inequality.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_intra_decile_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_labor_supply_response.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_local_authority_impact.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_manifest_version_mismatch.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_models.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_pandas3_compatibility.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_parameter_labels.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_parameter_nodes.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_parameter_values.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_parametric_reforms.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_poverty.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_poverty_by_demographics.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_poverty_run.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_preservation_mirror.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_program_statistics.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_pyproject_pins.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_region.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_region_group_strategy.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_release_credentials.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_release_lock.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_release_tro_generation.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_results.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_run_record.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_scoping_strategy.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_small_follow_ups.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_bundle_bootstrap.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_bundle_tooling.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_decile.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_development_authentication.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_household.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_model.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_selection.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_spm_selection_schema.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_trace_tro.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_trace_tro_verify.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_uk_analysis.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_uk_geography_assets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_uk_program_statistics.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_uk_regions.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_legacy_inputs.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_legacy_inputs_integration.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_long_term_datasets.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_microsim_structural_reforms.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_native_alignment.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_native_hdf_weights.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_program_statistics.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_us_reform_application.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_variable_labels.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_variable_metadata.py +0 -0
- {policyengine-6.2.1 → policyengine-6.2.2}/tests/test_zenodo_mirror.py +0 -0
|
@@ -143,14 +143,20 @@ python scripts/bundle.py certify-data \
|
|
|
143
143
|
--country us \
|
|
144
144
|
--data-producer populace \
|
|
145
145
|
--manifest-uri hf://dataset/policyengine/populace-us@<release>/releases/<release>/release_manifest.json \
|
|
146
|
+
--regional-manifest-uri hf://dataset/policyengine/populace-us@<local-area-release>/releases/<local-area-release>/release_manifest.json \
|
|
146
147
|
--model-version <policyengine-us-version>
|
|
147
148
|
```
|
|
148
149
|
|
|
149
|
-
US state and congressional-district regions scope
|
|
150
|
-
Populace dataset with row filters.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
US state and congressional-district regions scope one certified ACS-local
|
|
151
|
+
Populace dataset with row filters. Pass its non-default local-area release
|
|
152
|
+
manifest through `--regional-manifest-uri`; certification adds the pinned H5
|
|
153
|
+
artifact to `data_releases.us.datasets` and writes both regional path templates
|
|
154
|
+
under `data_releases.us.region_datasets`. If a legacy release publishes derived
|
|
155
|
+
`states/*.h5` or `districts/*.h5` slices, certification still omits them.
|
|
156
|
+
|
|
157
|
+
`policyengine bundle install` continues to materialize only each country's
|
|
158
|
+
certified national `default_dataset`. Regional runtimes materialize the
|
|
159
|
+
additional certified dataset when the selected region declares it.
|
|
154
160
|
|
|
155
161
|
Use `python scripts/bundle.py generate` to regenerate derived bundle metadata,
|
|
156
162
|
and `python scripts/bundle.py generate --include-tros` when TRACE TRO sidecars
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# US Populace certification runbook
|
|
2
|
+
|
|
3
|
+
Use this runbook to certify a new national US Populace release together with
|
|
4
|
+
the shared ACS-local release used for state and congressional-district
|
|
5
|
+
simulations. Read the [data certification](../skills/data-certification.md)
|
|
6
|
+
skill first for validation semantics.
|
|
7
|
+
|
|
8
|
+
This historical filename is retained so existing links remain valid; the
|
|
9
|
+
procedure itself is release-independent.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
Both release manifests have been published to `policyengine/populace-us`, and
|
|
14
|
+
the model version used by the national release is known. The national release
|
|
15
|
+
will remain the default dataset; the local-area release will remain
|
|
16
|
+
non-default and be selected only for supported regional runs.
|
|
17
|
+
|
|
18
|
+
## Prerequisites
|
|
19
|
+
|
|
20
|
+
- A clean worktree branched from current `origin/main`.
|
|
21
|
+
- Network access: certification fetches the release manifest and PyPI wheel
|
|
22
|
+
metadata and runs reachability `HEAD` checks against Hugging Face.
|
|
23
|
+
- `HUGGING_FACE_TOKEN` (or `HF_TOKEN`) exported — required to regenerate the
|
|
24
|
+
UK TRO in the `--include-tros` step and to run the UK data-release fetch in
|
|
25
|
+
the test suite. The US populace repo is public.
|
|
26
|
+
|
|
27
|
+
## Step 1 — identify the releases
|
|
28
|
+
|
|
29
|
+
Set values from the two published release manifests rather than copying an
|
|
30
|
+
older certification:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
NATIONAL_RELEASE_ID = populace-us-2024-<national-build>-<sha>-<timestamp>Z
|
|
34
|
+
LOCAL_AREA_RELEASE_ID = populace-us-2024-<local-build>-<sha>-<timestamp>Z
|
|
35
|
+
MODEL_VERSION = <policyengine-us version declared by the national release>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The local-area manifest must declare `dataset_role: non_default_local_area`,
|
|
39
|
+
`is_default: false`, no default datasets, and exactly one pinned H5 microdata
|
|
40
|
+
artifact.
|
|
41
|
+
|
|
42
|
+
## Step 2 — certify both releases
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python scripts/bundle.py certify-data \
|
|
46
|
+
--country us \
|
|
47
|
+
--data-producer populace \
|
|
48
|
+
--model-version "$MODEL_VERSION" \
|
|
49
|
+
--manifest-uri "hf://dataset/policyengine/populace-us@$NATIONAL_RELEASE_ID/releases/$NATIONAL_RELEASE_ID/release_manifest.json" \
|
|
50
|
+
--regional-manifest-uri "hf://dataset/policyengine/populace-us@$LOCAL_AREA_RELEASE_ID/releases/$LOCAL_AREA_RELEASE_ID/release_manifest.json"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This one command:
|
|
54
|
+
|
|
55
|
+
- rewrites `data_releases.us` in `src/policyengine/data/bundle/manifest.json`
|
|
56
|
+
from the national release manifest (default dataset, per-artifact
|
|
57
|
+
repo/revision/sha256 pins, certified artifact, certification block);
|
|
58
|
+
- runs `generate(check=False)`, which re-normalizes `manifest.json` and
|
|
59
|
+
updates `pyproject.toml` **only if the model pins moved**;
|
|
60
|
+
- writes the changelog fragment
|
|
61
|
+
`changelog.d/certify-us-$NATIONAL_RELEASE_ID.changed.md`.
|
|
62
|
+
|
|
63
|
+
## Step 3 — regenerate TRACE sidecars
|
|
64
|
+
|
|
65
|
+
The certify step does not touch TRACE sidecars. Regenerate them so they record
|
|
66
|
+
the new bundle-manifest SHA-256:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
HUGGING_FACE_TOKEN="$HUGGING_FACE_TOKEN" python scripts/bundle.py generate --include-tros
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Both country sidecars contain the bundle-manifest hash, so both may change when
|
|
73
|
+
the bundle changes. If UK cannot be reached, the run writes a *limited* UK
|
|
74
|
+
sidecar; do not commit that degraded output.
|
|
75
|
+
|
|
76
|
+
## Step 4 — update pinned expectations
|
|
77
|
+
|
|
78
|
+
Update tests that intentionally pin the outgoing national release, local-area
|
|
79
|
+
release, model version, or artifact hashes. Derive every replacement from the
|
|
80
|
+
new manifests; do not copy identifiers from this runbook.
|
|
81
|
+
|
|
82
|
+
If the model version changed, refresh the household snapshots with:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
PE_UPDATE_SNAPSHOTS=1 pytest tests/test_household_calculator_snapshot.py
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Step 5 — certify and verify the local-area release
|
|
89
|
+
|
|
90
|
+
The certification command passes the immutable ACS-local release manifest with
|
|
91
|
+
`--regional-manifest-uri`. Confirm all of the following:
|
|
92
|
+
|
|
93
|
+
- `default_dataset` remains the national Populace dataset;
|
|
94
|
+
- the local-area artifact appears in `data_releases.us.datasets` with its
|
|
95
|
+
repository type, immutable revision, and SHA-256;
|
|
96
|
+
- `region_datasets.national` selects the national artifact;
|
|
97
|
+
- `region_datasets.state` and `region_datasets.congressional_district` select
|
|
98
|
+
the shared local-area artifact;
|
|
99
|
+
- no derived `states/*.h5` or `districts/*.h5` artifacts are runtime inputs.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pytest tests/test_certify_data_release.py \
|
|
103
|
+
tests/test_release_manifests.py \
|
|
104
|
+
tests/test_us_regions.py \
|
|
105
|
+
-q
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Step 6 — check, format, lint, test
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python scripts/bundle.py check # must exit 0
|
|
112
|
+
make format
|
|
113
|
+
make lint
|
|
114
|
+
make test # needs HUGGING_FACE_TOKEN for UK
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Step 7 — inspect and commit the generated changes
|
|
118
|
+
|
|
119
|
+
The expected diff normally includes the bundle manifest, TRACE sidecars, one
|
|
120
|
+
Towncrier fragment, and pinned test expectations. Include package pins and
|
|
121
|
+
snapshots only when the certified model version changed. Investigate any other
|
|
122
|
+
generated difference before committing it.
|
|
123
|
+
|
|
124
|
+
## Step 8 — open the PR
|
|
125
|
+
|
|
126
|
+
Follow [github-prs](../skills/github-prs.md): open/find the issue, put
|
|
127
|
+
`Fixes #ISSUE` first, push to the canonical repo, and open a **draft** PR. The
|
|
128
|
+
certify step already wrote the changelog fragment, so the changelog check
|
|
129
|
+
passes.
|
|
@@ -31,21 +31,30 @@ For US Populace certification, certify the Populace release manifest directly:
|
|
|
31
31
|
```bash
|
|
32
32
|
python scripts/bundle.py certify-data --country us --data-producer populace \
|
|
33
33
|
--manifest-uri "hf://dataset/policyengine/populace-us@<tag>/releases/<tag>/release_manifest.json" \
|
|
34
|
+
--regional-manifest-uri "hf://dataset/policyengine/populace-us@<local-area-tag>/releases/<local-area-tag>/release_manifest.json" \
|
|
34
35
|
--model-version "<policyengine-us-version>"
|
|
35
36
|
```
|
|
36
37
|
|
|
37
|
-
US state and congressional-district regions are row filters over
|
|
38
|
-
|
|
38
|
+
US state and congressional-district regions are row filters over one shared,
|
|
39
|
+
certified ACS-local Populace dataset. Its release manifest must declare
|
|
40
|
+
`dataset_role: non_default_local_area`, `is_default: false`, no default
|
|
41
|
+
datasets, and exactly one pinned H5 microdata artifact. Certification writes:
|
|
39
42
|
|
|
40
43
|
```json
|
|
41
44
|
"region_datasets": {
|
|
42
|
-
"national": {"path_template": "populace_us_2024.h5"}
|
|
45
|
+
"national": {"path_template": "populace_us_2024.h5"},
|
|
46
|
+
"state": {"path_template": "populace_us_2024_acs_local.h5"},
|
|
47
|
+
"congressional_district": {"path_template": "populace_us_2024_acs_local.h5"}
|
|
43
48
|
}
|
|
44
49
|
```
|
|
45
50
|
|
|
51
|
+
The ACS-local artifact is a second entry in `data_releases.us.datasets`; it is
|
|
52
|
+
not a dataset overlay and it never replaces the national `default_dataset`.
|
|
53
|
+
|
|
46
54
|
If the Populace release publishes derived `states/*.h5` or `districts/*.h5`
|
|
47
55
|
files for compatibility checks, certification omits them from the runtime
|
|
48
|
-
bundle. The
|
|
56
|
+
bundle. The country-wide default and ACS-local dataset are each single shared
|
|
57
|
+
files; region registries select one and then filter its rows.
|
|
49
58
|
|
|
50
59
|
The script fetches and validates the manifest (every artifact must carry a
|
|
51
60
|
revision pin; the certified dataset must be reachable), writes the canonical
|
|
@@ -74,8 +83,9 @@ A certification PR should normally change only:
|
|
|
74
83
|
Hard failures (certification refuses): missing national default dataset,
|
|
75
84
|
default dataset absent from artifacts, any artifact without a revision pin,
|
|
76
85
|
unreachable certified dataset, missing required supplemental release files
|
|
77
|
-
(for example Populace-US `us_source_coverage.json`),
|
|
78
|
-
|
|
86
|
+
(for example Populace-US `us_source_coverage.json`), a malformed shared
|
|
87
|
+
local-area release or malformed legacy per-state artifacts when
|
|
88
|
+
`--regional-manifest-uri` is used, unknown country.
|
|
79
89
|
|
|
80
90
|
Certification gate: the model version must either exactly match the
|
|
81
91
|
build-time model (`compatibility_basis: built_with_model_package`) or be
|
|
@@ -92,8 +102,9 @@ publisher-claim basis above.
|
|
|
92
102
|
|
|
93
103
|
Concrete, fill-in-the-id runbooks that replay a specific certification live
|
|
94
104
|
under `docs/engineering/runbooks/`. See
|
|
95
|
-
`runbooks/build-m-us-populace-certification.md` for the
|
|
96
|
-
|
|
105
|
+
`runbooks/build-m-us-populace-certification.md` for the reusable US national
|
|
106
|
+
and local-area certification procedure. The historical filename is retained
|
|
107
|
+
so existing links remain valid.
|
|
97
108
|
|
|
98
109
|
## Legacy paths
|
|
99
110
|
|
|
@@ -134,15 +134,16 @@ pe.us.load_datasets() # or pe.uk.load_datasets()
|
|
|
134
134
|
|
|
135
135
|
### US local-area dataset
|
|
136
136
|
|
|
137
|
-
Alongside the certified national default, the bundle registers a
|
|
138
|
-
|
|
137
|
+
Alongside the certified national default, the bundle registers a US dataset for
|
|
138
|
+
finer geographic work: `populace_us_2024_acs_local`. It is a
|
|
139
139
|
Populace US 2024 build of roughly **1.6 million households** on an **ACS 2024
|
|
140
140
|
multispine**, with each household **PUMA-assigned** to a 119th-Congress
|
|
141
141
|
congressional district, county, and state, and calibrated to **state
|
|
142
142
|
administrative totals and state and congressional-district population**. Its
|
|
143
|
-
release
|
|
144
|
-
summary before relying on it. It ships in its own immutable release and
|
|
145
|
-
|
|
143
|
+
release validation summary records **four reviewed limitations**, so read that
|
|
144
|
+
summary before relying on it. It ships in its own immutable release. State and
|
|
145
|
+
congressional-district region simulations select it through the bundle's
|
|
146
|
+
`region_datasets` metadata; direct microsimulations can still load it by name.
|
|
146
147
|
|
|
147
148
|
Two-line load:
|
|
148
149
|
|
|
@@ -23,9 +23,9 @@ ca_snap = Aggregate(
|
|
|
23
23
|
ca_snap.run()
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Each state is a region in the US registry. State regions
|
|
27
|
-
|
|
28
|
-
H5 files:
|
|
26
|
+
Each state is a region in the US registry. State regions load the ACS-local
|
|
27
|
+
Populace dataset declared by `region.dataset_path`, then scope its rows by
|
|
28
|
+
`state_fips`. They do not require separate state H5 files:
|
|
29
29
|
|
|
30
30
|
```python
|
|
31
31
|
states = pe.us.model.region_registry.get_by_type("state")
|
|
@@ -33,8 +33,9 @@ for region in states:
|
|
|
33
33
|
print(region.code, region.label, region.scoping_strategy)
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
For state-specific simulations,
|
|
37
|
-
|
|
36
|
+
For state-specific simulations, use both `region.dataset_path` and
|
|
37
|
+
`region.scoping_strategy`. The regional simulation API performs both steps from
|
|
38
|
+
the registry entry.
|
|
38
39
|
|
|
39
40
|
## US congressional districts
|
|
40
41
|
|
|
@@ -49,7 +50,9 @@ for row in impacts.district_results:
|
|
|
49
50
|
print(row["district_geoid"], row["avg_change"], row["winner_percentage"])
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
`district_geoid` is the SSDD integer (state FIPS × 100 + district number;
|
|
53
|
+
`district_geoid` is the SSDD integer (state FIPS × 100 + district number;
|
|
54
|
+
at-large districts use `00`). Congressional district regions load the same
|
|
55
|
+
ACS-local file and scope its rows by `congressional_district_geoid`.
|
|
53
56
|
|
|
54
57
|
## UK parliamentary constituencies
|
|
55
58
|
|
|
@@ -201,31 +201,32 @@ US Populace certification uses the Populace release manifest directly:
|
|
|
201
201
|
```bash
|
|
202
202
|
python scripts/bundle.py certify-data --country us --data-producer populace \
|
|
203
203
|
--manifest-uri "hf://dataset/policyengine/populace-us@<tag>/releases/<tag>/release_manifest.json" \
|
|
204
|
+
--regional-manifest-uri "hf://dataset/policyengine/populace-us@<local-area-tag>/releases/<local-area-tag>/release_manifest.json" \
|
|
204
205
|
--model-version "<policyengine-us-version>"
|
|
205
206
|
```
|
|
206
207
|
|
|
207
208
|
That produces one US bundle manifest entry containing the Populace national
|
|
208
|
-
default dataset
|
|
209
|
-
|
|
210
|
-
`districts/*.h5` files are not vendored into
|
|
209
|
+
default dataset and the certified ACS-local regional dataset. State and
|
|
210
|
+
congressional-district simulations use the latter with runtime row filters, so
|
|
211
|
+
derived `states/*.h5` or `districts/*.h5` files are not vendored into
|
|
212
|
+
`data_releases.us.datasets`.
|
|
211
213
|
|
|
212
214
|
### Non-default dataset overlays
|
|
213
215
|
|
|
214
216
|
`certify_data_release` rewrites `data_releases.{country}` wholesale from the
|
|
215
|
-
certified release manifest
|
|
216
|
-
|
|
217
|
-
deliberately not the certified default — is registered instead under the
|
|
217
|
+
certified release manifest or manifests. A staged artifact that is not part of
|
|
218
|
+
that certification and is deliberately not a default is registered under the
|
|
218
219
|
sibling `dataset_overlays.{country}` map:
|
|
219
220
|
|
|
220
221
|
```json
|
|
221
222
|
"dataset_overlays": {
|
|
222
|
-
"
|
|
223
|
-
"
|
|
223
|
+
"uk": {
|
|
224
|
+
"populace_uk_2023": {
|
|
224
225
|
"data_package_name": "populace-data",
|
|
225
|
-
"path": "
|
|
226
|
-
"repo_id": "policyengine/populace-
|
|
226
|
+
"path": "populace_uk_2023.h5",
|
|
227
|
+
"repo_id": "policyengine/populace-uk-private",
|
|
227
228
|
"repo_type": "dataset",
|
|
228
|
-
"revision": "populace-
|
|
229
|
+
"revision": "populace-uk-2023-...",
|
|
229
230
|
"sha256": "..."
|
|
230
231
|
}
|
|
231
232
|
}
|
|
@@ -237,8 +238,15 @@ sibling `dataset_overlays.{country}` map:
|
|
|
237
238
|
their own pinned, sha-verified revision. Overlays are strictly additive: an
|
|
238
239
|
overlay may not shadow the certified default or any certified dataset, so
|
|
239
240
|
default resolution is untouched. Because certification only rewrites
|
|
240
|
-
`data_releases`, overlays survive re-certification without any manual
|
|
241
|
-
|
|
241
|
+
`data_releases`, overlays survive re-certification without any manual re-add
|
|
242
|
+
step.
|
|
243
|
+
|
|
244
|
+
Datasets used automatically for a region type are not overlays. They are
|
|
245
|
+
certified into `data_releases.{country}.datasets`, and
|
|
246
|
+
`data_releases.{country}.region_datasets` maps each region type to its artifact
|
|
247
|
+
path. The national `default_dataset` remains unchanged. Ordinary bundle
|
|
248
|
+
installation downloads only that national default; a regional runtime is
|
|
249
|
+
responsible for materializing the additional certified dataset.
|
|
242
250
|
|
|
243
251
|
Cross-package overlays must declare `data_package_name` and `repo_type`
|
|
244
252
|
explicitly. Ordinary artifacts inherit these values from the country release's
|
|
@@ -202,11 +202,11 @@ def _parser() -> argparse.ArgumentParser:
|
|
|
202
202
|
)
|
|
203
203
|
certify.add_argument(
|
|
204
204
|
"--regional-artifact-prefix",
|
|
205
|
-
help="
|
|
205
|
+
help="Legacy per-state artifact prefix to import. Defaults to states/.",
|
|
206
206
|
)
|
|
207
207
|
certify.add_argument(
|
|
208
208
|
"--regional-path-template",
|
|
209
|
-
help="
|
|
209
|
+
help="Legacy per-state dataset path template to certify.",
|
|
210
210
|
)
|
|
211
211
|
certify.add_argument(
|
|
212
212
|
"--no-generate",
|
|
@@ -60,12 +60,12 @@ def main(argv=None) -> int:
|
|
|
60
60
|
parser.add_argument(
|
|
61
61
|
"--regional-artifact-prefix",
|
|
62
62
|
default="states/",
|
|
63
|
-
help="
|
|
63
|
+
help="Legacy per-state artifact path prefix to import. Defaults to states/.",
|
|
64
64
|
)
|
|
65
65
|
parser.add_argument(
|
|
66
66
|
"--regional-path-template",
|
|
67
67
|
default="states/{state_code}.h5",
|
|
68
|
-
help="
|
|
68
|
+
help="Legacy per-state dataset path template to certify.",
|
|
69
69
|
)
|
|
70
70
|
parser.add_argument(
|
|
71
71
|
"--model-version",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""Region definitions for geographic simulations.
|
|
2
2
|
|
|
3
3
|
This module provides the Region and RegionRegistry classes for defining
|
|
4
|
-
geographic regions that a tax-benefit model supports. Regions can
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
geographic regions that a tax-benefit model supports. Regions can select an
|
|
5
|
+
input dataset, apply a scoping strategy to a selected dataset, or do both. For
|
|
6
|
+
example, US states and congressional districts select the shared ACS-local
|
|
7
|
+
dataset and then filter its rows.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
from typing import Literal, Optional, Union
|
|
@@ -22,10 +22,8 @@ RegionType = Union[USRegionType, UKRegionType]
|
|
|
22
22
|
class Region(BaseModel):
|
|
23
23
|
"""Geographic region for tax-benefit simulations.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
2. A scoping strategy that derives the region from a parent dataset
|
|
28
|
-
(``scoping_strategy`` is set).
|
|
25
|
+
``dataset_path`` selects the input dataset. ``scoping_strategy`` optionally
|
|
26
|
+
scopes that dataset to the requested geography. A region may declare both.
|
|
29
27
|
|
|
30
28
|
The unique identifier is the code field, which uses a prefixed format:
|
|
31
29
|
- National: "us", "uk"
|
|
@@ -56,7 +54,7 @@ class Region(BaseModel):
|
|
|
56
54
|
# Dataset configuration
|
|
57
55
|
dataset_path: Optional[str] = Field(
|
|
58
56
|
default=None,
|
|
59
|
-
description="URI to
|
|
57
|
+
description="URI to the input dataset selected before regional scoping.",
|
|
60
58
|
)
|
|
61
59
|
|
|
62
60
|
# Scoping strategy for regions that derive from a parent dataset
|
|
@@ -173,11 +171,11 @@ class RegionRegistry(BaseModel):
|
|
|
173
171
|
return [r for r in self.regions if r.parent_code == parent_code]
|
|
174
172
|
|
|
175
173
|
def get_dataset_regions(self) -> list[Region]:
|
|
176
|
-
"""Get all regions that
|
|
174
|
+
"""Get all regions that select an input dataset."""
|
|
177
175
|
return [r for r in self.regions if r.dataset_path is not None]
|
|
178
176
|
|
|
179
177
|
def get_filter_regions(self) -> list[Region]:
|
|
180
|
-
"""Get all regions that
|
|
178
|
+
"""Get all regions that apply a scoping strategy to their input dataset."""
|
|
181
179
|
return [r for r in self.regions if r.scoping_strategy is not None]
|
|
182
180
|
|
|
183
181
|
def __len__(self) -> int:
|
|
@@ -43,7 +43,7 @@ def build_us_region_registry() -> RegionRegistry:
|
|
|
43
43
|
)
|
|
44
44
|
)
|
|
45
45
|
|
|
46
|
-
# 2. State regions (filtered from the
|
|
46
|
+
# 2. State regions (filtered from the configured state dataset)
|
|
47
47
|
for abbrev, name in US_STATES.items():
|
|
48
48
|
regions.append(
|
|
49
49
|
Region(
|
|
@@ -51,6 +51,11 @@ def build_us_region_registry() -> RegionRegistry:
|
|
|
51
51
|
label=name,
|
|
52
52
|
region_type="state",
|
|
53
53
|
parent_code="us",
|
|
54
|
+
dataset_path=resolve_region_dataset_path(
|
|
55
|
+
"us",
|
|
56
|
+
"state",
|
|
57
|
+
state_code=abbrev,
|
|
58
|
+
),
|
|
54
59
|
scoping_strategy=RowFilterStrategy(
|
|
55
60
|
variable_name="state_fips",
|
|
56
61
|
variable_value=US_STATE_FIPS[abbrev],
|
|
@@ -60,7 +65,7 @@ def build_us_region_registry() -> RegionRegistry:
|
|
|
60
65
|
)
|
|
61
66
|
)
|
|
62
67
|
|
|
63
|
-
# 3. Congressional
|
|
68
|
+
# 3. Congressional districts (filtered from the configured district dataset)
|
|
64
69
|
for state_abbrev, count in DISTRICT_COUNTS.items():
|
|
65
70
|
state_name = US_STATES[state_abbrev]
|
|
66
71
|
state_fips = US_STATE_FIPS[state_abbrev]
|
|
@@ -81,6 +86,11 @@ def build_us_region_registry() -> RegionRegistry:
|
|
|
81
86
|
label=label,
|
|
82
87
|
region_type="congressional_district",
|
|
83
88
|
parent_code=f"state/{state_abbrev.lower()}",
|
|
89
|
+
dataset_path=resolve_region_dataset_path(
|
|
90
|
+
"us",
|
|
91
|
+
"congressional_district",
|
|
92
|
+
district_code=district_code,
|
|
93
|
+
),
|
|
84
94
|
scoping_strategy=RowFilterStrategy(
|
|
85
95
|
variable_name="congressional_district_geoid",
|
|
86
96
|
variable_value=district_geoid,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundle_version": "6.2.
|
|
2
|
+
"bundle_version": "6.2.2",
|
|
3
3
|
"citation": {
|
|
4
4
|
"publisher": "PolicyEngine",
|
|
5
|
-
"title": "PolicyEngine bundle 6.2.
|
|
5
|
+
"title": "PolicyEngine bundle 6.2.2",
|
|
6
6
|
"type": "software-bundle",
|
|
7
|
-
"version": "6.2.
|
|
7
|
+
"version": "6.2.2"
|
|
8
8
|
},
|
|
9
9
|
"countries": {
|
|
10
10
|
"uk": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"data_releases": {
|
|
18
18
|
"uk": {
|
|
19
19
|
"build_id": "policyengine-uk-data-1.56.16",
|
|
20
|
-
"bundle_id": "uk-6.2.
|
|
20
|
+
"bundle_id": "uk-6.2.2",
|
|
21
21
|
"certification": {
|
|
22
22
|
"built_with_model_git_sha": "12a1e028afeef08d8b2d74ee03fd9de3a78b2dd3",
|
|
23
23
|
"built_with_model_version": "2.89.2",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"version": "2.102.3",
|
|
100
100
|
"wheel_url": "https://files.pythonhosted.org/packages/37/e6/e8d9069d498f1510a1380f24a78e957902d01f00b10248c146d6710d5b37/policyengine_uk-2.102.3-py3-none-any.whl"
|
|
101
101
|
},
|
|
102
|
-
"policyengine_version": "6.2.
|
|
102
|
+
"policyengine_version": "6.2.2",
|
|
103
103
|
"region_datasets": {
|
|
104
104
|
"national": {
|
|
105
105
|
"path_template": "enhanced_frs_2024_25.h5"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"us": {
|
|
114
114
|
"build_id": "populace-us-2024-spm-20260915",
|
|
115
|
-
"bundle_id": "us-6.2.
|
|
115
|
+
"bundle_id": "us-6.2.2",
|
|
116
116
|
"certification": {
|
|
117
117
|
"built_with_model_version": "2.2.1",
|
|
118
118
|
"certified_by": "policyengine.py bundle certification",
|
|
@@ -171,6 +171,13 @@
|
|
|
171
171
|
"revision": "populace-us-2024-spm-20260915",
|
|
172
172
|
"sha256": "6496cc4393d4d3c6574f76eca231de5898c803b9067645591fd5c4d3e65aee84"
|
|
173
173
|
},
|
|
174
|
+
"populace_us_2024_acs_local": {
|
|
175
|
+
"path": "populace_us_2024_acs_local.h5",
|
|
176
|
+
"repo_id": "policyengine/populace-us",
|
|
177
|
+
"repo_type": "dataset",
|
|
178
|
+
"revision": "populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z",
|
|
179
|
+
"sha256": "769756c31f3ca646d12c272511744dec04c0e68870c6946dd945fbba65b6a7ec"
|
|
180
|
+
},
|
|
174
181
|
"source_enrichment": {
|
|
175
182
|
"path": "releases/populace-us-2024-spm-20260915/source_enrichment.json",
|
|
176
183
|
"repo_id": "policyengine/populace-us",
|
|
@@ -210,12 +217,20 @@
|
|
|
210
217
|
"version": "2.2.1",
|
|
211
218
|
"wheel_url": "https://files.pythonhosted.org/packages/5e/09/86ac3968d2a18e28fce3ba1186fc21728e9f299b96a806d6f204f1e0aaed/policyengine_us-2.2.1-py3-none-any.whl"
|
|
212
219
|
},
|
|
213
|
-
"policyengine_version": "6.2.
|
|
220
|
+
"policyengine_version": "6.2.2",
|
|
214
221
|
"region_datasets": {
|
|
222
|
+
"congressional_district": {
|
|
223
|
+
"path_template": "populace_us_2024_acs_local.h5"
|
|
224
|
+
},
|
|
215
225
|
"national": {
|
|
216
226
|
"path_template": "populace_us_2024.h5"
|
|
227
|
+
},
|
|
228
|
+
"state": {
|
|
229
|
+
"path_template": "populace_us_2024_acs_local.h5"
|
|
217
230
|
}
|
|
218
231
|
},
|
|
232
|
+
"regional_release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-us/resolve/populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z/releases/populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z/release_manifest.json",
|
|
233
|
+
"regional_source_manifest_uri": "hf://dataset/policyengine/populace-us@populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z/releases/populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z/release_manifest.json",
|
|
219
234
|
"release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-us/resolve/populace-us-2024-spm-20260915/releases/populace-us-2024-spm-20260915/release_manifest.json",
|
|
220
235
|
"schema_version": 1,
|
|
221
236
|
"source_manifest_uri": "hf://dataset/policyengine/populace-us@populace-us-2024-spm-20260915/releases/populace-us-2024-spm-20260915/release_manifest.json",
|
|
@@ -248,16 +263,6 @@
|
|
|
248
263
|
"revision": "populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z",
|
|
249
264
|
"sha256": "f17306ccb2aad7ff0130be3589b560afb2e2a12a943570911cd0c77f07934833"
|
|
250
265
|
}
|
|
251
|
-
},
|
|
252
|
-
"us": {
|
|
253
|
-
"populace_us_2024_acs_local": {
|
|
254
|
-
"data_package_name": "populace-data",
|
|
255
|
-
"path": "populace_us_2024_acs_local.h5",
|
|
256
|
-
"repo_id": "policyengine/populace-us",
|
|
257
|
-
"repo_type": "dataset",
|
|
258
|
-
"revision": "populace-us-2024-buildo-acs-local-77e2061-20260724T110908Z",
|
|
259
|
-
"sha256": "71763290ded993789af0ad818fd833a6aabb9ca7ff7d14f78315340d8617c6f4"
|
|
260
|
-
}
|
|
261
266
|
}
|
|
262
267
|
},
|
|
263
268
|
"extras": {
|
|
@@ -290,10 +295,10 @@
|
|
|
290
295
|
"packages": {
|
|
291
296
|
"policyengine": {
|
|
292
297
|
"import_name": "policyengine",
|
|
293
|
-
"install_requirement": "policyengine==6.2.
|
|
298
|
+
"install_requirement": "policyengine==6.2.2",
|
|
294
299
|
"name": "policyengine",
|
|
295
300
|
"role": "bundle_carrier",
|
|
296
|
-
"version": "6.2.
|
|
301
|
+
"version": "6.2.2"
|
|
297
302
|
},
|
|
298
303
|
"policyengine-core": {
|
|
299
304
|
"import_name": "policyengine_core",
|
|
@@ -329,6 +334,6 @@
|
|
|
329
334
|
"wheel_url": "https://files.pythonhosted.org/packages/19/a0/c484f69a0ebf88a9b9fd0ac28176f8df66550f46714f1b0c5ec0b360824e/spm_calculator-1.0.0-py3-none-any.whl"
|
|
330
335
|
}
|
|
331
336
|
},
|
|
332
|
-
"policyengine_version": "6.2.
|
|
337
|
+
"policyengine_version": "6.2.2",
|
|
333
338
|
"schema_version": 2
|
|
334
339
|
}
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"schema:url": "https://policyengine.org"
|
|
19
19
|
},
|
|
20
20
|
"schema:dateCreated": "2026-08-18T14:20:32.100961Z",
|
|
21
|
-
"schema:description": "TRACE TRO for certified runtime bundle uk-6.2.
|
|
21
|
+
"schema:description": "TRACE TRO for certified runtime bundle uk-6.2.2 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
|
|
22
22
|
"schema:name": "policyengine uk certified bundle TRO",
|
|
23
23
|
"trov:createdWith": {
|
|
24
24
|
"@type": "schema:SoftwareApplication",
|
|
25
25
|
"schema:name": "policyengine",
|
|
26
|
-
"schema:softwareVersion": "6.2.
|
|
26
|
+
"schema:softwareVersion": "6.2.2"
|
|
27
27
|
},
|
|
28
28
|
"trov:hasArrangement": [
|
|
29
29
|
{
|
|
30
30
|
"@id": "arrangement/1",
|
|
31
31
|
"@type": "trov:ArtifactArrangement",
|
|
32
|
-
"rdfs:comment": "Certified arrangement for bundle uk-6.2.
|
|
32
|
+
"rdfs:comment": "Certified arrangement for bundle uk-6.2.2.",
|
|
33
33
|
"trov:hasArtifactLocation": [
|
|
34
34
|
{
|
|
35
35
|
"@id": "arrangement/1/location/bundle_manifest",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@type": "trov:ResearchArtifact",
|
|
76
76
|
"schema:name": "policyengine.py bundle manifest for uk",
|
|
77
77
|
"trov:mimeType": "application/json",
|
|
78
|
-
"trov:sha256": "
|
|
78
|
+
"trov:sha256": "f7563d813c99ae69da849631d57e498703ce338490aac1a17f127e17c15d6f5f"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"@id": "composition/1/artifact/data_release_manifest",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"trov:hasFingerprint": {
|
|
103
103
|
"@id": "composition/1/fingerprint",
|
|
104
104
|
"@type": "trov:CompositionFingerprint",
|
|
105
|
-
"trov:sha256": "
|
|
105
|
+
"trov:sha256": "ac5ce54dbdff4fc4aeeb67f89a3ec0455b8bda26c87a5744adf34d5a77fe6c97"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"trov:hasPerformance": {
|