policyengine 6.3.2__tar.gz → 6.3.3__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.3.2 → policyengine-6.3.3}/CHANGELOG.md +7 -0
- {policyengine-6.3.2/src/policyengine.egg-info → policyengine-6.3.3}/PKG-INFO +1 -1
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/microsim.md +43 -9
- {policyengine-6.3.2 → policyengine-6.3.3}/pyproject.toml +1 -1
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/bundle/manifest.json +10 -10
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/bundle/uk.trace.tro.jsonld +5 -5
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/bundle/us.trace.tro.jsonld +5 -5
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/datasets.py +57 -40
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/legacy_inputs.py +230 -12
- {policyengine-6.3.2 → policyengine-6.3.3/src/policyengine.egg-info}/PKG-INFO +1 -1
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine.egg-info/SOURCES.txt +1 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_legacy_inputs_integration.py +198 -0
- policyengine-6.3.3/tests/test_us_year_file_stamp.py +1012 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/uv.lock +1 -1
- {policyengine-6.3.2 → policyengine-6.3.3}/.claude/policyengine-guide.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.claude/quick-reference.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/CONTRIBUTING.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/bump_version.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/capture-version.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/changelog_template.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/check-changelog.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/copilot-instructions.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/dispatch-policyengine-release.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/fetch_version.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/get-changelog-diff.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/has-functional-changes.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/publish-git-tag.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/wait-for-pypi.sh +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/workflows/draft-pdf.yml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/workflows/pr_code_changes.yaml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/workflows/pr_docs_changes.yaml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.github/workflows/push.yaml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.gitignore +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/.python-version +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/AGENTS.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/CITATION.cff +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/CLAUDE.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/CODE_OF_CONDUCT.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/CONTRIBUTING.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/LICENSE +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/Makefile +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/README.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/architecture.png +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/architecture.svg +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/changelog.d/.gitkeep +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/.gitignore +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/_generator/README.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/_generator/build_reference.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/_quarto.yml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/bundles.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/countries.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/data-publishing-design.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/decile-impact-spec.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/dev.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/runbooks/acs-local-wic-replacement.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/runbooks/build-m-us-populace-certification.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/runbooks/canonical-spm-development.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/skills/README.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/skills/data-certification.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/engineering/skills/repository-guidance.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/examples.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/getting-started.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/households.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/impact-analysis.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/index.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/methodology/index.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/methodology/model-architecture.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/methodology/us-health-costs.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/outputs.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/programs/index.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/programs/us-chip.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/reference/index.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/reforms.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/regions.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/release-bundles.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/run-records.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/trace-case-study.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/docs/visualisation.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/belgium_axiom_pilot.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/employment_income_variation_uk.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/employment_income_variation_us.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/household_impact_example.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/income_bands_uk.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/income_distribution_us.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/paper_repro_uk.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/policy_change_uk.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/speedtest_us_simulation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/examples/us_budgetary_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/paper-preview.html +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/paper.bib +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/paper.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/bundle.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/certify_data_release.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/check_data_staleness.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/check_native_spm_loading.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/check_release_credentials.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/export_bundle_release_assets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/generate_bundle_artifacts.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/generate_trace_tros.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/prepare_package_bundle_update.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/release_lock.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/scripts/spm_bundle.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/setup.cfg +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/bundle.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/cli.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/cache.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/dataset.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/dynamic.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/output.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/parameter.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/parameter_node.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/parameter_value.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/policy.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/region.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/run_record.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/scoping_strategy.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/simulation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/spm.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/tax_benefit_model.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/tax_benefit_model_version.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/core/variable.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/uk/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/uk/regions.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/data/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/data/districts.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/data/places.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/data/states.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/countries/us/regions.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/schemas/trace_tro.schema.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/data/uk_geography_assets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/derivations/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/derivations/narrate.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/derivations/trace.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/graph/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/graph/extractor.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/graph/graph.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/aggregate.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/change_aggregate.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/cliff_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/congressional_district_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/constituency_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/decile_analysis.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/decile_grouping.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/decile_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/extra_variables.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/inequality.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/intra_decile_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/labor_supply_response.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/local_authority_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/poverty.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/program_statistics.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/uk_geography_assets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/outputs/uk_geography_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/bundle_validation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/certification.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/dataset_materialization.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/manifest.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/pyproject_pins.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/spm_configuration.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/trace.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/verify.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/provenance/zenodo.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/results/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/results/schema.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/results/trace_tro.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/results/tracking.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/be/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/be/datasets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/be/model.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/axes.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/extra_variables.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/household.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/model_version.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/reform.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/common/result.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/analysis.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/budget_reform_contract.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/budget_reform_population.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/datasets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/household.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/uk/model.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/analysis.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/household.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/model.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/spm.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/dates.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/design.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/entity_utils.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/errors.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/hashing.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/household_validation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/parameter_labels.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/parametric_reforms.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/utils/plotting.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine.egg-info/dependency_links.txt +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine.egg-info/entry_points.txt +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine.egg-info/requires.txt +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine.egg-info/top_level.txt +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/conftest.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/filtering_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/uk_model_surface.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/us_married_two_kids_high_income.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/us_model_surface.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/us_single_adult_employment_income.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/us_single_adult_no_income.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/household_calculator_snapshots/us_single_parent_one_child.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/parameter_labels_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/parametric_reforms_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/poverty_by_demographics_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/region_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/release_tros/README.md +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/release_tros/country-models.lock.toml +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/release_tros/manifest.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/release_tros/us-release_manifest.json +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/release_tros/us.trace.tro.jsonld +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/spm_development.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/us_reform_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/fixtures/variable_label_fixtures.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_aggregate.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_be_axiom_pilot.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_budgetary_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_bump_version.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_bundle.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_bundle_metadata.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_cache.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_certify_data_release.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_change_aggregate.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_cliff_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_cliff_impact_analysis.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_congressional_district_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_constituency_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_dataset_materialization.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_dataset_persistence.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_dataset_runtime.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_dataset_source.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_decile_grouping.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_derivations.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_dict_reforms_on_simulation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_entity_mapping.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_entity_utils.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_entity_utils_characterization.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_errors.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_extra_variables.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_filtering.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_generate_trace_tros.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_graph/__init__.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_graph/conftest.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_graph/test_extractor.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_household_calculator_snapshot.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_household_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_inequality.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_intra_decile_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_labor_supply_response.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_local_authority_impact.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_manifest_version_mismatch.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_models.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_pandas3_compatibility.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_parameter_labels.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_parameter_nodes.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_parameter_values.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_parametric_reforms.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_poverty.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_poverty_by_demographics.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_poverty_run.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_preservation_mirror.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_program_statistics.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_pyproject_pins.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_region.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_region_group_strategy.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_release_credentials.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_release_lock.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_release_manifests.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_release_tro_generation.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_results.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_run_record.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_scoping_strategy.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_small_follow_ups.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_bundle_bootstrap.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_bundle_tooling.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_decile.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_development_authentication.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_household.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_model.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_selection.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_spm_selection_schema.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_trace_tro.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_trace_tro_verify.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_analysis.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_budget_reform_contract.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_dated_reforms.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_geography_assets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_program_statistics.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_regions.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_uk_year_file_data_year.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_legacy_inputs.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_long_term_datasets.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_microsim_structural_reforms.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_native_alignment.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_native_hdf_weights.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_program_statistics.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_reform_application.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_us_regions.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_variable_labels.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_variable_metadata.py +0 -0
- {policyengine-6.3.2 → policyengine-6.3.3}/tests/test_zenodo_mirror.py +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [6.3.3] - 2026-10-13
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- `create_datasets` stamps each US year file with the register of renamed stored inputs it was cut under and a year-file format revision. `ensure_datasets` creates a year file again, and `load_datasets` refuses it, unless its stamp matches this release exactly. A year file cut before a rename was registered, which may have lost that input, is therefore not reused. `load_datasets` says why it refuses a file, naming the renames the file may lack when its register is the reason. Year files written before the stamp existed are created again once.
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
## [6.3.2] - 2026-10-12
|
|
2
9
|
|
|
3
10
|
### Changed
|
|
@@ -401,15 +401,49 @@ The renames applied are recorded as `{old: new}` (`{}` when none applied):
|
|
|
401
401
|
carried the draw: data that stores neither name runs with the new input's
|
|
402
402
|
default, which for WIC is full take-up.
|
|
403
403
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
404
|
+
A saved US output written before this mapping existed has no record and may
|
|
405
|
+
have been calculated without the mapped inputs, so `load()` refuses it, and
|
|
406
|
+
`ensure()` runs the simulation again and saves the new output. Saved outputs
|
|
407
|
+
are checked only for the record, not for the register they were calculated
|
|
408
|
+
under.
|
|
409
|
+
|
|
410
|
+
### Year files
|
|
411
|
+
|
|
412
|
+
`create_datasets` stamps each year file, after writing everything else, with
|
|
413
|
+
the register it was cut under and a year-file format revision
|
|
414
|
+
(`legacy_inputs.YEAR_FILE_STAMP_H5_DATASET`, UTF-8 JSON
|
|
415
|
+
`{"register": {old: new, ...}, "revision": 1}`). `ensure_datasets` reuses a
|
|
416
|
+
year file only when its stamp equals this release's exactly and its renames
|
|
417
|
+
record lists only renames in the stamped register. Otherwise it logs why and
|
|
418
|
+
creates the year files again; `load_datasets` refuses the file with the same
|
|
419
|
+
reason, which names the renames the file may lack when its register is the
|
|
420
|
+
cause. To decide, both read only the stamp and the record, never the tables
|
|
421
|
+
or the source dataset. `legacy_inputs.year_file_stamp_problem(path)` returns
|
|
422
|
+
the reason, or `None` for a current year file.
|
|
423
|
+
|
|
424
|
+
A year file is out of date when:
|
|
425
|
+
|
|
426
|
+
- it has no stamp. Year files that policyengine.py 6.1.1 and earlier cut,
|
|
427
|
+
with policyengine-us 2.x, from a source storing the draw only as
|
|
428
|
+
`would_claim_wic` (such as the certified default) store neither WIC take-up
|
|
429
|
+
name, so the draw is lost from them. Year files written with the renames
|
|
430
|
+
record but before the stamp are cut again once, and so is a year file whose
|
|
431
|
+
write did not finish;
|
|
432
|
+
- its register lacks an entry this release has. It may have lost that
|
|
433
|
+
entry's input, as the older files lost the WIC draw;
|
|
434
|
+
- its register has an entry this release lacks, or maps an old name to
|
|
435
|
+
another new name. It may store a new name this release's engine does not
|
|
436
|
+
define, and a run skips any column the engine does not define;
|
|
437
|
+
- it has another format revision, or its stamp or record cannot be read.
|
|
438
|
+
|
|
439
|
+
So any change to `LEGACY_INPUT_RENAMES` makes every year file out of date,
|
|
440
|
+
and two policyengine.py versions with different registers that share a data
|
|
441
|
+
folder cut each other's year files again. `ensure_datasets` raises, rather
|
|
442
|
+
than cutting the files again, when a year file cannot be opened for reasons
|
|
443
|
+
unrelated to its contents: no permission, a directory at its path, or a lock
|
|
444
|
+
held by another process. A year file opened directly, as
|
|
445
|
+
`PolicyEngineUSDataset(filepath=...)`, is not checked, and saving it again with
|
|
446
|
+
`save()` drops its stamp.
|
|
413
447
|
|
|
414
448
|
## Pinned model versions
|
|
415
449
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundle_version": "6.3.
|
|
2
|
+
"bundle_version": "6.3.3",
|
|
3
3
|
"citation": {
|
|
4
4
|
"publisher": "PolicyEngine",
|
|
5
|
-
"title": "PolicyEngine bundle 6.3.
|
|
5
|
+
"title": "PolicyEngine bundle 6.3.3",
|
|
6
6
|
"type": "software-bundle",
|
|
7
|
-
"version": "6.3.
|
|
7
|
+
"version": "6.3.3"
|
|
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.58.0",
|
|
20
|
-
"bundle_id": "uk-6.3.
|
|
20
|
+
"bundle_id": "uk-6.3.3",
|
|
21
21
|
"certification": {
|
|
22
22
|
"built_with_model_git_sha": "4cbedbecca352f52dffe47e849553c2759a00711",
|
|
23
23
|
"built_with_model_version": "2.122.2",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"version": "2.126.12",
|
|
100
100
|
"wheel_url": "https://files.pythonhosted.org/packages/4f/3f/0a611e9b25beb75db3f2f521d359eabad0d1ab4e50194b866663355591ff/policyengine_uk-2.126.12-py3-none-any.whl"
|
|
101
101
|
},
|
|
102
|
-
"policyengine_version": "6.3.
|
|
102
|
+
"policyengine_version": "6.3.3",
|
|
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.3.
|
|
115
|
+
"bundle_id": "us-6.3.3",
|
|
116
116
|
"certification": {
|
|
117
117
|
"built_with_model_version": "2.2.1",
|
|
118
118
|
"certified_by": "policyengine.py bundle certification",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"version": "2.2.1",
|
|
218
218
|
"wheel_url": "https://files.pythonhosted.org/packages/5e/09/86ac3968d2a18e28fce3ba1186fc21728e9f299b96a806d6f204f1e0aaed/policyengine_us-2.2.1-py3-none-any.whl"
|
|
219
219
|
},
|
|
220
|
-
"policyengine_version": "6.3.
|
|
220
|
+
"policyengine_version": "6.3.3",
|
|
221
221
|
"region_datasets": {
|
|
222
222
|
"congressional_district": {
|
|
223
223
|
"path_template": "populace_us_2024_acs_local.h5"
|
|
@@ -295,10 +295,10 @@
|
|
|
295
295
|
"packages": {
|
|
296
296
|
"policyengine": {
|
|
297
297
|
"import_name": "policyengine",
|
|
298
|
-
"install_requirement": "policyengine==6.3.
|
|
298
|
+
"install_requirement": "policyengine==6.3.3",
|
|
299
299
|
"name": "policyengine",
|
|
300
300
|
"role": "bundle_carrier",
|
|
301
|
-
"version": "6.3.
|
|
301
|
+
"version": "6.3.3"
|
|
302
302
|
},
|
|
303
303
|
"policyengine-core": {
|
|
304
304
|
"import_name": "policyengine_core",
|
|
@@ -334,6 +334,6 @@
|
|
|
334
334
|
"wheel_url": "https://files.pythonhosted.org/packages/19/a0/c484f69a0ebf88a9b9fd0ac28176f8df66550f46714f1b0c5ec0b360824e/spm_calculator-1.0.0-py3-none-any.whl"
|
|
335
335
|
}
|
|
336
336
|
},
|
|
337
|
-
"policyengine_version": "6.3.
|
|
337
|
+
"policyengine_version": "6.3.3",
|
|
338
338
|
"schema_version": 2
|
|
339
339
|
}
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"schema:url": "https://policyengine.org"
|
|
19
19
|
},
|
|
20
20
|
"schema:dateCreated": "2026-10-07T17:31:53.189867Z",
|
|
21
|
-
"schema:description": "TRACE TRO for certified runtime bundle uk-6.3.
|
|
21
|
+
"schema:description": "TRACE TRO for certified runtime bundle uk-6.3.3 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.3.
|
|
26
|
+
"schema:softwareVersion": "6.3.3"
|
|
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.3.
|
|
32
|
+
"rdfs:comment": "Certified arrangement for bundle uk-6.3.3.",
|
|
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": "afae4d8bd8a45f286068273af44746295077a7ff18fce58aa91889f5555467c5"
|
|
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": "222478bcb094597ab206850606909fbf18e4be5c6085d304b406eb85f69fd36d"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"trov:hasPerformance": {
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"schema:name": "PolicyEngine",
|
|
18
18
|
"schema:url": "https://policyengine.org"
|
|
19
19
|
},
|
|
20
|
-
"schema:description": "TRACE TRO for certified runtime bundle us-6.3.
|
|
20
|
+
"schema:description": "TRACE TRO for certified runtime bundle us-6.3.3 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
|
|
21
21
|
"schema:name": "policyengine us certified bundle TRO",
|
|
22
22
|
"trov:createdWith": {
|
|
23
23
|
"@type": "schema:SoftwareApplication",
|
|
24
24
|
"schema:name": "policyengine",
|
|
25
|
-
"schema:softwareVersion": "6.3.
|
|
25
|
+
"schema:softwareVersion": "6.3.3"
|
|
26
26
|
},
|
|
27
27
|
"trov:hasArrangement": [
|
|
28
28
|
{
|
|
29
29
|
"@id": "arrangement/1",
|
|
30
30
|
"@type": "trov:ArtifactArrangement",
|
|
31
|
-
"rdfs:comment": "Certified arrangement for bundle us-6.3.
|
|
31
|
+
"rdfs:comment": "Certified arrangement for bundle us-6.3.3.",
|
|
32
32
|
"trov:hasArtifactLocation": [
|
|
33
33
|
{
|
|
34
34
|
"@id": "arrangement/1/location/bundle_manifest",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@type": "trov:ResearchArtifact",
|
|
75
75
|
"schema:name": "policyengine.py bundle manifest for us",
|
|
76
76
|
"trov:mimeType": "application/json",
|
|
77
|
-
"trov:sha256": "
|
|
77
|
+
"trov:sha256": "afae4d8bd8a45f286068273af44746295077a7ff18fce58aa91889f5555467c5"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"@id": "composition/1/artifact/data_release_manifest",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"trov:hasFingerprint": {
|
|
102
102
|
"@id": "composition/1/fingerprint",
|
|
103
103
|
"@type": "trov:CompositionFingerprint",
|
|
104
|
-
"trov:sha256": "
|
|
104
|
+
"trov:sha256": "4f978b5331c8f9ad391c67d4779c69bde9c4ff3062bfe4c038d0bde462e79dec"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"trov:hasPerformance": {
|
{policyengine-6.3.2 → policyengine-6.3.3}/src/policyengine/tax_benefit_models/us/datasets.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import hashlib
|
|
2
2
|
import importlib.util
|
|
3
3
|
import json
|
|
4
|
+
import logging
|
|
4
5
|
import warnings
|
|
5
6
|
from importlib import metadata as importlib_metadata
|
|
6
7
|
from pathlib import Path
|
|
@@ -31,9 +32,14 @@ from policyengine.tax_benefit_models.us.legacy_inputs import (
|
|
|
31
32
|
pending_legacy_input_renames,
|
|
32
33
|
read_renames_record,
|
|
33
34
|
write_renames_record,
|
|
35
|
+
write_year_file_stamp,
|
|
36
|
+
year_file_stamp,
|
|
37
|
+
year_file_stamp_problem,
|
|
34
38
|
)
|
|
35
39
|
from policyengine.utils.hashing import sha256_file
|
|
36
40
|
|
|
41
|
+
logger = logging.getLogger(__name__)
|
|
42
|
+
|
|
37
43
|
|
|
38
44
|
class USYearData(YearData):
|
|
39
45
|
"""Entity-level data for a single year."""
|
|
@@ -371,6 +377,12 @@ def create_datasets(
|
|
|
371
377
|
) -> dict[str, PolicyEngineUSDataset]:
|
|
372
378
|
"""Create PolicyEngineUSDataset instances from logical dataset names or URLs.
|
|
373
379
|
|
|
380
|
+
Each year file is written to ``{data_folder}/{dataset_stem}_year_{year}.h5``
|
|
381
|
+
and stamped last with the register of renamed stored inputs it was cut
|
|
382
|
+
under and the year-file format revision (see
|
|
383
|
+
``legacy_inputs.YEAR_FILE_STAMP_H5_DATASET``), which ``ensure_datasets``
|
|
384
|
+
and ``load_datasets`` check.
|
|
385
|
+
|
|
374
386
|
Args:
|
|
375
387
|
datasets: List of logical dataset names or HuggingFace dataset URLs
|
|
376
388
|
years: List of years to extract data for
|
|
@@ -394,6 +406,8 @@ def create_datasets(
|
|
|
394
406
|
)
|
|
395
407
|
dataset_stem = source.name
|
|
396
408
|
sim = Microsimulation(dataset=source.path, spm=resolve_spm_selection())
|
|
409
|
+
# The register the mapping below uses, stamped into each year file.
|
|
410
|
+
stamp = year_file_stamp()
|
|
397
411
|
# Map stored inputs the engine has since renamed before extracting,
|
|
398
412
|
# so each year's file stores the live input rather than dropping it.
|
|
399
413
|
legacy_input_renames = apply_legacy_input_renames_to_microsimulation(sim)
|
|
@@ -555,6 +569,9 @@ def create_datasets(
|
|
|
555
569
|
),
|
|
556
570
|
)
|
|
557
571
|
us_dataset.save()
|
|
572
|
+
# Stamp last. ``save()`` truncates the file first, so a year file
|
|
573
|
+
# whose write stopped part-way has no stamp and is cut again.
|
|
574
|
+
write_year_file_stamp(us_dataset.filepath, stamp)
|
|
558
575
|
|
|
559
576
|
dataset_key = f"{dataset_stem}_{year}"
|
|
560
577
|
result[dataset_key] = us_dataset
|
|
@@ -562,16 +579,6 @@ def create_datasets(
|
|
|
562
579
|
return result
|
|
563
580
|
|
|
564
581
|
|
|
565
|
-
def _year_file_records_renames(path: Path) -> bool:
|
|
566
|
-
"""Return whether a year file records the renamed stored inputs mapped.
|
|
567
|
-
|
|
568
|
-
``create_datasets`` writes the record into every year file (``{}`` when
|
|
569
|
-
nothing needed mapping). Files written before it did may have lost a
|
|
570
|
-
renamed input such as the WIC take-up draw.
|
|
571
|
-
"""
|
|
572
|
-
return read_renames_record(path) is not None
|
|
573
|
-
|
|
574
|
-
|
|
575
582
|
def load_datasets(
|
|
576
583
|
datasets: Optional[list[str]] = None,
|
|
577
584
|
years: list[int] = [2024, 2025, 2026, 2027, 2028],
|
|
@@ -579,10 +586,13 @@ def load_datasets(
|
|
|
579
586
|
) -> dict[str, PolicyEngineUSDataset]:
|
|
580
587
|
"""Load PolicyEngineUSDataset instances from saved HDF5 files.
|
|
581
588
|
|
|
582
|
-
A year file
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
589
|
+
A year file is refused unless ``create_datasets`` stamped it with this
|
|
590
|
+
release's register of renamed stored inputs and year-file format revision
|
|
591
|
+
(see ``legacy_inputs.year_file_stamp_problem``). A file cut before a
|
|
592
|
+
register entry was added may have lost that input, as files that
|
|
593
|
+
policyengine.py 6.1.1 and earlier cut from the certified default lost the
|
|
594
|
+
WIC take-up draw. The error says why, and names the renames the file may
|
|
595
|
+
lack when its register is the reason.
|
|
586
596
|
|
|
587
597
|
Args:
|
|
588
598
|
datasets: List of HuggingFace dataset paths (used to derive file names)
|
|
@@ -599,17 +609,14 @@ def load_datasets(
|
|
|
599
609
|
dataset_stem = dataset_logical_name(resolved_dataset)
|
|
600
610
|
for year in years:
|
|
601
611
|
filepath = f"{data_folder}/{dataset_stem}_year_{year}.h5"
|
|
602
|
-
if Path(filepath).exists()
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
"then take WIC up). Regenerate it with ensure_datasets() "
|
|
611
|
-
"or create_datasets()."
|
|
612
|
-
)
|
|
612
|
+
if Path(filepath).exists():
|
|
613
|
+
problem = year_file_stamp_problem(filepath)
|
|
614
|
+
if problem is not None:
|
|
615
|
+
raise ValueError(
|
|
616
|
+
f"US year file {filepath} is out of date: {problem}. "
|
|
617
|
+
"Regenerate it with ensure_datasets() or "
|
|
618
|
+
"create_datasets()."
|
|
619
|
+
)
|
|
613
620
|
us_dataset = PolicyEngineUSDataset(
|
|
614
621
|
name=f"{dataset_stem}-year-{year}",
|
|
615
622
|
description=f"US Dataset for year {year} based on {dataset_stem}",
|
|
@@ -1255,10 +1262,13 @@ def ensure_datasets(
|
|
|
1255
1262
|
) -> dict[str, PolicyEngineUSDataset]:
|
|
1256
1263
|
"""Ensure datasets exist, loading if available or creating if not.
|
|
1257
1264
|
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1265
|
+
Existing year files are reused only when ``create_datasets`` stamped them
|
|
1266
|
+
with this release's register of renamed stored inputs and year-file format
|
|
1267
|
+
revision (see ``legacy_inputs.year_file_stamp_problem``). Only each file's
|
|
1268
|
+
stamp and renames record are read to decide, never its tables or the
|
|
1269
|
+
source dataset. If any year file is missing or out of date, every
|
|
1270
|
+
year file is created again from the source dataset, and each out-of-date
|
|
1271
|
+
file is logged with the reason.
|
|
1262
1272
|
|
|
1263
1273
|
Args:
|
|
1264
1274
|
datasets: List of HuggingFace dataset paths
|
|
@@ -1270,22 +1280,29 @@ def ensure_datasets(
|
|
|
1270
1280
|
"""
|
|
1271
1281
|
datasets = datasets or [get_release_manifest("us").default_dataset]
|
|
1272
1282
|
|
|
1273
|
-
# Check
|
|
1274
|
-
|
|
1283
|
+
# Check that every year file exists and is current. A year file cut
|
|
1284
|
+
# under another register of renamed stored inputs may have lost one, so
|
|
1285
|
+
# it is created again rather than reused.
|
|
1286
|
+
all_current = True
|
|
1275
1287
|
for dataset in datasets:
|
|
1276
1288
|
resolved_dataset = resolve_dataset_reference("us", dataset)
|
|
1277
1289
|
dataset_stem = dataset_logical_name(resolved_dataset)
|
|
1278
1290
|
for year in years:
|
|
1279
1291
|
filepath = Path(f"{data_folder}/{dataset_stem}_year_{year}.h5")
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1292
|
+
if not filepath.exists():
|
|
1293
|
+
all_current = False
|
|
1294
|
+
continue
|
|
1295
|
+
problem = year_file_stamp_problem(filepath)
|
|
1296
|
+
if problem is not None:
|
|
1297
|
+
all_current = False
|
|
1298
|
+
logger.warning(
|
|
1299
|
+
"US year file %s is out of date: %s. Creating the year "
|
|
1300
|
+
"files again.",
|
|
1301
|
+
filepath,
|
|
1302
|
+
problem,
|
|
1303
|
+
)
|
|
1304
|
+
|
|
1305
|
+
if all_current:
|
|
1289
1306
|
return load_datasets(datasets=datasets, years=years, data_folder=data_folder)
|
|
1290
1307
|
else:
|
|
1291
1308
|
return create_datasets(
|