policyengine-core 3.34.1__tar.gz → 3.34.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/CHANGELOG.md +7 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/PKG-INFO +1 -1
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/test_runner.py +65 -12
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/pyproject.toml +1 -1
- policyengine_core-3.34.2/tests/core/tools/test_runner/test_gc_pause.py +443 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/ISSUE_TEMPLATE.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/actionlint.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/bump_version.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/changelog_template.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/get-changelog-diff.sh +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/has-functional-changes.sh +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/publish-git-tag.sh +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/requirements/legacy-country-smoke.txt +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/workflows/pr.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/workflows/push.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.gitignore +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/.python-version +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/AGENTS.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/CLAUDE.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/CONTRIBUTING.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/LICENSE +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/MANIFEST.in +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/Makefile +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/README.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/_build/logs/myst.build.json +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/changelog.d/.gitkeep +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/_config.yml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/_static/style.css +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/_toc.yml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/add_plotly_to_book.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/contributing/intro.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/engineering/skills/README.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/engineering/skills/documentation_review.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/engineering/skills/testing.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/intro.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/logo.png +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/commons.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/country_template.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/data.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/data_storage.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/entities.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/enums.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/errors.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/experimental.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/extension_template.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/holders.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/parameters.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/periods.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/populations.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/projectors.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/reforms.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/scripts.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/simulations.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/taxbenefitsystems.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/taxscales.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/tools.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/tracers.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/types.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/variables.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/python_api/warnings.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/branches.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/country.ipynb +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/datasets.ipynb +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/parameters.md +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/reforms.ipynb +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/docs/usage/simulation.ipynb +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/mypy.ini +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/build_metadata.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/charts/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/charts/bar.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/charts/formatting.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/commons/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/commons/formulas.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/commons/misc.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/commons/rates.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/constants.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/data/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/data/datasets/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/data/datasets/country_template_dataset.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/entities.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/modelled_policies.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/benefits/basic_income.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/benefits/housing_allowance.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/benefits/index.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/benefits/parenting_allowance/amount.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/benefits/parenting_allowance/income_threshold.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/general/age_of_majority.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/general/age_of_retirement.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/taxes/housing_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/taxes/income_tax_rate.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/parameters/taxes/social_security_contribution.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/add_dynamic_variable.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/add_new_tax.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/flat_social_security_contribution.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/modify_social_security_taxation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/reforms/removal_basic_income.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/situation_examples/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/situation_examples/couple.json +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/situation_examples/housing.json +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/situation_examples/single.json +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/age.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/basic_income.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/disposable_income.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/housing_allowance.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/housing_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/income_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/reforms/add_dynamic_variable.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/reforms/add_new_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/reforms/modify_social_security_taxation.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/situations/income_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/situations/parenting_allowance.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/social_security_contribution.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/tests/test_microsimulation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/benefits.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/demographics.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/housing.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/ids.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/income.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/stats.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/country_template/variables/taxes.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data/dataset.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_storage/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_storage/in_memory_storage.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_storage/on_disk_storage.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_storage/storage_directory.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_storage/store_history.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_structures/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_structures/parameter_metadata.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_structures/parameter_node_metadata.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_structures/reference.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/data_structures/unit.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/entities/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/entities/entity.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/entities/group_entity.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/entities/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/entities/role.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/enums/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/enums/config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/enums/enum.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/enums/enum_array.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/cycle_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/empty_argument_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/nan_creation_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/non_deterministic_formula_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/parameter_not_found_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/parameter_parsing_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/period_mismatch_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/situation_parsing_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/spiral_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/variable_name_conflict_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/errors/variable_not_found_error.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/experimental/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/experimental/memory_config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/local_benefit.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/parameters/local_town/child_allowance/amount.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/parameters/local_town/child_allowance/index.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/parameters/local_town/index.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/extension_template/tests/local_benefit.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/holders/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/holders/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/holders/holder.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/model_api.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/at_instant_like.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/get_parameter.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/homogenize_parameters.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/interpolate_parameters.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/propagate_parameter_metadata.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/operations/uprate_parameters.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter_at_instant.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter_node.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/parameter_scale_bracket.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/parameters/vectorial_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/periods/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/periods/config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/periods/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/periods/instant_.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/periods/period_.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/populations/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/populations/config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/populations/group_population.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/populations/population.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/entity_to_person_projector.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/first_person_to_entity_projector.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/projector.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/projectors/unique_role_to_entity_projector.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/reforms/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/reforms/reform.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/assets/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/assets/index.html +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/policyengine_command.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/run_data.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/run_test.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/scripts/simulation_generator.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/individual_sim.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/microsimulation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/simulation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/simulation_builder.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/simulations/simulation_macro_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxbenefitsystems/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxbenefitsystems/tax_benefit_system.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/abstract_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/amount_tax_scale_like.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/rate_tax_scale_like.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/single_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/taxscales/tax_scale_like.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/google_cloud.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/hugging_face.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/simulation_dumper.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/test_from_situation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/win_file_manager.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/computation_log.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/flat_trace.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/full_tracer.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/performance_log.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/simple_tracer.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/trace_node.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/tracing_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tracers/variable_graph.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/types/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/types/data_types/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/types/data_types/arrays.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/config.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/defined_for.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/formula_randomness.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/helpers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/typing.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/variables/variable.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/warnings/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/warnings/libyaml_warning.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/warnings/memory_config_warning.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/warnings/parameter_key_warning.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/warnings/tempfile_warning.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/pytest.ini +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/conftest.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/test_between_function.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/test_formulas.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/test_is_in_function.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/test_random_seed.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/commons/test_rates.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/data/test_dataset.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/enums/test_enum.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/model_api/test_index_.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/array_type.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/duplicate_key.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/filesystem_hierarchy/empty_index_file/index.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/filesystem_hierarchy/node1/param.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/indentation.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/missing_value.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/parameter_for_unit_propagation.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/test_parameter_clone.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/test_parameter_validation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/test_propagate_units.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/test_unknown_keys.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/unexpected_key_in_parameter.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/unexpected_key_in_scale.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/unexpected_key_in_value_at_instant.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/unexpected_key_in_value_history.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/unknown_key_beside_values.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/uprating_under_metadata.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_date.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_scale.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_type_in_bracket.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_type_in_brackets.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_type_in_parameter.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_type_in_scale.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_type_in_value_history.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/wrong_value.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameter_validation/yaml_hierarchy/node1.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/operations/test_interpolation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/operations/test_nesting.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/operations/test_propagation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/operations/test_scale_threshold_uprating.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/operations/test_uprating.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/test_numpy2_structured_arrays.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/test_parameter_metadata_clone.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/test_parameter_metadata_clone_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/test_vectorial_parameter_node_copy.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters/test_vectorial_parameter_node_copy_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/bareme.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/local_tax.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/rate.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/test_fancy_indexing.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/parameters_fancy_indexing/test_fancy_indexing_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/simulations/test_formula_randomness_concurrency.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_abstract_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_linear_average_rate_tax_scale_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_rate_scale_conversion_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_rate_tax_scale_like.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_single_amount_tax_scale.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tax_scales/test_tax_scales_commons.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_apply_reform_invalidates_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_apply_reform_preserves_user_inputs.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_assert_near_precision.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_axes.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_bincount_minlength.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_helper_invalidation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_input_fixed_point.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_input_fixed_point_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_input_invalidation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_input_invalidation_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_scoped_delete_arrays.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_shared_arrays.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_branch_shared_arrays_differential.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_build_metadata.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_calculate_output.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_carry_over_order.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_carry_over_order_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_clone_invalidated_caches.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_clone_rebinding.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_clone_rebinding_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_clone_reform_baseline.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_clone_reform_baseline_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_countries.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_cycles.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_data_storage_dir.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_data_storage_dir_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dataset_default_role.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dataset_default_role_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dataset_getattr.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dataset_unknown_column_warning.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_default_simulation_count_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_disk_period_filenames.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_disk_storage_differential.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_disk_storage_ownership.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_docs_deployment.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dump_restore.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_dump_restore_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_entities.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_eternity_subperiods.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_extensions.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_fast_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_fast_cache_contained_periods_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_fast_cache_guards.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_formulas.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_group_population_empty.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_group_population_reductions_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_holder_branch_fallback.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_holder_write_fast_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_holder_write_fast_cache_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_holders.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_input_tier_invalidation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_join_with_persons_identity.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_join_with_persons_identity_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_macro_cache_not_singleton.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_medium_fixes.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_microsimulation_person_accessor.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_microsimulation_weights.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_on_disk_storage_clones.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_opt_out_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_option_result_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_option_result_cache_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_option_result_input_provenance.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_own_period_input_overlapping_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_pandas3_compatibility.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_parameter_security.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_parameters.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_periods.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_projectors.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_reform_baseline_system.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_reform_parameter_isolation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_reform_period_keys.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_reforms.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_registered_input_deletion.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_release_tagging.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_rerun_fixture_isolation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_restore_input_provenance.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_restore_input_registry.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_restore_input_registry_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_set_input_helper_order.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_set_input_helper_order_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_simulation_builder.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_simulation_copy_pickle.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_simulation_copy_pickle_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_simulations.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_stable_hash_seed.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_stale_frame_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_storage_anchored_periods.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_storage_delete_branch.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_storage_input_index.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_storage_shared_index.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_storage_shared_index_differential.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_baseline_branch.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_computed_values.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_computed_values_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_deleted_inputs.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_entity_weight_totals.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_inputs_only.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_inputs_only_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_invalidates_cache.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_membership_ids.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_restore_inputs.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_sampling_period.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_sampling_period_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_structural_ids.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_subsample_weight_fallback.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_tax_benefit_system_cache_identity.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_tracers.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_tracing_parameter_isolation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_tracing_parameter_isolation_properties.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_uprating_order.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_uprating_order_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_user_input_keys.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_user_input_keys_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_user_input_keys_soundness.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_variable_code_sharing.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_variable_code_sharing_property.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/test_yaml.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tools/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tools/test_assert_near.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tools/test_google_cloud.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tools/test_hugging_face.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/tools/test_runner/test_yaml_runner.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_adds.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_annualize.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_bounds.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_defined_for.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_formula_randomness.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_non_numeric_uprating_and_defined_for.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_subtracts.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_subtracts_sign.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_variable_clone.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_variable_formula_determinism.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_variable_uprating.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/core/variables/test_variables.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/appclient.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/branch_input_invalidation.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/branch_shared_arrays.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/carry_over.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/data_storage_dir.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/disk_storage.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/entities.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/option_caches.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/parameter_metadata_clones.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/set_input_helper_order.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/simulation_copy.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/simulations.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/subsample_inputs.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/taxbenefitsystems.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/tracing.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/uprated_inputs.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/uprating_order.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/variables.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/vectorial_parameter_nodes.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/__init__.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/directory/subdirectory/test_4.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/directory/test_1.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/directory/test_2.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/failing_test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/failing_test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_failure.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_name_filter.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_success.yml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_with_anchors.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_with_extension.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_with_reform.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/fixtures/yaml_tests/test_with_reform_2.yaml +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/smoke/test_country_init.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/tests/smoke/test_us.py +0 -0
- {policyengine_core-3.34.1 → policyengine_core-3.34.2}/uv.lock +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.34.2] - 2026-10-31
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- Pause automatic garbage collection while the YAML test runner builds the system for a reform combination, run one full collection when the build returns while the cache holds fewer than three systems, and restore the caller's setting, so a cache-miss build no longer spends most of its time in repeated full collections that free almost nothing.
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
## [3.34.1] - 2026-10-31
|
|
2
9
|
|
|
3
10
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: policyengine-core
|
|
3
|
-
Version: 3.34.
|
|
3
|
+
Version: 3.34.2
|
|
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>
|
{policyengine_core-3.34.1 → policyengine_core-3.34.2}/policyengine_core/tools/test_runner.py
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
|
+
import gc
|
|
3
4
|
import logging
|
|
4
5
|
import sys
|
|
5
6
|
import os
|
|
6
7
|
import traceback
|
|
7
8
|
import textwrap
|
|
9
|
+
from contextlib import contextmanager
|
|
8
10
|
from typing import Dict, List
|
|
9
11
|
|
|
10
12
|
import pytest
|
|
@@ -419,6 +421,53 @@ class OpenFiscaPlugin(object):
|
|
|
419
421
|
)
|
|
420
422
|
|
|
421
423
|
|
|
424
|
+
# A cache miss forces a full collection only while the cache holds fewer than
|
|
425
|
+
# this many systems. That collection walks every object in the process, so
|
|
426
|
+
# each cached system makes it dearer, while the automatic collector's full
|
|
427
|
+
# collections grow rarer as the heap grows. In PR #643's model of
|
|
428
|
+
# policyengine-us-sized systems, 3 gave the least collection CPU over 16 and
|
|
429
|
+
# 32 misses; limits from 1 to 8 came within 20%, and no limit cost about three
|
|
430
|
+
# times as much.
|
|
431
|
+
_FULL_COLLECTION_CACHE_LIMIT = 3
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
@contextmanager
|
|
435
|
+
def _automatic_gc_paused(collect=True):
|
|
436
|
+
"""Pause automatic garbage collection for a build, then maybe collect once.
|
|
437
|
+
|
|
438
|
+
Building a reform system copies the whole baseline. On policyengine-us
|
|
439
|
+
the copy's allocations set off six or seven full collections per build,
|
|
440
|
+
each walking every object in the process and freeing almost nothing.
|
|
441
|
+
Pausing collection skips them. When collection resumes, the copy's
|
|
442
|
+
objects pass through a young and a middle collection, and through a full
|
|
443
|
+
one only when CPython's growth rule allows it: an automatic full
|
|
444
|
+
collection waits until the objects moved into the oldest generation since
|
|
445
|
+
the last full collection number at least a quarter of those that survived
|
|
446
|
+
it.
|
|
447
|
+
|
|
448
|
+
With ``collect``, a build that returns ends with one ``gc.collect()``. That
|
|
449
|
+
full collection bypasses the growth rule and moves the copy straight into
|
|
450
|
+
the oldest generation, so its objects skip the young and middle
|
|
451
|
+
collections. It pays only while the copy is a large share of the heap, so
|
|
452
|
+
``_get_tax_benefit_system`` asks for it only while the cache holds fewer
|
|
453
|
+
than ``_FULL_COLLECTION_CACHE_LIMIT`` systems and otherwise leaves the copy
|
|
454
|
+
to the automatic collector.
|
|
455
|
+
|
|
456
|
+
The caller's setting is restored when the build returns or raises. A
|
|
457
|
+
caller that had disabled collection gets no collection and keeps it
|
|
458
|
+
disabled, and a build that raises gets none.
|
|
459
|
+
"""
|
|
460
|
+
was_enabled = gc.isenabled()
|
|
461
|
+
gc.disable()
|
|
462
|
+
try:
|
|
463
|
+
yield
|
|
464
|
+
if was_enabled and collect:
|
|
465
|
+
gc.collect()
|
|
466
|
+
finally:
|
|
467
|
+
if was_enabled:
|
|
468
|
+
gc.enable()
|
|
469
|
+
|
|
470
|
+
|
|
422
471
|
def _get_tax_benefit_system(
|
|
423
472
|
baseline,
|
|
424
473
|
reforms,
|
|
@@ -444,20 +493,24 @@ def _get_tax_benefit_system(
|
|
|
444
493
|
if cached is not None:
|
|
445
494
|
return cached
|
|
446
495
|
|
|
447
|
-
|
|
496
|
+
# Only a cache miss builds a system, so only a miss touches collection.
|
|
497
|
+
# The count covers every baseline's entries.
|
|
498
|
+
cached_systems = sum(len(entry) for entry in _tax_benefit_system_cache.values())
|
|
499
|
+
with _automatic_gc_paused(collect=cached_systems < _FULL_COLLECTION_CACHE_LIMIT):
|
|
500
|
+
current_tax_benefit_system = baseline.clone()
|
|
448
501
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
502
|
+
for reform_path in reforms:
|
|
503
|
+
if isinstance(reform_path, str):
|
|
504
|
+
current_tax_benefit_system = current_tax_benefit_system.apply_reform(
|
|
505
|
+
reform_path
|
|
506
|
+
)
|
|
507
|
+
else:
|
|
508
|
+
current_tax_benefit_system = reform_path(current_tax_benefit_system)
|
|
509
|
+
current_tax_benefit_system._parameters_at_instant_cache = {}
|
|
457
510
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
511
|
+
for extension in extensions:
|
|
512
|
+
current_tax_benefit_system = current_tax_benefit_system.clone()
|
|
513
|
+
current_tax_benefit_system.load_extension(extension)
|
|
461
514
|
|
|
462
515
|
if baseline_entry is None:
|
|
463
516
|
baseline_entry = {}
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
"""The YAML runner pauses automatic collection while it builds a reform system.
|
|
2
|
+
|
|
3
|
+
A cache miss in ``_get_tax_benefit_system`` builds with automatic collection
|
|
4
|
+
paused. If the caller had collection on, the build returned, and the cache
|
|
5
|
+
held fewer than ``_FULL_COLLECTION_CACHE_LIMIT`` systems, it then runs one
|
|
6
|
+
full collection; otherwise it leaves the new system to the automatic
|
|
7
|
+
collector, so a run of misses forces at most that many collections. It leaves
|
|
8
|
+
``gc.isenabled()`` as it found it, whether the build returns or raises and
|
|
9
|
+
whether the caller had collection on or off. A cache hit does not touch
|
|
10
|
+
collection. The pause changes no result: the cache still returns the
|
|
11
|
+
identical system for a key it has seen and builds a new one for any other
|
|
12
|
+
key, and YAML cases produce the same outcomes and values with or without it.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import contextlib
|
|
16
|
+
import gc
|
|
17
|
+
import os
|
|
18
|
+
import weakref
|
|
19
|
+
|
|
20
|
+
import pytest
|
|
21
|
+
|
|
22
|
+
from policyengine_core.country_template import CountryTaxBenefitSystem
|
|
23
|
+
from policyengine_core.taxbenefitsystems import TaxBenefitSystem
|
|
24
|
+
from policyengine_core.tools import test_runner
|
|
25
|
+
from policyengine_core.tools.test_runner import (
|
|
26
|
+
_automatic_gc_paused,
|
|
27
|
+
_get_tax_benefit_system,
|
|
28
|
+
)
|
|
29
|
+
from tests.fixtures import yaml_tests
|
|
30
|
+
|
|
31
|
+
# The country-package smoke job installs no dev dependencies.
|
|
32
|
+
hypothesis = pytest.importorskip("hypothesis")
|
|
33
|
+
st = hypothesis.strategies
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class BuildFailed(Exception):
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class RecordingSystem:
|
|
41
|
+
"""A stand-in system that records whether collection was enabled at each
|
|
42
|
+
build step, and can be told to raise at one of them."""
|
|
43
|
+
|
|
44
|
+
def __init__(self, log, fail_at=None, reforms=(), extensions=()):
|
|
45
|
+
self.log = log
|
|
46
|
+
self.fail_at = fail_at
|
|
47
|
+
self.reforms = reforms
|
|
48
|
+
self.extensions = extensions
|
|
49
|
+
|
|
50
|
+
def _step(self, name):
|
|
51
|
+
self.log.append((name, gc.isenabled()))
|
|
52
|
+
if self.fail_at == name:
|
|
53
|
+
raise BuildFailed(name)
|
|
54
|
+
|
|
55
|
+
def clone(self):
|
|
56
|
+
self._step("clone")
|
|
57
|
+
return RecordingSystem(self.log, self.fail_at, self.reforms, self.extensions)
|
|
58
|
+
|
|
59
|
+
def apply_reform(self, reform_path):
|
|
60
|
+
self._step("reform")
|
|
61
|
+
return RecordingSystem(
|
|
62
|
+
self.log, self.fail_at, self.reforms + (reform_path,), self.extensions
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def load_extension(self, extension):
|
|
66
|
+
self._step("extension")
|
|
67
|
+
self.extensions = self.extensions + (extension,)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def callable_reform(system):
|
|
71
|
+
system._step("reform")
|
|
72
|
+
return RecordingSystem(
|
|
73
|
+
system.log, system.fail_at, system.reforms + ("callable",), system.extensions
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@pytest.fixture
|
|
78
|
+
def restore_gc():
|
|
79
|
+
was_enabled = gc.isenabled()
|
|
80
|
+
yield
|
|
81
|
+
if was_enabled:
|
|
82
|
+
gc.enable()
|
|
83
|
+
else:
|
|
84
|
+
gc.disable()
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@pytest.fixture(autouse=True)
|
|
88
|
+
def empty_cache(monkeypatch):
|
|
89
|
+
"""Give each test its own empty system cache, so systems other tests
|
|
90
|
+
cached do not count toward the full-collection bound."""
|
|
91
|
+
monkeypatch.setattr(
|
|
92
|
+
test_runner, "_tax_benefit_system_cache", weakref.WeakKeyDictionary()
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# gc.collect()'s default generation, the oldest: a full collection.
|
|
97
|
+
FULL = "collect(2)"
|
|
98
|
+
LIMIT = test_runner._FULL_COLLECTION_CACHE_LIMIT
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@pytest.fixture
|
|
102
|
+
def gc_calls(restore_gc, monkeypatch):
|
|
103
|
+
"""Every call to gc.disable, gc.enable and gc.collect, in order, with the
|
|
104
|
+
generation each collection asked for: ``FULL`` for ``gc.collect()``.
|
|
105
|
+
Disabling and enabling take effect; a recorded collection does not run,
|
|
106
|
+
to keep hundreds of builds fast."""
|
|
107
|
+
calls = []
|
|
108
|
+
for name in ("disable", "enable"):
|
|
109
|
+
|
|
110
|
+
def spy(real=getattr(gc, name), name=name):
|
|
111
|
+
calls.append(name)
|
|
112
|
+
return real()
|
|
113
|
+
|
|
114
|
+
monkeypatch.setattr(gc, name, spy)
|
|
115
|
+
|
|
116
|
+
def collect(generation=2):
|
|
117
|
+
calls.append(f"collect({generation})")
|
|
118
|
+
return 0
|
|
119
|
+
|
|
120
|
+
monkeypatch.setattr(gc, "collect", collect)
|
|
121
|
+
return calls
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def collections(calls):
|
|
125
|
+
return [call for call in calls if call.startswith("collect")]
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def set_gc(enabled):
|
|
129
|
+
if enabled:
|
|
130
|
+
gc.enable()
|
|
131
|
+
else:
|
|
132
|
+
gc.disable()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def test_a_cache_miss_builds_paused_then_collects_once(gc_calls):
|
|
136
|
+
set_gc(True)
|
|
137
|
+
log = []
|
|
138
|
+
baseline = RecordingSystem(log)
|
|
139
|
+
del gc_calls[:]
|
|
140
|
+
|
|
141
|
+
system = _get_tax_benefit_system(
|
|
142
|
+
baseline, ["some.reform", callable_reform], ["some.extension"]
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
assert [name for name, _ in log] == [
|
|
146
|
+
"clone",
|
|
147
|
+
"reform",
|
|
148
|
+
"reform",
|
|
149
|
+
"clone",
|
|
150
|
+
"extension",
|
|
151
|
+
]
|
|
152
|
+
assert [enabled for _, enabled in log] == [False] * 5
|
|
153
|
+
assert gc_calls == ["disable", FULL, "enable"]
|
|
154
|
+
assert gc.isenabled()
|
|
155
|
+
assert system.reforms == ("some.reform", "callable")
|
|
156
|
+
assert system.extensions == ("some.extension",)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
SCENARIOS = ["miss", "hit", "clone_raises", "reform_raises", "extension_raises"]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@pytest.mark.parametrize("enabled_before", [True, False])
|
|
163
|
+
@pytest.mark.parametrize("scenario", SCENARIOS)
|
|
164
|
+
def test_collection_state_after_a_call_equals_the_state_before(
|
|
165
|
+
gc_calls, enabled_before, scenario
|
|
166
|
+
):
|
|
167
|
+
fail_at = {
|
|
168
|
+
"clone_raises": "clone",
|
|
169
|
+
"reform_raises": "reform",
|
|
170
|
+
"extension_raises": "extension",
|
|
171
|
+
}.get(scenario)
|
|
172
|
+
baseline = RecordingSystem([], fail_at=fail_at)
|
|
173
|
+
if scenario == "hit":
|
|
174
|
+
_get_tax_benefit_system(baseline, ["some.reform"], ["some.extension"])
|
|
175
|
+
|
|
176
|
+
set_gc(enabled_before)
|
|
177
|
+
del gc_calls[:]
|
|
178
|
+
if fail_at is None:
|
|
179
|
+
_get_tax_benefit_system(baseline, ["some.reform"], ["some.extension"])
|
|
180
|
+
else:
|
|
181
|
+
with pytest.raises(BuildFailed, match=fail_at):
|
|
182
|
+
_get_tax_benefit_system(baseline, ["some.reform"], ["some.extension"])
|
|
183
|
+
assert gc.isenabled() is enabled_before
|
|
184
|
+
# Only a build that returns, for a caller with collection on, collects.
|
|
185
|
+
expected = [FULL] if scenario == "miss" and enabled_before else []
|
|
186
|
+
assert collections(gc_calls) == expected
|
|
187
|
+
|
|
188
|
+
# A failed build caches nothing, so the next call builds again.
|
|
189
|
+
log_length = len(baseline.log)
|
|
190
|
+
baseline.fail_at = None
|
|
191
|
+
_get_tax_benefit_system(baseline, ["some.reform"], ["some.extension"])
|
|
192
|
+
assert (len(baseline.log) > log_length) is (fail_at is not None)
|
|
193
|
+
assert gc.isenabled() is enabled_before
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def test_a_cache_hit_leaves_collection_alone(gc_calls):
|
|
197
|
+
set_gc(True)
|
|
198
|
+
baseline = RecordingSystem([])
|
|
199
|
+
system = _get_tax_benefit_system(baseline, ["some.reform"], [])
|
|
200
|
+
del gc_calls[:]
|
|
201
|
+
|
|
202
|
+
assert _get_tax_benefit_system(baseline, ["some.reform"], []) is system
|
|
203
|
+
assert gc_calls == []
|
|
204
|
+
assert gc.isenabled()
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
def test_the_pause_restores_the_callers_state_when_the_body_raises(gc_calls):
|
|
208
|
+
for enabled_before in (True, False):
|
|
209
|
+
set_gc(enabled_before)
|
|
210
|
+
del gc_calls[:]
|
|
211
|
+
with pytest.raises(BuildFailed):
|
|
212
|
+
with _automatic_gc_paused():
|
|
213
|
+
assert not gc.isenabled()
|
|
214
|
+
raise BuildFailed("body")
|
|
215
|
+
assert gc.isenabled() is enabled_before
|
|
216
|
+
assert collections(gc_calls) == []
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def miss(baseline, number):
|
|
220
|
+
"""A cache miss: a parameter key the cache has not seen."""
|
|
221
|
+
return _get_tax_benefit_system(baseline, [], [], reform_key=f"gov.rate:{number}")
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
@pytest.mark.parametrize("limit", [0, 1, 2, LIMIT, LIMIT + 2])
|
|
225
|
+
def test_misses_collect_only_while_the_cache_holds_fewer_systems_than_the_limit(
|
|
226
|
+
gc_calls, monkeypatch, limit
|
|
227
|
+
):
|
|
228
|
+
monkeypatch.setattr(test_runner, "_FULL_COLLECTION_CACHE_LIMIT", limit)
|
|
229
|
+
set_gc(True)
|
|
230
|
+
baseline = RecordingSystem([])
|
|
231
|
+
collected = []
|
|
232
|
+
for number in range(limit + 3):
|
|
233
|
+
del gc_calls[:]
|
|
234
|
+
miss(baseline, number)
|
|
235
|
+
collected.append(collections(gc_calls))
|
|
236
|
+
assert gc.isenabled()
|
|
237
|
+
# The last forced collection is miss number limit - 1, with limit - 1
|
|
238
|
+
# systems cached; from miss number limit on, none.
|
|
239
|
+
assert collected == [[FULL]] * limit + [[]] * 3
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def test_a_miss_past_the_limit_still_pauses_and_restores_collection(gc_calls):
|
|
243
|
+
log = []
|
|
244
|
+
baseline = RecordingSystem(log)
|
|
245
|
+
for enabled_before in (True, False):
|
|
246
|
+
set_gc(True)
|
|
247
|
+
for number in range(LIMIT):
|
|
248
|
+
miss(baseline, number)
|
|
249
|
+
del log[:]
|
|
250
|
+
set_gc(enabled_before)
|
|
251
|
+
del gc_calls[:]
|
|
252
|
+
|
|
253
|
+
system = _get_tax_benefit_system(baseline, ["some.reform"], ["x.extension"])
|
|
254
|
+
|
|
255
|
+
assert [name for name, _ in log] == ["clone", "reform", "clone", "extension"]
|
|
256
|
+
assert not any(enabled for _, enabled in log)
|
|
257
|
+
assert gc_calls == (["disable", "enable"] if enabled_before else ["disable"])
|
|
258
|
+
assert gc.isenabled() is enabled_before
|
|
259
|
+
assert system.reforms == ("some.reform",)
|
|
260
|
+
baseline = RecordingSystem(log)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def test_the_limit_counts_systems_cached_for_every_baseline(gc_calls, monkeypatch):
|
|
264
|
+
monkeypatch.setattr(test_runner, "_FULL_COLLECTION_CACHE_LIMIT", 3)
|
|
265
|
+
set_gc(True)
|
|
266
|
+
first = RecordingSystem([])
|
|
267
|
+
miss(first, 0)
|
|
268
|
+
miss(first, 1)
|
|
269
|
+
second = RecordingSystem([])
|
|
270
|
+
del gc_calls[:]
|
|
271
|
+
miss(second, 0) # 2 cached
|
|
272
|
+
assert collections(gc_calls) == [FULL]
|
|
273
|
+
del gc_calls[:]
|
|
274
|
+
miss(second, 1) # 3 cached
|
|
275
|
+
assert collections(gc_calls) == []
|
|
276
|
+
# A baseline that goes away takes its systems out of the count.
|
|
277
|
+
del first
|
|
278
|
+
del gc_calls[:]
|
|
279
|
+
miss(second, 2) # 2 cached
|
|
280
|
+
assert collections(gc_calls) == [FULL]
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
REFORM_NAMES = ["a.reform", "b.reform", "c.reform"]
|
|
284
|
+
EXTENSION_NAMES = ["x.extension", "y.extension"]
|
|
285
|
+
|
|
286
|
+
request_strategy = st.tuples(
|
|
287
|
+
st.lists(st.sampled_from(REFORM_NAMES), max_size=3),
|
|
288
|
+
st.sampled_from([None, "", "gov.rate:1", "gov.rate:2"]),
|
|
289
|
+
st.lists(st.sampled_from(EXTENSION_NAMES), max_size=2),
|
|
290
|
+
st.booleans(),
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
@hypothesis.settings(
|
|
295
|
+
max_examples=200,
|
|
296
|
+
deadline=None,
|
|
297
|
+
suppress_health_check=[hypothesis.HealthCheck.function_scoped_fixture],
|
|
298
|
+
)
|
|
299
|
+
@hypothesis.given(requests=st.lists(request_strategy, max_size=25))
|
|
300
|
+
def test_the_cache_matches_a_reference_dict_and_keeps_the_callers_state(
|
|
301
|
+
gc_calls, monkeypatch, requests
|
|
302
|
+
):
|
|
303
|
+
# Each example starts from an empty cache.
|
|
304
|
+
monkeypatch.setattr(
|
|
305
|
+
test_runner, "_tax_benefit_system_cache", weakref.WeakKeyDictionary()
|
|
306
|
+
)
|
|
307
|
+
log = []
|
|
308
|
+
baseline = RecordingSystem(log)
|
|
309
|
+
reference = {}
|
|
310
|
+
forced = 0
|
|
311
|
+
for reforms, reform_key, extensions, enabled_before in requests:
|
|
312
|
+
key = (tuple(reforms), reform_key, frozenset(extensions))
|
|
313
|
+
clones_before = sum(name == "clone" for name, _ in log)
|
|
314
|
+
set_gc(enabled_before)
|
|
315
|
+
del gc_calls[:]
|
|
316
|
+
|
|
317
|
+
system = _get_tax_benefit_system(
|
|
318
|
+
baseline, list(reforms), list(extensions), reform_key=reform_key
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
assert gc.isenabled() is enabled_before
|
|
322
|
+
assert all(not enabled for _, enabled in log)
|
|
323
|
+
built = sum(name == "clone" for name, _ in log) > clones_before
|
|
324
|
+
# The reference dict holds what the cache held before this call.
|
|
325
|
+
collects = built and enabled_before and len(reference) < LIMIT
|
|
326
|
+
assert collections(gc_calls) == ([FULL] if collects else [])
|
|
327
|
+
forced += collects
|
|
328
|
+
assert forced <= LIMIT
|
|
329
|
+
if key in reference:
|
|
330
|
+
assert system is reference[key]
|
|
331
|
+
assert not built
|
|
332
|
+
assert gc_calls == []
|
|
333
|
+
else:
|
|
334
|
+
assert built
|
|
335
|
+
assert all(system is not other for other in reference.values())
|
|
336
|
+
assert system.reforms == tuple(reforms)
|
|
337
|
+
assert sorted(system.extensions) == sorted(extensions)
|
|
338
|
+
reference[key] = system
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
yaml_tests_dir = os.path.dirname(yaml_tests.__file__)
|
|
342
|
+
|
|
343
|
+
INLINE_PARAMETER_CASES = """
|
|
344
|
+
- name: "A dotted parameter input builds a reform system"
|
|
345
|
+
period: 2017-01
|
|
346
|
+
input:
|
|
347
|
+
taxes.income_tax_rate: 0.2
|
|
348
|
+
salary: 2000
|
|
349
|
+
output:
|
|
350
|
+
income_tax: 400
|
|
351
|
+
|
|
352
|
+
- name: "A second parameter value builds another"
|
|
353
|
+
period: 2017-01
|
|
354
|
+
input:
|
|
355
|
+
taxes.income_tax_rate: 0.25
|
|
356
|
+
salary: 2000
|
|
357
|
+
output:
|
|
358
|
+
income_tax: 500
|
|
359
|
+
|
|
360
|
+
- name: "A failing case fails either way"
|
|
361
|
+
period: 2017-01
|
|
362
|
+
input:
|
|
363
|
+
taxes.income_tax_rate: 0.2
|
|
364
|
+
salary: 2000
|
|
365
|
+
output:
|
|
366
|
+
income_tax: 1
|
|
367
|
+
"""
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
def run_recording(paths, pause):
|
|
371
|
+
"""Run the YAML runner on a fresh baseline, with the real pause or none.
|
|
372
|
+
|
|
373
|
+
Returns the exit code, each case's outcome, each computed value, and
|
|
374
|
+
whether collection was enabled at each system clone.
|
|
375
|
+
"""
|
|
376
|
+
outcomes = []
|
|
377
|
+
values = []
|
|
378
|
+
gc_at_clones = []
|
|
379
|
+
|
|
380
|
+
class Outcomes:
|
|
381
|
+
def pytest_runtest_logreport(self, report):
|
|
382
|
+
if report.when == "call":
|
|
383
|
+
outcomes.append((report.nodeid, report.outcome))
|
|
384
|
+
|
|
385
|
+
assert_near = test_runner.assert_near
|
|
386
|
+
clone = TaxBenefitSystem.clone
|
|
387
|
+
|
|
388
|
+
def recording_assert_near(value, target_value, *args, **kwargs):
|
|
389
|
+
values.append((kwargs.get("message"), repr(value)))
|
|
390
|
+
return assert_near(value, target_value, *args, **kwargs)
|
|
391
|
+
|
|
392
|
+
def recording_clone(self):
|
|
393
|
+
gc_at_clones.append(gc.isenabled())
|
|
394
|
+
return clone(self)
|
|
395
|
+
|
|
396
|
+
baseline = CountryTaxBenefitSystem()
|
|
397
|
+
with pytest.MonkeyPatch.context() as patch:
|
|
398
|
+
patch.setattr(test_runner, "assert_near", recording_assert_near)
|
|
399
|
+
patch.setattr(TaxBenefitSystem, "clone", recording_clone)
|
|
400
|
+
if not pause:
|
|
401
|
+
patch.setattr(
|
|
402
|
+
test_runner,
|
|
403
|
+
"_automatic_gc_paused",
|
|
404
|
+
lambda collect=True: contextlib.nullcontext(),
|
|
405
|
+
)
|
|
406
|
+
# run_tests' own arguments, plus a plugin that records outcomes.
|
|
407
|
+
exit_code = pytest.main(
|
|
408
|
+
["--capture", "no", "--maxfail", "0", "--tb", "no", "-q", *paths],
|
|
409
|
+
plugins=[test_runner.OpenFiscaPlugin(baseline, {}), Outcomes()],
|
|
410
|
+
)
|
|
411
|
+
return exit_code, outcomes, values, gc_at_clones
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
def test_yaml_cases_have_the_same_outcomes_with_and_without_the_pause(
|
|
415
|
+
restore_gc, tmp_path
|
|
416
|
+
):
|
|
417
|
+
gc.enable()
|
|
418
|
+
inline = tmp_path / "inline_parameters.yaml"
|
|
419
|
+
inline.write_text(INLINE_PARAMETER_CASES, encoding="utf-8")
|
|
420
|
+
paths = [
|
|
421
|
+
os.path.join(yaml_tests_dir, "test_with_reform.yaml"),
|
|
422
|
+
os.path.join(yaml_tests_dir, "test_with_reform_2.yaml"),
|
|
423
|
+
os.path.join(yaml_tests_dir, "test_with_extension.yaml"),
|
|
424
|
+
str(inline),
|
|
425
|
+
]
|
|
426
|
+
|
|
427
|
+
paused = run_recording(paths, pause=True)
|
|
428
|
+
unpaused = run_recording(paths, pause=False)
|
|
429
|
+
|
|
430
|
+
exit_code, outcomes, values, gc_at_clones = paused
|
|
431
|
+
assert paused[:3] == unpaused[:3]
|
|
432
|
+
assert exit_code == pytest.ExitCode.TESTS_FAILED
|
|
433
|
+
assert [outcome for _, outcome in outcomes].count("failed") == 2
|
|
434
|
+
assert len(outcomes) == 8
|
|
435
|
+
assert len(values) >= 8
|
|
436
|
+
# Six builds (two reform lists, the empty combination, one extension and
|
|
437
|
+
# two parameter values) cloned the system with collection paused, and
|
|
438
|
+
# with the pause removed every clone ran with collection on.
|
|
439
|
+
assert len(gc_at_clones) >= 6
|
|
440
|
+
assert not any(gc_at_clones)
|
|
441
|
+
assert len(unpaused[3]) == len(gc_at_clones)
|
|
442
|
+
assert all(unpaused[3])
|
|
443
|
+
assert gc.isenabled()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/is-version-number-acceptable.sh
RENAMED
|
File without changes
|
|
File without changes
|
{policyengine_core-3.34.1 → policyengine_core-3.34.2}/.github/requirements/legacy-country-smoke.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|