policyengine-core 3.34.9__tar.gz → 3.35.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_core-3.34.9 → policyengine_core-3.35.0}/CHANGELOG.md +14 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/PKG-INFO +1 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/data_storage.md +14 -0
- policyengine_core-3.35.0/docs/python_api/simulations.md +51 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/branches.md +12 -4
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_storage/in_memory_storage.py +3 -14
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_storage/on_disk_storage.py +71 -7
- policyengine_core-3.35.0/policyengine_core/data_storage/storage_keys.py +43 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/holders/holder.py +16 -2
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/reforms/reform.py +16 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/simulation.py +125 -20
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/simulation_builder.py +8 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxbenefitsystems/tax_benefit_system.py +22 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/simulation_dumper.py +5 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/pyproject.toml +1 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_helper_invalidation.py +5 -6
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_input_fixed_point.py +398 -1
- policyengine_core-3.35.0/tests/core/test_branch_input_fixed_point_property.py +273 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_carry_over_order.py +26 -12
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_disk_period_filenames.py +19 -5
- policyengine_core-3.35.0/tests/core/test_disk_storage_delete_contained_periods.py +475 -0
- policyengine_core-3.35.0/tests/core/test_disk_storage_delete_property.py +282 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_holder_write_fast_cache.py +18 -6
- policyengine_core-3.35.0/tests/core/test_known_periods_branch_visibility.py +573 -0
- policyengine_core-3.35.0/tests/core/test_known_periods_branch_visibility_property.py +111 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_on_disk_storage_clones.py +3 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_registered_input_deletion.py +30 -4
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_restore_input_registry.py +2 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_set_input_helper_order.py +12 -17
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_simulation_builder.py +177 -1
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_deleted_inputs.py +11 -5
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_user_input_keys_soundness.py +49 -30
- policyengine_core-3.34.9/docs/python_api/simulations.md +0 -34
- policyengine_core-3.34.9/tests/core/test_branch_input_fixed_point_property.py +0 -72
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/ISSUE_TEMPLATE.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/actionlint.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/bump_version.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/changelog_template.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/get-changelog-diff.sh +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/has-functional-changes.sh +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/publish-git-tag.sh +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/requirements/legacy-country-smoke.txt +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/workflows/pr.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.github/workflows/push.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.gitignore +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/.python-version +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/AGENTS.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/CLAUDE.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/CONTRIBUTING.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/LICENSE +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/MANIFEST.in +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/Makefile +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/README.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/_build/logs/myst.build.json +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/changelog.d/.gitkeep +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/_config.yml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/_static/style.css +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/_toc.yml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/add_plotly_to_book.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/contributing/intro.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/engineering/skills/README.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/engineering/skills/documentation_review.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/engineering/skills/testing.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/intro.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/logo.png +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/commons.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/country_template.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/data.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/entities.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/enums.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/errors.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/experimental.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/extension_template.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/holders.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/parameters.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/periods.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/populations.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/projectors.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/reforms.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/scripts.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/taxbenefitsystems.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/taxscales.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/tools.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/tracers.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/types.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/variables.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/python_api/warnings.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/country.ipynb +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/datasets.ipynb +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/parameters.md +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/reforms.ipynb +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/docs/usage/simulation.ipynb +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/mypy.ini +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/build_metadata.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/charts/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/charts/bar.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/charts/formatting.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/commons/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/commons/formulas.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/commons/misc.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/commons/rates.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/constants.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/data/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/data/datasets/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/data/datasets/country_template_dataset.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/entities.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/modelled_policies.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/benefits/basic_income.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/benefits/housing_allowance.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/benefits/index.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/benefits/parenting_allowance/amount.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/benefits/parenting_allowance/income_threshold.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/general/age_of_majority.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/general/age_of_retirement.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/taxes/housing_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/taxes/income_tax_rate.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/parameters/taxes/social_security_contribution.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/add_dynamic_variable.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/add_new_tax.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/flat_social_security_contribution.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/modify_social_security_taxation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/reforms/removal_basic_income.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/situation_examples/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/situation_examples/couple.json +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/situation_examples/housing.json +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/situation_examples/single.json +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/age.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/basic_income.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/disposable_income.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/housing_allowance.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/housing_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/income_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/reforms/add_dynamic_variable.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/reforms/add_new_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/reforms/modify_social_security_taxation.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/situations/income_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/situations/parenting_allowance.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/social_security_contribution.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/tests/test_microsimulation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/benefits.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/demographics.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/housing.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/ids.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/income.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/stats.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/country_template/variables/taxes.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data/dataset.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_storage/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_storage/storage_directory.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_storage/store_history.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_structures/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_structures/parameter_metadata.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_structures/parameter_node_metadata.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_structures/reference.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/data_structures/unit.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/entities/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/entities/entity.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/entities/group_entity.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/entities/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/entities/role.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/enums/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/enums/config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/enums/enum.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/enums/enum_array.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/cycle_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/empty_argument_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/nan_creation_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/non_deterministic_formula_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/parameter_not_found_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/parameter_parsing_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/period_mismatch_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/situation_parsing_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/spiral_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/variable_name_conflict_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/errors/variable_not_found_error.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/experimental/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/experimental/memory_config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/local_benefit.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/parameters/local_town/child_allowance/amount.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/parameters/local_town/child_allowance/index.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/parameters/local_town/index.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/extension_template/tests/local_benefit.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/holders/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/holders/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/model_api.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/at_instant_like.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/get_parameter.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/homogenize_parameters.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/interpolate_parameters.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/propagate_parameter_metadata.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/operations/uprate_parameters.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter_at_instant.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter_node.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/parameter_scale_bracket.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/parameters/vectorial_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/periods/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/periods/config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/periods/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/periods/instant_.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/periods/period_.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/populations/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/populations/config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/populations/group_population.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/populations/population.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/entity_to_person_projector.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/first_person_to_entity_projector.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/projector.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/projectors/unique_role_to_entity_projector.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/reforms/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/assets/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/assets/index.html +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/policyengine_command.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/run_data.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/run_test.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/scripts/simulation_generator.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/individual_sim.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/microsimulation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/simulations/simulation_macro_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxbenefitsystems/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/abstract_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/amount_tax_scale_like.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/rate_tax_scale_like.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/single_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/taxscales/tax_scale_like.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/google_cloud.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/hugging_face.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/test_from_situation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/test_runner.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tools/win_file_manager.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/computation_log.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/flat_trace.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/full_tracer.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/performance_log.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/simple_tracer.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/trace_node.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/tracing_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/tracers/variable_graph.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/types/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/types/data_types/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/types/data_types/arrays.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/config.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/defined_for.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/formula_randomness.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/helpers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/typing.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/variables/variable.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/warnings/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/warnings/libyaml_warning.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/warnings/memory_config_warning.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/warnings/parameter_key_warning.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/policyengine_core/warnings/tempfile_warning.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/pytest.ini +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/conftest.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/test_between_function.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/test_formulas.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/test_is_in_function.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/test_random_seed.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/commons/test_rates.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/data/test_dataset.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/enums/test_enum.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/model_api/test_index_.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/array_type.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/duplicate_key.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/filesystem_hierarchy/empty_index_file/index.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/filesystem_hierarchy/node1/param.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/indentation.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/missing_value.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/parameter_for_unit_propagation.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/test_parameter_clone.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/test_parameter_validation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/test_propagate_units.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/test_unknown_keys.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/unexpected_key_in_parameter.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/unexpected_key_in_scale.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/unexpected_key_in_value_at_instant.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/unexpected_key_in_value_history.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/unknown_key_beside_values.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/uprating_under_metadata.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_date.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_scale.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_type_in_bracket.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_type_in_brackets.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_type_in_parameter.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_type_in_scale.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_type_in_value_history.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/wrong_value.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameter_validation/yaml_hierarchy/node1.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/operations/test_interpolation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/operations/test_nesting.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/operations/test_propagation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/operations/test_scale_threshold_uprating.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/operations/test_uprating.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/test_numpy2_structured_arrays.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/test_parameter_metadata_clone.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/test_parameter_metadata_clone_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/test_vectorial_parameter_node_copy.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters/test_vectorial_parameter_node_copy_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/bareme.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/local_tax.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/rate.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/test_fancy_indexing.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/parameters_fancy_indexing/test_fancy_indexing_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/simulations/test_formula_randomness_concurrency.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_abstract_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_linear_average_rate_tax_scale_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_rate_scale_conversion_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_rate_tax_scale_like.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_single_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tax_scales/test_tax_scales_commons.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_apply_reform_holders.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_apply_reform_holders_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_apply_reform_invalidates_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_apply_reform_preserves_user_inputs.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_assert_near_precision.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_axes.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_bincount_minlength.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_input_invalidation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_input_invalidation_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_scoped_delete_arrays.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_shared_arrays.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_branch_shared_arrays_differential.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_build_metadata.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_calculate_output.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_carry_over_order_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_clone_invalidated_caches.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_clone_rebinding.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_clone_rebinding_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_clone_reform_baseline.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_clone_reform_baseline_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_countries.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_cycles.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_data_storage_dir.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_data_storage_dir_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dataset_default_role.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dataset_default_role_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dataset_getattr.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dataset_unknown_column_warning.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_default_simulation_count_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_disk_storage_differential.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_disk_storage_ownership.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_docs_deployment.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dump_restore.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_dump_restore_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_entities.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_eternity_subperiods.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_extensions.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_fast_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_fast_cache_contained_periods_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_fast_cache_guards.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_formulas.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_group_population_empty.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_group_population_reductions_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_holder_branch_fallback.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_holder_write_fast_cache_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_holders.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_input_tier_invalidation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_join_with_persons_identity.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_join_with_persons_identity_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_macro_cache_not_singleton.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_medium_fixes.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_microsimulation_person_accessor.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_microsimulation_weights.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_opt_out_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_option_result_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_option_result_cache_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_option_result_input_provenance.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_own_period_input_overlapping_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_pandas3_compatibility.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_parameter_security.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_parameters.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_periods.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_projectors.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_reform_baseline_system.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_reform_parameter_isolation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_reform_period_keys.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_reforms.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_release_tagging.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_rerun_fixture_isolation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_restore_input_provenance.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_restore_input_registry_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_set_input_helper_order_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_simulation_copy_pickle.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_simulation_copy_pickle_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_simulations.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_stable_hash_seed.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_stale_frame_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_storage_anchored_periods.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_storage_delete_branch.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_storage_input_index.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_storage_shared_index.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_storage_shared_index_differential.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_baseline_branch.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_computed_values.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_computed_values_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_entity_weight_totals.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_inputs_only.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_inputs_only_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_invalidates_cache.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_membership_ids.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_restore_inputs.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_sampling_period.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_sampling_period_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_structural_ids.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_subsample_weight_fallback.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_tax_benefit_system_cache_identity.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_tracers.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_tracing_parameter_isolation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_tracing_parameter_isolation_properties.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_uprating_order.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_uprating_order_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_user_input_keys.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_user_input_keys_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_variable_code_sharing.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_variable_code_sharing_property.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/test_yaml.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/test_assert_near.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/test_google_cloud.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/test_hugging_face.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/test_runner/test_gc_pause.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/tools/test_runner/test_yaml_runner.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_adds.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_annualize.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_bounds.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_defined_for.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_formula_randomness.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_non_numeric_uprating_and_defined_for.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_subtracts.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_subtracts_sign.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_variable_clone.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_variable_formula_determinism.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_variable_uprating.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/core/variables/test_variables.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/appclient.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/branch_input_invalidation.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/branch_shared_arrays.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/carry_over.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/data_storage_dir.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/disk_storage.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/entities.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/option_caches.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/parameter_metadata_clones.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/reform_holders.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/set_input_helper_order.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/simulation_copy.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/simulations.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/subsample_inputs.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/taxbenefitsystems.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/tracing.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/uprated_inputs.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/uprating_order.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/variables.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/vectorial_parameter_nodes.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/__init__.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/directory/subdirectory/test_4.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/directory/test_1.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/directory/test_2.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/failing_test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/failing_test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_failure.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_name_filter.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_success.yml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_with_anchors.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_with_extension.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_with_reform.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/fixtures/yaml_tests/test_with_reform_2.yaml +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/smoke/test_country_init.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/tests/smoke/test_us.py +0 -0
- {policyengine_core-3.34.9 → policyengine_core-3.35.0}/uv.lock +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.35.0] - 2026-11-13
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- Add a `TaxBenefitSystem.preprocess_situation` hook so country models can fill missing groups in an entity-form situation before it is built.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## [3.34.10] - 2026-11-08
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Scope known periods and dumps to the branch's readable values while preserving derived marks, leave root uprating and carry-over fallback defaults uncached through period conversions and even after branch mutations converge so later inputs take effect, return inputs supplied during conversion on the first call, parse underscore-containing disk branch names safely, delete contained disk periods consistently with memory, reject ambiguous or unparseable storage keys before writing, and warn and skip malformed restored filenames.
|
|
13
|
+
|
|
14
|
+
|
|
1
15
|
## [3.34.9] - 2026-11-07
|
|
2
16
|
|
|
3
17
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: policyengine-core
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.35.0
|
|
4
4
|
Summary: Core microsimulation engine enabling country-specific policy models.
|
|
5
5
|
Project-URL: Homepage, https://github.com/policyengine/policyengine-core
|
|
6
6
|
Author-email: PolicyEngine <hello@policyengine.org>
|
|
@@ -31,6 +31,20 @@ writing when its existing values must remain isolated.
|
|
|
31
31
|
:show-inheritance:
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
## Storage keys
|
|
35
|
+
|
|
36
|
+
Both storage backends reject branch names containing `:` and month or year
|
|
37
|
+
periods anchored after the first day of a month. They also reject periods whose
|
|
38
|
+
string form cannot be parsed back, such as the year `0999`, before storing a
|
|
39
|
+
value. Existing aliases, including twelve-month periods serialized as one year,
|
|
40
|
+
remain supported. Disk restoration warns and skips filenames without a branch
|
|
41
|
+
separator and a canonical period string.
|
|
42
|
+
|
|
43
|
+
```{eval-rst}
|
|
44
|
+
.. automodule:: policyengine_core.data_storage.storage_keys
|
|
45
|
+
:members:
|
|
46
|
+
```
|
|
47
|
+
|
|
34
48
|
## TemporaryStorageDirectory
|
|
35
49
|
|
|
36
50
|
A caller-supplied `simulation._data_storage_dir` is created on first use if it
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Simulations
|
|
2
|
+
|
|
3
|
+
The `policyengine_core.simulations` module contains the definition of `Simulation`, the singular most important class in the repo. `Simulations` combine the logic of a country package with data, and can use the country logic and parameters to calculate the values of unknown variables. The class `SimulationBuilder` can create `Simulation`s from a variety of inputs: JSON descriptions, or dataset arrays.
|
|
4
|
+
|
|
5
|
+
## Simulation
|
|
6
|
+
|
|
7
|
+
```{eval-rst}
|
|
8
|
+
.. autoclass:: policyengine_core.simulations.simulation.Simulation
|
|
9
|
+
:members:
|
|
10
|
+
:undoc-members:
|
|
11
|
+
:inherited-members:
|
|
12
|
+
:show-inheritance:
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Microsimulation
|
|
16
|
+
|
|
17
|
+
```{eval-rst}
|
|
18
|
+
.. autoclass:: policyengine_core.simulations.microsimulation.Microsimulation
|
|
19
|
+
:members:
|
|
20
|
+
:undoc-members:
|
|
21
|
+
:inherited-members:
|
|
22
|
+
:show-inheritance:
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## SimulationBuilder
|
|
26
|
+
|
|
27
|
+
Country models can override `TaxBenefitSystem.preprocess_situation(situation,
|
|
28
|
+
default_period)` to fill missing groups before an entity-form situation is
|
|
29
|
+
built. `SimulationBuilder.build_from_entities` passes it a deep copy of the
|
|
30
|
+
situation, with any `axes` still present, and it must return a dict for the
|
|
31
|
+
builder's normal validation. `default_period` is the builder's default period
|
|
32
|
+
as set, so it may be `None`, a string, an integer or a `Period`.
|
|
33
|
+
`Simulation(situation=...)` and the YAML runner reach it through
|
|
34
|
+
`build_from_dict`, which expands singular entity aliases first; a direct
|
|
35
|
+
`build_from_entities` call passes the caller's keys as given. The hook runs
|
|
36
|
+
before the builder validates entities, so it may receive a situation with no
|
|
37
|
+
persons. A `Reform` runs its country system's hook with the reform as the
|
|
38
|
+
system, so the hook sees reformed parameters and variables. Only the country
|
|
39
|
+
system's hook runs: a `Reform` subclass that overrides it is skipped when
|
|
40
|
+
another reform wraps it, and a hook set on the country system instance itself
|
|
41
|
+
stays bound to that instance and reads the baseline's values. Dataset and
|
|
42
|
+
variable-only construction do not call the hook. The default hook returns its
|
|
43
|
+
input unchanged.
|
|
44
|
+
|
|
45
|
+
```{eval-rst}
|
|
46
|
+
.. autoclass:: policyengine_core.simulations.simulation_builder.SimulationBuilder
|
|
47
|
+
:members:
|
|
48
|
+
:undoc-members:
|
|
49
|
+
:inherited-members:
|
|
50
|
+
:show-inheritance:
|
|
51
|
+
```
|
|
@@ -237,7 +237,15 @@ depend on the input is calculated again) but not less, within these limits:
|
|
|
237
237
|
input. Input helpers still remove overlapping calculated values of the
|
|
238
238
|
variable they write. A formula's input for its own period is still returned
|
|
239
239
|
as described above, and results calculated while an input is being set do not
|
|
240
|
-
enter the fast cache.
|
|
240
|
+
enter the fast cache. When uprating or automatic carry-over finds no source
|
|
241
|
+
input, the root returns the fallback default without caching it, including
|
|
242
|
+
when repeated branch mutations converge to a fixed point. Period conversion
|
|
243
|
+
preserves this rule: a divided, summed or stock-selected value containing
|
|
244
|
+
such a fallback also stays uncached. If a formula supplies an input for the
|
|
245
|
+
requested period during conversion, that input is returned on the first
|
|
246
|
+
call, before deciding whether to cache the converted result. Setting an
|
|
247
|
+
earlier input can therefore change the next calculation of the requested period.
|
|
248
|
+
Branches can cache these defaults because later inputs invalidate them.
|
|
241
249
|
- **Existing child branches keep their values.** An input set on a branch does
|
|
242
250
|
not reach branches already created from it.
|
|
243
251
|
- **Values kept elsewhere stay.** A value one simulation calculated from
|
|
@@ -276,9 +284,9 @@ say what each value was calculated from, nor what was read without being kept,
|
|
|
276
284
|
so the restored simulation records that values from that number on may depend
|
|
277
285
|
on anything: an input set for any variable on a branch of it drops all of them.
|
|
278
286
|
A dump written before calculated values were recorded is restored with every
|
|
279
|
-
value as an input, as before, so such values never drop.
|
|
280
|
-
|
|
281
|
-
|
|
287
|
+
value as an input, as before, so such values never drop. Disk storage splits
|
|
288
|
+
keys at the last underscore, so branch names containing `_` also round-trip
|
|
289
|
+
through dumps and restoration.
|
|
282
290
|
|
|
283
291
|
Two related behaviours: a branch stops reading macro-cache files once an input
|
|
284
292
|
is set on it, even one it already reads, since they are keyed by branch name and
|
|
@@ -4,6 +4,7 @@ import numpy
|
|
|
4
4
|
from numpy.typing import ArrayLike
|
|
5
5
|
|
|
6
6
|
from policyengine_core import periods
|
|
7
|
+
from policyengine_core.data_storage.storage_keys import check_storable
|
|
7
8
|
from policyengine_core.data_storage.store_history import (
|
|
8
9
|
_period_from_storage_key,
|
|
9
10
|
advance_sequence_past,
|
|
@@ -289,20 +290,8 @@ class InMemoryStorage:
|
|
|
289
290
|
period = periods.period(period)
|
|
290
291
|
|
|
291
292
|
# Keys embed f"{branch_name}:{period}", so reject inputs whose key
|
|
292
|
-
# would be ambiguous to parse back
|
|
293
|
-
|
|
294
|
-
# form drops the day). See policyengine-core#526 for the structured-
|
|
295
|
-
# key refactor that will lift these restrictions.
|
|
296
|
-
if ":" in branch_name:
|
|
297
|
-
raise ValueError(
|
|
298
|
-
f"Branch name {branch_name!r} may not contain ':' "
|
|
299
|
-
"(see policyengine-core#526)."
|
|
300
|
-
)
|
|
301
|
-
if period.unit in (periods.YEAR, periods.MONTH) and period.start.day != 1:
|
|
302
|
-
raise ValueError(
|
|
303
|
-
f"Cannot cache period {period} anchored mid-month: its "
|
|
304
|
-
"string form is lossy (see policyengine-core#526)."
|
|
305
|
-
)
|
|
293
|
+
# would be ambiguous to parse back, as ``OnDiskStorage.put`` does.
|
|
294
|
+
check_storable(branch_name, period)
|
|
306
295
|
key = f"{branch_name}:{period}"
|
|
307
296
|
self._arrays[key] = value
|
|
308
297
|
self._stop_sharing(key)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
3
|
import tempfile
|
|
4
|
+
import warnings
|
|
4
5
|
import weakref
|
|
5
6
|
from typing import Dict, List, Optional, Set, Tuple
|
|
6
7
|
|
|
@@ -17,6 +18,7 @@ from policyengine_core.data_storage.storage_directory import (
|
|
|
17
18
|
directory_containing,
|
|
18
19
|
path_key,
|
|
19
20
|
)
|
|
21
|
+
from policyengine_core.data_storage.storage_keys import check_storable
|
|
20
22
|
from policyengine_core.enums import EnumArray
|
|
21
23
|
from policyengine_core.periods import Period
|
|
22
24
|
|
|
@@ -54,6 +56,41 @@ def _epoch() -> tuple:
|
|
|
54
56
|
return os.getpid(), _forks
|
|
55
57
|
|
|
56
58
|
|
|
59
|
+
def _split_key(key: str) -> tuple:
|
|
60
|
+
"""Split a ``f"{branch_name}_{period}"`` file key into its two parts.
|
|
61
|
+
|
|
62
|
+
Branch names often contain ``_`` (policyengine-us uses ``no_salt`` and
|
|
63
|
+
``mtr_for_adult_1``) but a period's string form never does, so the key
|
|
64
|
+
splits on its last ``_``.
|
|
65
|
+
"""
|
|
66
|
+
branch_name, period = key.rsplit("_", 1)
|
|
67
|
+
return branch_name, period
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _is_key(key: str) -> bool:
|
|
71
|
+
"""Whether ``key`` ends with a canonical period after the branch separator.
|
|
72
|
+
|
|
73
|
+
Legacy branch names and eternal-storage files retain their restore
|
|
74
|
+
behavior; this check only validates the period's spelling.
|
|
75
|
+
"""
|
|
76
|
+
_, separator, period = key.rpartition("_")
|
|
77
|
+
if not separator:
|
|
78
|
+
return False
|
|
79
|
+
try:
|
|
80
|
+
return str(periods.period(period)) == period
|
|
81
|
+
except ValueError:
|
|
82
|
+
return False
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _is_within(key: str, branch_name: str, period: Period) -> bool:
|
|
86
|
+
"""Whether file key ``key`` stores a value of ``branch_name`` for a
|
|
87
|
+
period that ``period`` contains."""
|
|
88
|
+
key_branch_name, key_period = _split_key(key)
|
|
89
|
+
return key_branch_name == branch_name and period.contains(
|
|
90
|
+
periods.period(key_period)
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
57
94
|
class OnDiskStorage:
|
|
58
95
|
"""
|
|
59
96
|
Low-level class responsible for storing and retrieving calculated vectors on disk
|
|
@@ -303,6 +340,11 @@ class OnDiskStorage:
|
|
|
303
340
|
if self.is_eternal:
|
|
304
341
|
period = periods.period(periods.ETERNITY)
|
|
305
342
|
period = periods.period(period)
|
|
343
|
+
# The key must split back into this branch name and period (see
|
|
344
|
+
# ``get_known_branch_periods`` and ``delete``): reject what
|
|
345
|
+
# ``InMemoryStorage.put`` rejects. A month anchored mid-month, say,
|
|
346
|
+
# would be stored under the key of the calendar month.
|
|
347
|
+
check_storable(branch_name, period)
|
|
306
348
|
|
|
307
349
|
filename = f"{branch_name}_{period}"
|
|
308
350
|
path = self._path_to_write(filename)
|
|
@@ -417,12 +459,13 @@ class OnDiskStorage:
|
|
|
417
459
|
if period is None:
|
|
418
460
|
# Only wipe files belonging to the requested branch (previously
|
|
419
461
|
# this wiped every branch regardless of ``branch_name`` — same
|
|
420
|
-
# class of bug as C2 in InMemoryStorage).
|
|
421
|
-
|
|
462
|
+
# class of bug as C2 in InMemoryStorage). Compare the parsed
|
|
463
|
+
# branch name, not a prefix: deleting ``pre_tcja`` must not
|
|
464
|
+
# also wipe ``pre_tcja_ctc``.
|
|
422
465
|
self._files = {
|
|
423
466
|
period_item: value
|
|
424
467
|
for period_item, value in self._files.items()
|
|
425
|
-
if
|
|
468
|
+
if _split_key(period_item)[0] != branch_name
|
|
426
469
|
}
|
|
427
470
|
self._forget_dropped_keys()
|
|
428
471
|
return
|
|
@@ -431,27 +474,34 @@ class OnDiskStorage:
|
|
|
431
474
|
period = periods.period(periods.ETERNITY)
|
|
432
475
|
period = periods.period(period)
|
|
433
476
|
|
|
477
|
+
# Delete every period of the branch that ``period`` contains, as
|
|
478
|
+
# ``InMemoryStorage.delete`` does and ``Holder.delete_arrays``
|
|
479
|
+
# documents: deleting ``2025`` also deletes ``2025-01``. Previously
|
|
480
|
+
# only the file keyed exactly ``period`` was deleted.
|
|
434
481
|
if period is not None:
|
|
435
482
|
self._files = {
|
|
436
483
|
period_item: value
|
|
437
484
|
for period_item, value in self._files.items()
|
|
438
|
-
if not period_item
|
|
485
|
+
if not _is_within(period_item, branch_name, period)
|
|
439
486
|
}
|
|
440
487
|
self._forget_dropped_keys()
|
|
441
488
|
|
|
442
489
|
def get_known_periods(self) -> list:
|
|
443
|
-
return
|
|
490
|
+
return [period for _, period in self.get_known_branch_periods()]
|
|
444
491
|
|
|
445
492
|
def get_known_branch_periods(self) -> list:
|
|
446
493
|
return [
|
|
447
494
|
(branch_name, periods.period(period))
|
|
448
|
-
for branch_name, period in map(
|
|
495
|
+
for branch_name, period in map(_split_key, self._files.keys())
|
|
449
496
|
]
|
|
450
497
|
|
|
451
498
|
def restore(self) -> None:
|
|
452
499
|
"""Read back the values stored in this storage's directory: for each
|
|
453
500
|
key, the file named for it (not those in ``REPLACEMENTS_DIR``).
|
|
454
501
|
|
|
502
|
+
A ``.npy`` file whose name lacks a branch separator and a canonical
|
|
503
|
+
period string is left out, with a warning.
|
|
504
|
+
|
|
455
505
|
This storage writes over portable files, as over those it wrote, until
|
|
456
506
|
it is cloned or copied, or this process forks: from then on it writes
|
|
457
507
|
a new file instead, since the clone, copy or forked process reads
|
|
@@ -471,6 +521,7 @@ class OnDiskStorage:
|
|
|
471
521
|
self._files = files = {}
|
|
472
522
|
# Files read back from a directory carry no derived marks or numbers.
|
|
473
523
|
self._derived = set()
|
|
524
|
+
not_keys = []
|
|
474
525
|
self._sequence_numbers = {}
|
|
475
526
|
# Restore self._files from content of storage_dir.
|
|
476
527
|
for filename in os.listdir(self.storage_dir):
|
|
@@ -482,12 +533,25 @@ class OnDiskStorage:
|
|
|
482
533
|
key = filename_core
|
|
483
534
|
if separator:
|
|
484
535
|
key = f"{branch}{separator}{period_string.replace(';', ':')}"
|
|
536
|
+
if not _is_key(key):
|
|
537
|
+
# Reading it back would put a key in ``_files`` that names no
|
|
538
|
+
# branch and period, which ``delete`` and
|
|
539
|
+
# ``get_known_periods`` could not parse.
|
|
540
|
+
not_keys.append(filename)
|
|
541
|
+
continue
|
|
485
542
|
# Updating a legacy value may leave its old colon filename
|
|
486
543
|
# beside the portable file. Prefer the latter, independent of
|
|
487
|
-
# directory listing order
|
|
544
|
+
# directory listing order.
|
|
488
545
|
if key not in files or key != filename_core:
|
|
489
546
|
files[key] = path
|
|
490
547
|
self._restored_paths.update(files.values())
|
|
548
|
+
if not_keys:
|
|
549
|
+
warnings.warn(
|
|
550
|
+
f"Not restoring {', '.join(sorted(not_keys))} in "
|
|
551
|
+
f"{self.storage_dir}: a stored value's file is named for a "
|
|
552
|
+
"branch name, '_' and a period.",
|
|
553
|
+
stacklevel=2,
|
|
554
|
+
)
|
|
491
555
|
|
|
492
556
|
def __del__(self, _rmtree=shutil.rmtree, _getpid=os.getpid) -> None:
|
|
493
557
|
# (The defaults keep the two functions reachable while the
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""What a storage key can hold.
|
|
2
|
+
|
|
3
|
+
Both storages key a value by its branch name and its period's string form:
|
|
4
|
+
``f"{branch_name}:{period}"`` in memory, ``f"{branch_name}_{period}"`` on disk
|
|
5
|
+
(the name of the value's file). ``check_storable`` enforces the same branch
|
|
6
|
+
and period serialization restrictions in both storages (``Holder._set``
|
|
7
|
+
chooses between them by how much memory is in use).
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from policyengine_core import periods
|
|
11
|
+
from policyengine_core.periods import Period
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def check_storable(branch_name: str, period: Period) -> None:
|
|
15
|
+
"""Raise ``ValueError`` for an ambiguous branch or period serialization.
|
|
16
|
+
|
|
17
|
+
Reject a branch name containing ``:``, which separates the parts of an
|
|
18
|
+
in-memory key, and a year or month anchored mid-month, whose string form
|
|
19
|
+
drops the day (``month:2025-03-15`` is ``2025-03``), so that its key would
|
|
20
|
+
be the key of another period. Reject unparseable period strings too,
|
|
21
|
+
including years below 1000 whose string form loses leading zeroes.
|
|
22
|
+
Supported aliases, such as twelve months serialized as one year, retain
|
|
23
|
+
their existing meaning. See policyengine-core#526 for the structured-key
|
|
24
|
+
refactor.
|
|
25
|
+
"""
|
|
26
|
+
if ":" in branch_name:
|
|
27
|
+
raise ValueError(
|
|
28
|
+
f"Branch name {branch_name!r} may not contain ':' "
|
|
29
|
+
"(see policyengine-core#526)."
|
|
30
|
+
)
|
|
31
|
+
if period.unit in (periods.YEAR, periods.MONTH) and period.start.day != 1:
|
|
32
|
+
raise ValueError(
|
|
33
|
+
f"Cannot cache period {period} anchored mid-month (it starts on "
|
|
34
|
+
f"{period.start}): its string form is lossy (see "
|
|
35
|
+
"policyengine-core#526)."
|
|
36
|
+
)
|
|
37
|
+
try:
|
|
38
|
+
periods.period(str(period))
|
|
39
|
+
except ValueError as error:
|
|
40
|
+
raise ValueError(
|
|
41
|
+
f"Cannot cache period {period!r}: its string form cannot be parsed "
|
|
42
|
+
"(see policyengine-core#526)."
|
|
43
|
+
) from error
|
|
@@ -559,11 +559,25 @@ class Holder:
|
|
|
559
559
|
|
|
560
560
|
return usage
|
|
561
561
|
|
|
562
|
-
def get_known_periods(self) -> List[Period]:
|
|
562
|
+
def get_known_periods(self, branch_name: str = None) -> List[Period]:
|
|
563
563
|
"""
|
|
564
564
|
Get the list of periods the variable value is known for.
|
|
565
|
-
"""
|
|
566
565
|
|
|
566
|
+
With ``branch_name``, list each period ``get_array(period,
|
|
567
|
+
branch_name)`` reads a stored value for, once: those stored under
|
|
568
|
+
that branch, its ``parent_branch`` ancestors or ``default`` (see
|
|
569
|
+
``_readable_branches``). Without it, list the period of every value
|
|
570
|
+
stored, under any branch; that branch may not read some of them.
|
|
571
|
+
"""
|
|
572
|
+
if branch_name is not None:
|
|
573
|
+
readable = set(self._readable_branches(branch_name))
|
|
574
|
+
return list(
|
|
575
|
+
dict.fromkeys(
|
|
576
|
+
period
|
|
577
|
+
for stored_branch, period in self.get_known_branch_periods()
|
|
578
|
+
if stored_branch in readable
|
|
579
|
+
)
|
|
580
|
+
)
|
|
567
581
|
return list(self._memory_storage.get_known_periods()) + list(
|
|
568
582
|
(self._disk_storage.get_known_periods() if self._disk_storage else [])
|
|
569
583
|
)
|
|
@@ -147,6 +147,22 @@ class Reform(TaxBenefitSystem):
|
|
|
147
147
|
def __getattr__(self, attribute):
|
|
148
148
|
return getattr(self.baseline, attribute)
|
|
149
149
|
|
|
150
|
+
def preprocess_situation(self, situation: dict, default_period=None) -> dict:
|
|
151
|
+
# TaxBenefitSystem defines a no-op hook, so ``__getattr__`` never
|
|
152
|
+
# reaches the country's override. Run the country system's hook with
|
|
153
|
+
# this reform as the system, so the hook reads the reformed parameters
|
|
154
|
+
# and variables. A hook set on the country system instance itself
|
|
155
|
+
# stays bound to that instance.
|
|
156
|
+
country_system = self.baseline
|
|
157
|
+
while isinstance(country_system, Reform):
|
|
158
|
+
country_system = country_system.baseline
|
|
159
|
+
instance_hook = vars(country_system).get("preprocess_situation")
|
|
160
|
+
if instance_hook is not None:
|
|
161
|
+
return instance_hook(situation, default_period)
|
|
162
|
+
return type(country_system).preprocess_situation(
|
|
163
|
+
self, situation, default_period
|
|
164
|
+
)
|
|
165
|
+
|
|
150
166
|
@property
|
|
151
167
|
def full_key(self) -> str:
|
|
152
168
|
key = self.key
|