policyengine 6.2.6__tar.gz → 6.3.0__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.6 → policyengine-6.3.0}/CHANGELOG.md +14 -0
- {policyengine-6.2.6/src/policyengine.egg-info → policyengine-6.3.0}/PKG-INFO +1 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/households.md +5 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/reforms.md +13 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/pyproject.toml +1 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/bundle/manifest.json +10 -10
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/bundle/uk.trace.tro.jsonld +5 -5
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/bundle/us.trace.tro.jsonld +5 -5
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/reform.py +50 -9
- policyengine-6.3.0/src/policyengine/tax_benefit_models/uk/budget_reform_contract.py +2021 -0
- policyengine-6.3.0/src/policyengine/tax_benefit_models/uk/budget_reform_population.py +353 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/uk/household.py +14 -5
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/uk/model.py +36 -15
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/parametric_reforms.py +18 -4
- {policyengine-6.2.6 → policyengine-6.3.0/src/policyengine.egg-info}/PKG-INFO +1 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine.egg-info/SOURCES.txt +4 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_dict_reforms_on_simulation.py +98 -2
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_household_impact.py +1 -2
- policyengine-6.3.0/tests/test_uk_budget_reform_contract.py +570 -0
- policyengine-6.3.0/tests/test_uk_dated_reforms.py +305 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/uv.lock +1 -1
- {policyengine-6.2.6 → policyengine-6.3.0}/.claude/policyengine-guide.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.claude/quick-reference.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/CONTRIBUTING.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/bump_version.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/capture-version.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/changelog_template.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/check-changelog.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/copilot-instructions.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/dispatch-policyengine-release.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/fetch_version.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/get-changelog-diff.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/has-functional-changes.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/publish-git-tag.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/wait-for-pypi.sh +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/workflows/draft-pdf.yml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/workflows/pr_code_changes.yaml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/workflows/pr_docs_changes.yaml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.github/workflows/push.yaml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.gitignore +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/.python-version +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/AGENTS.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/CITATION.cff +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/CLAUDE.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/CODE_OF_CONDUCT.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/CONTRIBUTING.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/LICENSE +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/Makefile +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/README.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/architecture.png +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/architecture.svg +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/changelog.d/.gitkeep +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/.gitignore +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/_generator/README.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/_generator/build_reference.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/_quarto.yml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/bundles.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/countries.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/data-publishing-design.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/decile-impact-spec.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/dev.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/runbooks/acs-local-wic-replacement.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/runbooks/build-m-us-populace-certification.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/runbooks/canonical-spm-development.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/skills/README.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/skills/data-certification.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/engineering/skills/repository-guidance.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/examples.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/getting-started.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/impact-analysis.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/index.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/methodology/index.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/methodology/model-architecture.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/methodology/us-health-costs.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/microsim.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/outputs.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/programs/index.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/programs/us-chip.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/reference/index.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/regions.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/release-bundles.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/run-records.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/trace-case-study.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/docs/visualisation.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/belgium_axiom_pilot.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/employment_income_variation_uk.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/employment_income_variation_us.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/household_impact_example.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/income_bands_uk.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/income_distribution_us.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/paper_repro_uk.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/policy_change_uk.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/speedtest_us_simulation.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/examples/us_budgetary_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/paper-preview.html +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/paper.bib +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/paper.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/bundle.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/certify_data_release.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/check_data_staleness.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/check_native_spm_loading.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/check_release_credentials.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/export_bundle_release_assets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/generate_bundle_artifacts.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/generate_trace_tros.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/prepare_package_bundle_update.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/release_lock.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/scripts/spm_bundle.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/setup.cfg +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/bundle.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/cli.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/cache.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/dataset.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/dynamic.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/output.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/parameter.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/parameter_node.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/parameter_value.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/policy.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/region.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/run_record.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/scoping_strategy.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/simulation.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/spm.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/tax_benefit_model.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/tax_benefit_model_version.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/core/variable.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/uk/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/uk/regions.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/data/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/data/districts.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/data/places.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/data/states.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/countries/us/regions.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/schemas/trace_tro.schema.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/data/uk_geography_assets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/derivations/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/derivations/narrate.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/derivations/trace.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/graph/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/graph/extractor.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/graph/graph.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/aggregate.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/change_aggregate.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/cliff_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/congressional_district_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/constituency_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/decile_analysis.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/decile_grouping.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/decile_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/extra_variables.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/inequality.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/intra_decile_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/labor_supply_response.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/local_authority_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/poverty.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/program_statistics.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/uk_geography_assets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/outputs/uk_geography_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/bundle_validation.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/certification.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/dataset_materialization.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/manifest.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/pyproject_pins.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/spm_configuration.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/trace.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/verify.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/provenance/zenodo.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/results/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/results/schema.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/results/trace_tro.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/results/tracking.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/be/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/be/datasets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/be/model.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/axes.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/extra_variables.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/household.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/model_version.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/result.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/uk/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/uk/analysis.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/uk/datasets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/analysis.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/datasets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/household.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/legacy_inputs.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/model.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/us/spm.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/dates.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/design.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/entity_utils.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/errors.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/hashing.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/household_validation.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/parameter_labels.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/utils/plotting.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine.egg-info/dependency_links.txt +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine.egg-info/entry_points.txt +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine.egg-info/requires.txt +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine.egg-info/top_level.txt +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/conftest.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/filtering_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/uk_model_surface.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/us_married_two_kids_high_income.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/us_model_surface.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/us_single_adult_employment_income.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/us_single_adult_no_income.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/household_calculator_snapshots/us_single_parent_one_child.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/parameter_labels_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/parametric_reforms_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/poverty_by_demographics_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/region_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/release_tros/README.md +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/release_tros/country-models.lock.toml +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/release_tros/manifest.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/release_tros/us-release_manifest.json +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/release_tros/us.trace.tro.jsonld +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/spm_development.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/us_reform_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/fixtures/variable_label_fixtures.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_aggregate.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_be_axiom_pilot.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_budgetary_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_bump_version.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_bundle.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_bundle_metadata.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_cache.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_certify_data_release.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_change_aggregate.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_cliff_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_cliff_impact_analysis.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_congressional_district_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_constituency_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_dataset_materialization.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_dataset_persistence.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_dataset_runtime.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_dataset_source.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_decile_grouping.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_derivations.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_entity_mapping.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_entity_utils.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_entity_utils_characterization.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_errors.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_extra_variables.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_filtering.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_generate_trace_tros.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_graph/__init__.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_graph/conftest.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_graph/test_extractor.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_household_calculator_snapshot.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_inequality.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_intra_decile_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_labor_supply_response.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_local_authority_impact.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_manifest_version_mismatch.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_models.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_pandas3_compatibility.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_parameter_labels.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_parameter_nodes.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_parameter_values.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_parametric_reforms.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_poverty.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_poverty_by_demographics.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_poverty_run.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_preservation_mirror.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_program_statistics.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_pyproject_pins.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_region.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_region_group_strategy.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_release_credentials.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_release_lock.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_release_manifests.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_release_tro_generation.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_results.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_run_record.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_scoping_strategy.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_small_follow_ups.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_bundle_bootstrap.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_bundle_tooling.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_decile.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_development_authentication.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_household.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_model.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_selection.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_spm_selection_schema.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_trace_tro.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_trace_tro_verify.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_uk_analysis.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_uk_geography_assets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_uk_program_statistics.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_uk_regions.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_uk_year_file_data_year.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_legacy_inputs.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_legacy_inputs_integration.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_long_term_datasets.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_microsim_structural_reforms.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_native_alignment.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_native_hdf_weights.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_program_statistics.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_reform_application.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_us_regions.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_variable_labels.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_variable_metadata.py +0 -0
- {policyengine-6.2.6 → policyengine-6.3.0}/tests/test_zenodo_mirror.py +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [6.3.0] - 2026-10-12
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- Added the UK Budget reform contract (`policyengine.tax_benefit_models.uk.budget_reform_contract`), version 1.0.0. `run_budget_reform_contract()` checks that dated reforms (an April rate change, a finite change, an extended freeze, an April uprating schedule, a mid-year blended rate, a CPI-driven indexation change, a scenario or policy combining a parameter-setting modifier with dated changes, an unknown path, and each route's documented key readings) give independently derived results through the policyengine-uk and policyengine.py routes, leave the baseline and later unreformed runs unchanged, and survive bounded property sampling. It returns a JSON report for release qualification.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## [6.2.7] - 2026-10-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Align UK household and population reform routes with policy effective dates and inclusive date intervals, reject ambiguous bare-year keys, and pass parameter reforms at country-model construction so dated changes are reprocessed when supported by policyengine-uk. A UK policy or dynamic carrying both parameter values and a simulation modifier (as a `Policy` or `Dynamic` sum does) now applies its values and then its modifier, where the modifier used to replace the values.
|
|
13
|
+
|
|
14
|
+
|
|
1
15
|
## [6.2.6] - 2026-10-10
|
|
2
16
|
|
|
3
17
|
### Changed
|
|
@@ -150,7 +150,7 @@ Scale parameters use bracket indexing:
|
|
|
150
150
|
reform = {"gov.irs.credits.ctc.amount.base[0].amount": 3_000}
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
Time-varying reforms use a nested dict of
|
|
153
|
+
Time-varying reforms use a nested dict of date keys to values:
|
|
154
154
|
|
|
155
155
|
```python
|
|
156
156
|
reform = {
|
|
@@ -161,6 +161,10 @@ reform = {
|
|
|
161
161
|
}
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
For UK households, a `YYYY-MM-DD` key is effective from that date until the next value for the same parameter, or December 31, 2100 if no later value follows. A `YYYY-MM-DD.YYYY-MM-DD` key applies over that inclusive interval. Scalar values default to January 1 of `year`.
|
|
165
|
+
|
|
166
|
+
UK households reject bare years such as `"2027"` or `2027`, because the underlying packages assign different meanings to them. Use `"2027-04-06.2028-04-05"` for one UK fiscal year or `"2027-01-01"` for an effective date. See [Reforms](reforms.md) for the shared `Simulation(policy=...)` and `Simulation(dynamic=...)` date contract. The US household route retains its country package's period-key handling.
|
|
167
|
+
|
|
164
168
|
Structural reforms (new variables, formula swaps) require the `Simulation` path — see [Reforms](reforms.md).
|
|
165
169
|
|
|
166
170
|
## Year
|
|
@@ -29,7 +29,19 @@ reform = {
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
A `YYYY-MM-DD` key is an effective date: its value applies from that date until the next date in the same parameter's reform schedule. If no later value follows, the wrapper emits an interval ending on December 31, 2100.
|
|
33
|
+
|
|
34
|
+
Use `YYYY-MM-DD.YYYY-MM-DD` for an inclusive interval. For example, this UK reform applies for fiscal year 2027 only:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
reform = {
|
|
38
|
+
"gov.hmrc.income_tax.rates.uk[0].rate": {
|
|
39
|
+
"2027-04-06.2028-04-05": 0.21,
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`Simulation(policy=...)`, `Simulation(dynamic=...)`, and UK `calculate_household(reform=...)` accept these two date formats and reject an interval whose end precedes its start. They reject bare years such as `"2027"` or `2027`, because policyengine-uk reads them as fiscal year 2027 only, while policyengine-core's `Reform.from_dict` reads them as from 2027 onward. Use `"2027-04-06.2028-04-05"` for one UK fiscal year or `"2027-01-01"` for an effective date. The US household route retains its country package's period-key handling.
|
|
33
45
|
|
|
34
46
|
### Multiple changes
|
|
35
47
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundle_version": "6.
|
|
2
|
+
"bundle_version": "6.3.0",
|
|
3
3
|
"citation": {
|
|
4
4
|
"publisher": "PolicyEngine",
|
|
5
|
-
"title": "PolicyEngine bundle 6.
|
|
5
|
+
"title": "PolicyEngine bundle 6.3.0",
|
|
6
6
|
"type": "software-bundle",
|
|
7
|
-
"version": "6.
|
|
7
|
+
"version": "6.3.0"
|
|
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.
|
|
20
|
+
"bundle_id": "uk-6.3.0",
|
|
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.125.1",
|
|
100
100
|
"wheel_url": "https://files.pythonhosted.org/packages/ec/3a/1d90bad4346d1a8c2715be211ed3d3d7f48917da0d90405b8257b7304091/policyengine_uk-2.125.1-py3-none-any.whl"
|
|
101
101
|
},
|
|
102
|
-
"policyengine_version": "6.
|
|
102
|
+
"policyengine_version": "6.3.0",
|
|
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.
|
|
115
|
+
"bundle_id": "us-6.3.0",
|
|
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.
|
|
220
|
+
"policyengine_version": "6.3.0",
|
|
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.
|
|
298
|
+
"install_requirement": "policyengine==6.3.0",
|
|
299
299
|
"name": "policyengine",
|
|
300
300
|
"role": "bundle_carrier",
|
|
301
|
-
"version": "6.
|
|
301
|
+
"version": "6.3.0"
|
|
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.
|
|
337
|
+
"policyengine_version": "6.3.0",
|
|
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.
|
|
21
|
+
"schema:description": "TRACE TRO for certified runtime bundle uk-6.3.0 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.
|
|
26
|
+
"schema:softwareVersion": "6.3.0"
|
|
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.
|
|
32
|
+
"rdfs:comment": "Certified arrangement for bundle uk-6.3.0.",
|
|
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": "5880d61838b08e6e0aa94c5ff8b6b0806892efae4f0a1c262319b9ce722dff13"
|
|
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": "5a84f161fc95544ff2d6d8bfbcc3e8dd10e8573b8bc7e3b9b876b9f1b115d703"
|
|
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.
|
|
20
|
+
"schema:description": "TRACE TRO for certified runtime bundle us-6.3.0 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.
|
|
25
|
+
"schema:softwareVersion": "6.3.0"
|
|
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.
|
|
31
|
+
"rdfs:comment": "Certified arrangement for bundle us-6.3.0.",
|
|
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": "5880d61838b08e6e0aa94c5ff8b6b0806892efae4f0a1c262319b9ce722dff13"
|
|
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": "c5765f37db02194b84a3100e16426431eded1862eb1332855db27507eca18248"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"trov:hasPerformance": {
|
{policyengine-6.2.6 → policyengine-6.3.0}/src/policyengine/tax_benefit_models/common/reform.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Compile a simple reform dict into
|
|
1
|
+
"""Compile a simple reform dict into country-model inputs or parameter values.
|
|
2
2
|
|
|
3
3
|
Accepted shapes for the agent-facing API:
|
|
4
4
|
|
|
@@ -10,6 +10,13 @@ Accepted shapes for the agent-facing API:
|
|
|
10
10
|
# With explicit effective date(s).
|
|
11
11
|
reform = {"gov.irs.deductions.salt.cap": {"2026-01-01": 0}}
|
|
12
12
|
|
|
13
|
+
# With an inclusive start and end date.
|
|
14
|
+
reform = {
|
|
15
|
+
"gov.hmrc.income_tax.rates.uk[0].rate": {
|
|
16
|
+
"2027-04-06.2028-04-05": 0.21,
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
# Multiple parameters.
|
|
14
21
|
reform = {
|
|
15
22
|
"gov.irs.deductions.salt.cap": 0,
|
|
@@ -25,9 +32,17 @@ the top-bracket SS wage base is ``gov.ssa.payroll.cap``. If a reform
|
|
|
25
32
|
dict uses the bracket-head path instead of ``[0].amount`` the
|
|
26
33
|
``ValueError`` will list the close match.
|
|
27
34
|
|
|
28
|
-
The
|
|
29
|
-
``
|
|
30
|
-
``
|
|
35
|
+
The parameter-value compiler accepts ``YYYY-MM-DD`` as an effective date
|
|
36
|
+
with no end date, or ``YYYY-MM-DD.YYYY-MM-DD`` as an inclusive interval.
|
|
37
|
+
Months and days may be unpadded (``2027-4-6``), as ``strptime`` reads them.
|
|
38
|
+
Other keys, including bare years, are rejected: policyengine-uk interprets
|
|
39
|
+
a bare year as one fiscal year, while policyengine-core interprets it as
|
|
40
|
+
an effective year continuing onward. Use ``2027-04-06.2028-04-05`` for one
|
|
41
|
+
UK fiscal year, or ``2027-01-01`` for an effective date.
|
|
42
|
+
|
|
43
|
+
The low-level :func:`compile_reform` returns ``{param_path: {period: value}}``
|
|
44
|
+
without interpreting period keys. Parameter-value routes convert values
|
|
45
|
+
to explicit intervals before passing them to the country model.
|
|
31
46
|
|
|
32
47
|
Scalar reforms default to ``{year}-01-01`` so a caller running
|
|
33
48
|
mid-year does not accidentally get a blended partial-year result.
|
|
@@ -103,8 +118,8 @@ def _reform_dict_to_parameter_values(
|
|
|
103
118
|
"""Compile a flat reform dict into a list of ``ParameterValue`` objects.
|
|
104
119
|
|
|
105
120
|
Uses :func:`compile_reform` for path validation and effective-date
|
|
106
|
-
defaulting, then materialises each
|
|
107
|
-
as
|
|
121
|
+
defaulting, then materialises each effective date or inclusive interval
|
|
122
|
+
as a ``ParameterValue`` bound to a
|
|
108
123
|
``Parameter(name=path, tax_benefit_model_version=model_version)``.
|
|
109
124
|
"""
|
|
110
125
|
from policyengine.core.parameter import Parameter
|
|
@@ -117,6 +132,32 @@ def _reform_dict_to_parameter_values(
|
|
|
117
132
|
parameter_values: list[ParameterValue] = []
|
|
118
133
|
for path, date_to_value in compiled.items():
|
|
119
134
|
for effective_date, value in date_to_value.items():
|
|
135
|
+
try:
|
|
136
|
+
parts = str(effective_date).split(".")
|
|
137
|
+
if len(parts) > 2:
|
|
138
|
+
raise ValueError("Too many dates")
|
|
139
|
+
start_date = datetime.datetime.strptime(parts[0], "%Y-%m-%d")
|
|
140
|
+
end_date = (
|
|
141
|
+
datetime.datetime.strptime(parts[1], "%Y-%m-%d")
|
|
142
|
+
if len(parts) == 2
|
|
143
|
+
else None
|
|
144
|
+
)
|
|
145
|
+
except ValueError as exc:
|
|
146
|
+
raise ValueError(
|
|
147
|
+
f"Invalid reform date key {effective_date!r}. Accepted formats are "
|
|
148
|
+
"'YYYY-MM-DD' (effective date) and "
|
|
149
|
+
"'YYYY-MM-DD.YYYY-MM-DD' (inclusive interval); months and "
|
|
150
|
+
"days may be unpadded. Bare years are "
|
|
151
|
+
"ambiguous: policyengine-uk's reform dict reads '2027' as fiscal "
|
|
152
|
+
"year 2027 only, while policyengine-core's Reform.from_dict "
|
|
153
|
+
"reads it as from 2027 on. Use '2027-04-06.2028-04-05' for one "
|
|
154
|
+
"UK fiscal year, or '2027-01-01' for an effective date."
|
|
155
|
+
) from exc
|
|
156
|
+
if end_date is not None and end_date < start_date:
|
|
157
|
+
raise ValueError(
|
|
158
|
+
f"Reform interval {effective_date!r} has an end date before "
|
|
159
|
+
"its start date."
|
|
160
|
+
)
|
|
120
161
|
data_type = type(value) if isinstance(value, (int, float, bool)) else float
|
|
121
162
|
parameter_values.append(
|
|
122
163
|
ParameterValue(
|
|
@@ -125,8 +166,8 @@ def _reform_dict_to_parameter_values(
|
|
|
125
166
|
tax_benefit_model_version=model_version,
|
|
126
167
|
data_type=data_type,
|
|
127
168
|
),
|
|
128
|
-
start_date=
|
|
129
|
-
end_date=
|
|
169
|
+
start_date=start_date,
|
|
170
|
+
end_date=end_date,
|
|
130
171
|
value=value,
|
|
131
172
|
)
|
|
132
173
|
)
|
|
@@ -160,7 +201,7 @@ def compile_reform_to_policy(
|
|
|
160
201
|
"""Compile a flat reform dict into a fully-assembled ``Policy``.
|
|
161
202
|
|
|
162
203
|
Accepts the same ``{param.path: value}`` /
|
|
163
|
-
``{param.path: {
|
|
204
|
+
``{param.path: {date_or_interval: value}}`` shape as :func:`compile_reform`,
|
|
164
205
|
but returns a ready-to-use ``Policy`` with ``ParameterValue``
|
|
165
206
|
objects so ``Simulation(policy={...})`` works without hand-building
|
|
166
207
|
``Parameter`` / ``ParameterValue``.
|