policyengine-core 3.37.1__tar.gz → 3.37.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.37.1 → policyengine_core-3.37.2}/CHANGELOG.md +11 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/PKG-INFO +1 -1
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter_node.py +66 -5
- policyengine_core-3.37.2/policyengine_core/parameters/parameter_node_at_instant.py +372 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/pyproject.toml +1 -1
- policyengine_core-3.37.2/tests/core/parameters/test_parameter_node_add_child_caches.py +226 -0
- policyengine_core-3.37.2/tests/core/parameters/test_parameter_node_at_instant_copies.py +504 -0
- policyengine_core-3.37.2/tests/core/parameters/test_parameter_node_at_instant_lazy.py +613 -0
- policyengine_core-3.37.2/tests/core/parameters/test_parameter_node_at_instant_property.py +91 -0
- policyengine_core-3.37.2/tests/core/parameters/test_parameter_node_at_instant_systems.py +383 -0
- policyengine_core-3.37.2/tests/fixtures/parameter_nodes_at_instant.py +131 -0
- policyengine_core-3.37.1/policyengine_core/parameters/parameter_node_at_instant.py +0 -83
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/ISSUE_TEMPLATE.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/actionlint.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/bump_version.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/changelog_template.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/get-changelog-diff.sh +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/has-functional-changes.sh +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/is-version-number-acceptable.sh +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/publish-git-tag.sh +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/requirements/legacy-country-smoke.txt +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/workflows/pr.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.github/workflows/push.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.gitignore +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/.python-version +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/AGENTS.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/CLAUDE.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/CONTRIBUTING.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/LICENSE +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/MANIFEST.in +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/Makefile +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/README.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/_build/logs/myst.build.json +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/changelog.d/.gitkeep +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/_config.yml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/_static/style.css +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/_toc.yml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/add_plotly_to_book.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/contributing/intro.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/engineering/skills/README.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/engineering/skills/documentation_review.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/engineering/skills/github-prs.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/engineering/skills/testing.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/intro.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/logo.png +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/commons.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/country_template.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/data.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/data_storage.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/entities.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/enums.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/errors.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/experimental.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/extension_template.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/holders.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/parameters.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/periods.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/populations.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/projectors.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/reforms.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/scripts.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/simulations.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/taxbenefitsystems.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/taxscales.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/tools.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/tracers.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/types.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/variables.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/python_api/warnings.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/branches.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/country.ipynb +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/datasets.ipynb +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/parameters.md +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/reforms.ipynb +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/docs/usage/simulation.ipynb +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/mypy.ini +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/build_metadata.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/charts/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/charts/bar.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/charts/formatting.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/commons/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/commons/formulas.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/commons/misc.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/commons/rates.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/constants.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/data/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/data/datasets/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/data/datasets/country_template_dataset.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/entities.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/modelled_policies.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/benefits/basic_income.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/benefits/housing_allowance.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/benefits/index.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/benefits/parenting_allowance/amount.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/benefits/parenting_allowance/income_threshold.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/general/age_of_majority.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/general/age_of_retirement.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/taxes/housing_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/taxes/income_tax_rate.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/parameters/taxes/social_security_contribution.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/add_dynamic_variable.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/add_new_tax.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/flat_social_security_contribution.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/modify_social_security_taxation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/reforms/removal_basic_income.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/situation_examples/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/situation_examples/couple.json +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/situation_examples/housing.json +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/situation_examples/single.json +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/age.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/basic_income.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/disposable_income.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/housing_allowance.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/housing_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/income_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/reforms/add_dynamic_variable.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/reforms/add_new_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/reforms/modify_social_security_taxation.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/situations/income_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/situations/parenting_allowance.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/social_security_contribution.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/tests/test_microsimulation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/benefits.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/demographics.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/housing.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/ids.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/income.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/stats.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/country_template/variables/taxes.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data/dataset.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/in_memory_storage.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/on_disk_storage.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/storage_directory.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/storage_keys.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_storage/store_history.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_structures/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_structures/parameter_metadata.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_structures/parameter_node_metadata.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_structures/reference.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/data_structures/unit.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/entities/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/entities/entity.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/entities/group_entity.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/entities/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/entities/role.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/enums/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/enums/config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/enums/enum.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/enums/enum_array.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/cycle_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/empty_argument_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/nan_creation_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/non_deterministic_formula_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/parameter_not_found_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/parameter_parsing_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/period_mismatch_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/situation_parsing_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/spiral_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/variable_name_conflict_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/errors/variable_not_found_error.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/experimental/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/experimental/memory_config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/local_benefit.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/parameters/local_town/child_allowance/amount.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/parameters/local_town/child_allowance/index.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/parameters/local_town/index.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/extension_template/tests/local_benefit.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/holders/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/holders/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/holders/holder.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/model_api.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/at_instant_like.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/get_parameter.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/homogenize_parameters.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/interpolate_parameters.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/propagate_parameter_metadata.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/operations/uprate_parameters.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter_at_instant.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter_scale_bracket.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/vectorial_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/periods/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/periods/config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/periods/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/periods/instant_.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/periods/period_.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/populations/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/populations/config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/populations/group_population.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/populations/population.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/entity_to_person_projector.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/first_person_to_entity_projector.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/projector.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/projectors/unique_role_to_entity_projector.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/reforms/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/reforms/reform.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/assets/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/assets/index.html +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/policyengine_command.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/run_data.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/run_test.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/scripts/simulation_generator.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/individual_sim.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/microsimulation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/simulation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/simulation_builder.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/simulations/simulation_macro_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxbenefitsystems/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxbenefitsystems/tax_benefit_system.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/abstract_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/amount_tax_scale_like.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/rate_tax_scale_like.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/single_amount_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/taxscales/tax_scale_like.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/google_cloud.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/hugging_face.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/simulation_dumper.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/test_from_situation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/test_runner.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tools/win_file_manager.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/computation_log.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/flat_trace.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/full_tracer.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/performance_log.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/simple_tracer.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/trace_node.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/tracing_parameter_node_at_instant.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/tracers/variable_graph.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/types/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/types/data_types/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/types/data_types/arrays.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/config.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/defined_for.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/formula_randomness.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/helpers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/typing.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/variables/variable.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/warnings/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/warnings/libyaml_warning.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/warnings/memory_config_warning.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/warnings/parameter_key_warning.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/policyengine_core/warnings/tempfile_warning.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/pytest.ini +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/conftest.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/test_between_function.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/test_formulas.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/test_is_in_function.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/test_random_seed.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/commons/test_rates.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/data/test_dataset.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/enums/test_enum.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/model_api/test_index_.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/array_type.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/duplicate_key.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/filesystem_hierarchy/empty_index_file/index.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/filesystem_hierarchy/node1/param.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/indentation.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/missing_value.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/parameter_for_unit_propagation.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/test_parameter_clone.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/test_parameter_validation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/test_propagate_units.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/test_unknown_keys.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/unexpected_key_in_parameter.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/unexpected_key_in_scale.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/unexpected_key_in_value_at_instant.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/unexpected_key_in_value_history.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/unknown_key_beside_values.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/uprating_under_metadata.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_date.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_scale.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_type_in_bracket.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_type_in_brackets.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_type_in_parameter.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_type_in_scale.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_type_in_value_history.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/wrong_value.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameter_validation/yaml_hierarchy/node1.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_base_uprating.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_base_uprating_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_homogenization_parent_links.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_interpolation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_nesting.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_propagation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_scale_threshold_uprating.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/operations/test_uprating.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_numpy2_structured_arrays.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_parameter_metadata_clone.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_parameter_metadata_clone_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_parameter_tree_parent_links.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_vectorial_parameter_node_copy.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters/test_vectorial_parameter_node_copy_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/bareme.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/local_tax.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/rate.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/test_fancy_indexing.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/parameters_fancy_indexing/test_fancy_indexing_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/simulations/test_formula_randomness_concurrency.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_abstract_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_abstract_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_linear_average_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_linear_average_rate_tax_scale_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_marginal_amount_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_marginal_rate_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_rate_scale_conversion_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_rate_tax_scale_like.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_single_amount_tax_scale.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tax_scales/test_tax_scales_commons.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_apply_reform_holders.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_apply_reform_holders_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_apply_reform_invalidates_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_apply_reform_preserves_user_inputs.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_assert_near_precision.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_axes.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_bincount_minlength.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_helper_invalidation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_input_fixed_point.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_input_fixed_point_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_input_invalidation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_input_invalidation_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_scoped_delete_arrays.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_shared_arrays.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_branch_shared_arrays_differential.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_build_metadata.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_calculate_output.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_carry_over_order.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_carry_over_order_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_clone_invalidated_caches.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_clone_rebinding.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_clone_rebinding_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_clone_reform_baseline.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_clone_reform_baseline_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_countries.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_cycles.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_data_storage_dir.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_data_storage_dir_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dataset_default_role.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dataset_default_role_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dataset_getattr.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dataset_unknown_column_warning.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_default_simulation_count_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_disk_period_filenames.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_disk_storage_delete_contained_periods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_disk_storage_delete_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_disk_storage_differential.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_disk_storage_ownership.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_docs_deployment.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dump_restore.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_dump_restore_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_entities.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_eternity_subperiods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_extensions.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_fast_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_fast_cache_contained_periods_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_fast_cache_guards.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_formulas.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_group_population_empty.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_group_population_reductions_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_holder_branch_fallback.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_holder_write_fast_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_holder_write_fast_cache_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_holders.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_input_tier_invalidation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_join_with_persons_identity.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_join_with_persons_identity_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_known_periods_branch_visibility.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_known_periods_branch_visibility_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_macro_cache_not_singleton.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_medium_fixes.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_calculate_signatures.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_internal_calls.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_option_reads.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_option_reads_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_person_accessor.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_microsimulation_weights.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_on_disk_storage_clones.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_opt_out_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_option_result_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_option_result_cache_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_option_result_input_provenance.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_own_period_input_overlapping_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_pandas3_compatibility.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_parameter_security.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_parameters.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_periods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_projectors.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_reform_baseline_system.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_reform_parameter_isolation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_reform_period_keys.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_reforms.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_registered_input_deletion.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_release_tagging.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_rerun_fixture_isolation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_restore_input_provenance.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_restore_input_registry.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_restore_input_registry_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_set_input_helper_order.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_set_input_helper_order_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_simulation_builder.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_simulation_copy_pickle.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_simulation_copy_pickle_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_simulations.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_stable_hash_seed.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_stale_frame_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_storage_anchored_periods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_storage_delete_branch.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_storage_input_index.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_storage_shared_index.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_storage_shared_index_differential.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_baseline_branch.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_computed_values.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_computed_values_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_deleted_inputs.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_entity_weight_totals.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_inputs_only.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_inputs_only_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_invalidates_cache.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_membership_ids.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_restore_inputs.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_sampling_period.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_sampling_period_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_structural_ids.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_subsample_weight_fallback.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_tax_benefit_system_cache_identity.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_tracers.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_tracing_parameter_isolation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_tracing_parameter_isolation_properties.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_uprating_order.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_uprating_order_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_user_input_keys.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_user_input_keys_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_user_input_keys_soundness.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_variable_code_sharing.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_variable_code_sharing_property.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/test_yaml.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/test_assert_near.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/test_google_cloud.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/test_hugging_face.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/test_runner/test_gc_pause.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/tools/test_runner/test_yaml_runner.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_adds.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_annualize.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_bounds.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_defined_for.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_formula_randomness.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_non_numeric_uprating_and_defined_for.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_subtracts.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_subtracts_sign.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_variable_clone.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_variable_formula_determinism.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_variable_uprating.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/core/variables/test_variables.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/appclient.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/branch_input_invalidation.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/branch_shared_arrays.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/carry_over.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/chained_uprating_reference.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/data_storage_dir.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/disk_storage.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/entities.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/fast_cache_contained_periods.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/microsimulation_internal_calls.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/microsimulation_option_reads.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/option_caches.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/parameter_metadata_clones.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/reform_holders.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/set_input_helper_order.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/simulation_copy.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/simulations.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/subsample_inputs.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/taxbenefitsystems.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/tracing.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/uprated_inputs.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/uprating_order.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/variables.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/vectorial_parameter_nodes.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/__init__.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/directory/subdirectory/test_4.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/directory/test_1.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/directory/test_2.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/failing_test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/failing_test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_absolute_error_margin.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_failure.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_name_filter.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_relative_error_margin.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_success.yml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_with_anchors.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_with_extension.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_with_reform.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/fixtures/yaml_tests/test_with_reform_2.yaml +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/smoke/test_country_init.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/tests/smoke/test_us.py +0 -0
- {policyengine_core-3.37.1 → policyengine_core-3.37.2}/uv.lock +0 -0
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [3.37.2] - 2026-11-24
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- Resolve `ParameterNodeAtInstant` children on first read instead of building the whole parameter tree for every instant, which cost policyengine-us 16 to 33 MB and several seconds per instant on every tax-benefit system, so a node at instant held across an in-place parameter change, such as one returned by `TaxBenefitSystem.get_parameters_at_instant`, now reads the changed value for each child it has not read yet, while the children it has read keep their values, where before every child kept the value from when the node was built.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Clear the nodes at instant cached by a parameter node and every node above it when `ParameterNode.add_child` adds a child, so that a node at instant requested afterwards includes the new child.
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
## [3.37.1] - 2026-11-19
|
|
2
13
|
|
|
3
14
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: policyengine-core
|
|
3
|
-
Version: 3.37.
|
|
3
|
+
Version: 3.37.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.37.1 → policyengine_core-3.37.2}/policyengine_core/parameters/parameter_node.py
RENAMED
|
@@ -74,6 +74,50 @@ def _check_child_type(child) -> None:
|
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
|
|
77
|
+
def _clear_at_instant_caches_upward(node) -> None:
|
|
78
|
+
"""Clear the nodes at instant cached by ``node`` and every node above it.
|
|
79
|
+
|
|
80
|
+
``add_child`` uses this instead of ``clear_parent_cache`` so that it keeps
|
|
81
|
+
accepting every tree it accepted before it cleared caches. It walks up
|
|
82
|
+
without recursing and stops at a node it has already seen, so a loop in
|
|
83
|
+
the ``parent`` links ends. It skips a node with no cache of its own, such
|
|
84
|
+
as one built without ``ParameterNode.__init__``, and a parent that is not
|
|
85
|
+
a parameter node.
|
|
86
|
+
"""
|
|
87
|
+
seen = set()
|
|
88
|
+
while node is not None and id(node) not in seen:
|
|
89
|
+
seen.add(id(node))
|
|
90
|
+
cache = node.__dict__.get("_at_instant_cache")
|
|
91
|
+
if isinstance(cache, dict):
|
|
92
|
+
cache.clear()
|
|
93
|
+
node = getattr(node, "parent", None)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class _AtInstantCache(dict):
|
|
97
|
+
"""A parameter node's nodes at instant, by instant.
|
|
98
|
+
|
|
99
|
+
Reads add to it: a node at instant that resolves a child fills that
|
|
100
|
+
child's cache. So a copy or a pickle takes its items in one step first,
|
|
101
|
+
instead of going through the dictionary while another thread adds to it.
|
|
102
|
+
It stays one object, so parameter nodes that share it, such as shallow
|
|
103
|
+
copies, share its copy too. A pickle holds a plain ``dict``, which earlier
|
|
104
|
+
versions of core can load, and which ``_get_at_instant`` replaces by one
|
|
105
|
+
of these before it adds to it.
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
__slots__ = ()
|
|
109
|
+
|
|
110
|
+
def __reduce_ex__(self, protocol):
|
|
111
|
+
return (dict, (dict.copy(self),))
|
|
112
|
+
|
|
113
|
+
def __deepcopy__(self, memo: dict) -> "_AtInstantCache":
|
|
114
|
+
copied = type(self)()
|
|
115
|
+
memo[id(self)] = copied
|
|
116
|
+
for instant, node_at_instant in dict.copy(self).items():
|
|
117
|
+
copied[copy.deepcopy(instant, memo)] = copy.deepcopy(node_at_instant, memo)
|
|
118
|
+
return copied
|
|
119
|
+
|
|
120
|
+
|
|
77
121
|
class ParameterNode(AtInstantLike):
|
|
78
122
|
"""
|
|
79
123
|
A node in the legislation `parameter tree <https://openfisca.org/doc/coding-the-legislation/legislation_parameters.html>`_.
|
|
@@ -135,7 +179,9 @@ class ParameterNode(AtInstantLike):
|
|
|
135
179
|
self.trace: bool = False
|
|
136
180
|
self.tracer = None
|
|
137
181
|
self.branch_name = None
|
|
138
|
-
self._at_instant_cache: typing.Dict[Instant, ParameterNodeAtInstant] =
|
|
182
|
+
self._at_instant_cache: typing.Dict[Instant, ParameterNodeAtInstant] = (
|
|
183
|
+
_AtInstantCache()
|
|
184
|
+
)
|
|
139
185
|
self.parent = None
|
|
140
186
|
|
|
141
187
|
if directory_path:
|
|
@@ -217,10 +263,15 @@ class ParameterNode(AtInstantLike):
|
|
|
217
263
|
|
|
218
264
|
:param name: Name of the child that must be used to access that child. Should not contain anything that could interfere with the operator `.` (dot). The child is also set as an attribute of the node, unless the name matches one of the node's own attributes (such as ``parent`` or ``children``) or a method or class attribute of its class; it then stays reachable through ``children`` and at-instant lookups.
|
|
219
265
|
:param child: The new child, an instance of :class:`.ParameterScale` or :class:`.Parameter` or :class:`.ParameterNode`.
|
|
266
|
+
|
|
267
|
+
Nodes at instant cached by this node and by every node above it were
|
|
268
|
+
built without the new child, so they are cleared.
|
|
220
269
|
"""
|
|
221
270
|
if name in self.children:
|
|
222
271
|
raise ValueError("{} has already a child named {}".format(self.name, name))
|
|
223
272
|
_check_child_type(child)
|
|
273
|
+
# Nodes at instant cached here and above were built without the child.
|
|
274
|
+
_clear_at_instant_caches_upward(self)
|
|
224
275
|
self._link_child(name, child)
|
|
225
276
|
|
|
226
277
|
def _replace_child(
|
|
@@ -303,13 +354,14 @@ class ParameterNode(AtInstantLike):
|
|
|
303
354
|
if _can_expose_child_as_attribute(clone, child_key):
|
|
304
355
|
setattr(clone, child_key, child)
|
|
305
356
|
child.parent = clone
|
|
306
|
-
clone._at_instant_cache =
|
|
357
|
+
clone._at_instant_cache = _AtInstantCache()
|
|
307
358
|
|
|
308
359
|
return clone
|
|
309
360
|
|
|
310
361
|
def _get_at_instant(self, instant: Instant) -> ParameterNodeAtInstant:
|
|
311
|
-
|
|
312
|
-
|
|
362
|
+
cache = self._at_instant_cache
|
|
363
|
+
if instant in cache:
|
|
364
|
+
return cache[instant]
|
|
313
365
|
node_at_instant = ParameterNodeAtInstant(self.name, self, instant)
|
|
314
366
|
if self.trace:
|
|
315
367
|
at_instant = TracingParameterNodeAtInstant(
|
|
@@ -317,7 +369,16 @@ class ParameterNode(AtInstantLike):
|
|
|
317
369
|
)
|
|
318
370
|
else:
|
|
319
371
|
at_instant = node_at_instant
|
|
320
|
-
|
|
372
|
+
# Building the node can read code that replaces this node's cache, so
|
|
373
|
+
# store into the cache the node holds now, as before.
|
|
374
|
+
cache = self._at_instant_cache
|
|
375
|
+
if type(cache) is dict:
|
|
376
|
+
# A plain ``dict`` set from outside core (policyengine-us's path
|
|
377
|
+
# copies set one) changes as this node is read, so copying it
|
|
378
|
+
# while another thread reads could fail. It is replaced, with its
|
|
379
|
+
# entries, rather than written to.
|
|
380
|
+
cache = self._at_instant_cache = _AtInstantCache(cache)
|
|
381
|
+
cache[instant] = at_instant
|
|
321
382
|
return at_instant
|
|
322
383
|
|
|
323
384
|
def attach_to_parent(self, parent: "ParameterNode"):
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import threading
|
|
4
|
+
from typing import TYPE_CHECKING, Iterable, Union
|
|
5
|
+
|
|
6
|
+
import numpy
|
|
7
|
+
|
|
8
|
+
from policyengine_core import parameters, periods, tools
|
|
9
|
+
from policyengine_core.errors import ParameterNotFoundError
|
|
10
|
+
from policyengine_core.parameters import helpers
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from policyengine_core.parameters.parameter_node import ParameterNode
|
|
14
|
+
|
|
15
|
+
from policyengine_core.parameters.vectorial_parameter_node_at_instant import (
|
|
16
|
+
VectorialParameterNodeAtInstant,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# The one instance attribute a node keeps for itself; a parameter of this
|
|
21
|
+
# name is rejected.
|
|
22
|
+
_STATE = "_ParameterNodeAtInstant__state"
|
|
23
|
+
# Attributes a node sets on itself, which a child of the same name shadows.
|
|
24
|
+
_OWN_NAMES = frozenset({"_name", "_instant_str", "_children", "_vectorial_node"})
|
|
25
|
+
_MISSING = object()
|
|
26
|
+
|
|
27
|
+
# Held while a child is resolved for the first time, so that concurrent
|
|
28
|
+
# readers never see a half-resolved node or resolve one child twice. Reads of
|
|
29
|
+
# a resolved child never take it. Reentrant because resolving a child can
|
|
30
|
+
# build that child's own node.
|
|
31
|
+
_RESOLUTION_LOCK = threading.RLock()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _replace_resolution_lock() -> None:
|
|
35
|
+
"""Give a forked process a lock that no thread holds. A thread that held
|
|
36
|
+
the lock when another thread forked does not exist in the forked process,
|
|
37
|
+
so nothing there would release it, and the first resolution would wait for
|
|
38
|
+
ever."""
|
|
39
|
+
global _RESOLUTION_LOCK
|
|
40
|
+
_RESOLUTION_LOCK = threading.RLock()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if hasattr(os, "register_at_fork"):
|
|
44
|
+
os.register_at_fork(after_in_child=_replace_resolution_lock)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _copied_state(instance):
|
|
48
|
+
"""What ``object.__getstate__`` gives, with the instance dictionary
|
|
49
|
+
copied: a ``dict``, ``None`` when it is empty, or a ``(dict, slots)`` pair
|
|
50
|
+
for an instance with ``__slots__``.
|
|
51
|
+
|
|
52
|
+
Reads change the dictionaries of parameter nodes and nodes at instant, so
|
|
53
|
+
copying or pickling a dictionary itself would fail if another thread read
|
|
54
|
+
meanwhile. Copying a ``dict`` is a single step for other threads.
|
|
55
|
+
"""
|
|
56
|
+
state = object.__getstate__(instance)
|
|
57
|
+
if isinstance(state, tuple):
|
|
58
|
+
attributes, slots = state
|
|
59
|
+
return (None if attributes is None else dict(attributes), slots)
|
|
60
|
+
return None if state is None else dict(state)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Instant strings that ``periods.instant`` has accepted.
|
|
64
|
+
_DATES = set()
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _is_date(instant_str) -> bool:
|
|
68
|
+
if not isinstance(instant_str, str):
|
|
69
|
+
return False
|
|
70
|
+
if instant_str in _DATES:
|
|
71
|
+
return True
|
|
72
|
+
try:
|
|
73
|
+
# As a scale's build reads it: ``str`` checks that the day exists.
|
|
74
|
+
str(periods.instant(instant_str))
|
|
75
|
+
except ValueError:
|
|
76
|
+
return False
|
|
77
|
+
_DATES.add(instant_str)
|
|
78
|
+
return True
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class _LazyChildren:
|
|
82
|
+
"""What a node at instant knows about its children. A shallow copy of the
|
|
83
|
+
node shares it, as copies of a node that built every child up front shared
|
|
84
|
+
their ``_children`` mapping."""
|
|
85
|
+
|
|
86
|
+
__slots__ = ("instant", "source", "resolved", "absent", "added", "children")
|
|
87
|
+
|
|
88
|
+
def __init__(self, instant: str, source: dict):
|
|
89
|
+
self.instant = instant
|
|
90
|
+
# Each child's parameter node as at construction, in order; None once
|
|
91
|
+
# every child is resolved.
|
|
92
|
+
self.source = source
|
|
93
|
+
# Children resolved from ``source`` so far.
|
|
94
|
+
self.resolved = {}
|
|
95
|
+
# Children of ``source`` with no value at the instant.
|
|
96
|
+
self.absent = set()
|
|
97
|
+
# Children given with ``add_child``, in call order.
|
|
98
|
+
self.added = {}
|
|
99
|
+
# Every child in order, once all of ``source`` is resolved.
|
|
100
|
+
self.children = None
|
|
101
|
+
|
|
102
|
+
def __getstate__(self) -> dict:
|
|
103
|
+
# Only a deep copy or a pickle copies this state; a shallow copy of
|
|
104
|
+
# the node shares it. Either is a snapshot, as when every child was
|
|
105
|
+
# built up front: resolving every child first lets go of ``source``,
|
|
106
|
+
# whose parameter nodes would bring the whole tree, through their
|
|
107
|
+
# parents, into the copy. Once every child is resolved, reads no
|
|
108
|
+
# longer change these containers (only ``add_child`` does), so they
|
|
109
|
+
# are given as they are and keep their identities. Pickle protocols 0
|
|
110
|
+
# and 1 also refuse a class with ``__slots__`` that does not define
|
|
111
|
+
# this.
|
|
112
|
+
with _RESOLUTION_LOCK:
|
|
113
|
+
_resolve_remaining(self)
|
|
114
|
+
return {name: getattr(self, name) for name in self.__slots__}
|
|
115
|
+
|
|
116
|
+
def __setstate__(self, state) -> None:
|
|
117
|
+
if isinstance(state, tuple):
|
|
118
|
+
# ``(None, slots)``, as ``object.__getstate__`` gives for a class
|
|
119
|
+
# with ``__slots__``.
|
|
120
|
+
state = state[1]
|
|
121
|
+
for name in self.__slots__:
|
|
122
|
+
setattr(self, name, state[name])
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class ParameterNodeAtInstant:
|
|
126
|
+
"""
|
|
127
|
+
Parameter node of the legislation, at a given instant.
|
|
128
|
+
|
|
129
|
+
Children resolve on first read and are kept from then on. Building every
|
|
130
|
+
descendant up front made each instant a model is asked about cost a copy of
|
|
131
|
+
the whole parameter tree (16 to 33 MB and several seconds per instant for
|
|
132
|
+
policyengine-us), which every tax-benefit system then kept for its
|
|
133
|
+
lifetime. Which children a node has, and in what order, is fixed when it is
|
|
134
|
+
built. A child's value is taken when the child is first read, so a node
|
|
135
|
+
held across an in-place change to its parameters reads the changed value
|
|
136
|
+
for a child it has not read yet; once read (including found to have no
|
|
137
|
+
value), a child keeps what that read found.
|
|
138
|
+
|
|
139
|
+
A child that fails to build at the instant (a scale that refuses its
|
|
140
|
+
brackets, say) fails when it is read, not when the node is built, so the
|
|
141
|
+
node's other children can be read. A deep copy or pickle of the node
|
|
142
|
+
builds every child, so it fails then too.
|
|
143
|
+
|
|
144
|
+
Several threads can read a node, and copy or pickle it while others read.
|
|
145
|
+
A deep copy or pickle of a node resolves every child first, so it holds
|
|
146
|
+
the same values as when every child was built up front, and no parameter
|
|
147
|
+
nodes. Its pickle holds this version's lazy state, which earlier versions
|
|
148
|
+
of core can't load. At an instant that is not a date, and in a subclass,
|
|
149
|
+
every child is built up front, as before.
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
def __init__(self, name: str, node: "ParameterNode", instant_str: str):
|
|
153
|
+
"""
|
|
154
|
+
:param name: Name of the node.
|
|
155
|
+
:param node: Original :any:`ParameterNode` instance.
|
|
156
|
+
:param instant_str: A date in the format `YYYY-MM-DD`.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
# The "technical" attributes are hidden, so that the node children can be easily browsed with auto-completion without pollution
|
|
160
|
+
self._name = name
|
|
161
|
+
self._instant_str = instant_str
|
|
162
|
+
source = dict(node.children.items())
|
|
163
|
+
if _STATE in source:
|
|
164
|
+
raise ValueError(f"{_STATE!r} cannot name a parameter.")
|
|
165
|
+
state = _LazyChildren(instant_str, source)
|
|
166
|
+
self.__dict__[_STATE] = state
|
|
167
|
+
cls = type(self)
|
|
168
|
+
if cls is not ParameterNodeAtInstant:
|
|
169
|
+
# A subclass gets the up-front build, as before: its add_child
|
|
170
|
+
# sees every child, every child is an attribute before its own
|
|
171
|
+
# ``__getattr__`` or ``__getitem__`` runs, and ``_children`` is
|
|
172
|
+
# also the mapping items are read from.
|
|
173
|
+
children = {}
|
|
174
|
+
with _RESOLUTION_LOCK:
|
|
175
|
+
state.source = None
|
|
176
|
+
state.children = children
|
|
177
|
+
self.__dict__["_children"] = children
|
|
178
|
+
for child_name, child in source.items():
|
|
179
|
+
child_at_instant = child._get_at_instant(instant_str)
|
|
180
|
+
if child_at_instant is not None:
|
|
181
|
+
self.add_child(child_name, child_at_instant)
|
|
182
|
+
return
|
|
183
|
+
for child_name in source:
|
|
184
|
+
# A child whose name the node itself answers to shadows it, as
|
|
185
|
+
# when every child was set here.
|
|
186
|
+
if child_name in _OWN_NAMES or hasattr(cls, child_name):
|
|
187
|
+
child_at_instant = _resolve(state, child_name)
|
|
188
|
+
if child_at_instant is not _MISSING:
|
|
189
|
+
setattr(self, child_name, child_at_instant)
|
|
190
|
+
if not _is_date(instant_str):
|
|
191
|
+
# Built up front, a node at an instant that is not a date (such as
|
|
192
|
+
# ``parameters(None)``, which reads "None") failed on the first
|
|
193
|
+
# scale below it, and nothing was cached. Building it up front
|
|
194
|
+
# still does that, and otherwise holds what that build held.
|
|
195
|
+
_resolve_remaining(state)
|
|
196
|
+
|
|
197
|
+
def add_child(self, child_name: str, child_at_instant: "ParameterNodeAtInstant"):
|
|
198
|
+
if child_name == _STATE:
|
|
199
|
+
raise ValueError(f"{_STATE!r} cannot name a parameter.")
|
|
200
|
+
state = self.__dict__[_STATE]
|
|
201
|
+
with _RESOLUTION_LOCK:
|
|
202
|
+
state.added[child_name] = child_at_instant
|
|
203
|
+
if state.children is not None:
|
|
204
|
+
state.children[child_name] = child_at_instant
|
|
205
|
+
setattr(self, child_name, child_at_instant)
|
|
206
|
+
|
|
207
|
+
def __getattr__(self, key: str):
|
|
208
|
+
# Reached only for a name that is not an instance attribute: a child
|
|
209
|
+
# not read yet by this instance, ``_children`` before it is set, or a
|
|
210
|
+
# name this node does not have.
|
|
211
|
+
state = self.__dict__.get(_STATE)
|
|
212
|
+
if state is None or key == "_name":
|
|
213
|
+
# An instance still being rebuilt by copy or pickle.
|
|
214
|
+
raise AttributeError(key)
|
|
215
|
+
if key == "_children":
|
|
216
|
+
return _materialise(self, state)
|
|
217
|
+
child_at_instant = _resolve(state, key)
|
|
218
|
+
if child_at_instant is not _MISSING:
|
|
219
|
+
# Attributes hold what the parameters give; ``add_child`` on
|
|
220
|
+
# another copy changes only that copy's attribute, as before.
|
|
221
|
+
self.__dict__.setdefault(key, child_at_instant)
|
|
222
|
+
return child_at_instant
|
|
223
|
+
param_name = helpers._compose_name(self._name, item_name=key)
|
|
224
|
+
raise ParameterNotFoundError(param_name, self._instant_str)
|
|
225
|
+
|
|
226
|
+
def __dir__(self):
|
|
227
|
+
children = self._children
|
|
228
|
+
names = set(super().__dir__()) | set(map(str, children))
|
|
229
|
+
names.discard(_STATE)
|
|
230
|
+
return list(names)
|
|
231
|
+
|
|
232
|
+
def __getstate__(self):
|
|
233
|
+
# Reads resolve children into ``__dict__``: see ``_copied_state``.
|
|
234
|
+
return _copied_state(self)
|
|
235
|
+
|
|
236
|
+
def __setstate__(self, state):
|
|
237
|
+
if isinstance(state, tuple):
|
|
238
|
+
state, slots = state
|
|
239
|
+
for slot_name, value in slots.items():
|
|
240
|
+
setattr(self, slot_name, value)
|
|
241
|
+
state = state or {}
|
|
242
|
+
self.__dict__.update(state)
|
|
243
|
+
if _STATE not in state:
|
|
244
|
+
# Pickled when every child was built up front, all in ``_children``.
|
|
245
|
+
children = state.get("_children")
|
|
246
|
+
if children is None:
|
|
247
|
+
children = self.__dict__["_children"] = {}
|
|
248
|
+
lazy = _LazyChildren(state.get("_instant_str"), None)
|
|
249
|
+
lazy.children = children
|
|
250
|
+
lazy.resolved = dict(children)
|
|
251
|
+
self.__dict__[_STATE] = lazy
|
|
252
|
+
|
|
253
|
+
def __getitem__(
|
|
254
|
+
self, key: str
|
|
255
|
+
) -> Union["ParameterNodeAtInstant", VectorialParameterNodeAtInstant]:
|
|
256
|
+
# If fancy indexing is used, cast to a vectorial node
|
|
257
|
+
# Convert pandas arrays (e.g., StringArray from pandas 3) to numpy
|
|
258
|
+
# before checking, since StringArray has __array__ but is not hashable
|
|
259
|
+
if hasattr(key, "__array__") and not isinstance(key, numpy.ndarray):
|
|
260
|
+
key = numpy.asarray(key)
|
|
261
|
+
if isinstance(key, numpy.ndarray):
|
|
262
|
+
# Cache the vectorial node to avoid rebuilding the recarray on
|
|
263
|
+
# every call -- build_from_node is expensive (walks the full
|
|
264
|
+
# parameter subtree each time).
|
|
265
|
+
try:
|
|
266
|
+
vectorial = self._vectorial_node
|
|
267
|
+
except AttributeError:
|
|
268
|
+
vectorial = parameters.VectorialParameterNodeAtInstant.build_from_node(
|
|
269
|
+
self
|
|
270
|
+
)
|
|
271
|
+
self._vectorial_node = vectorial
|
|
272
|
+
return vectorial[key]
|
|
273
|
+
state = self.__dict__[_STATE]
|
|
274
|
+
children = state.children
|
|
275
|
+
if children is not None:
|
|
276
|
+
# Every child is resolved: the items are ``_children``'s.
|
|
277
|
+
return children[key]
|
|
278
|
+
child_at_instant = state.added.get(key, _MISSING)
|
|
279
|
+
if child_at_instant is _MISSING:
|
|
280
|
+
child_at_instant = state.resolved.get(key, _MISSING)
|
|
281
|
+
if child_at_instant is _MISSING:
|
|
282
|
+
child_at_instant = _resolve(state, key)
|
|
283
|
+
if child_at_instant is _MISSING:
|
|
284
|
+
raise KeyError(key)
|
|
285
|
+
return child_at_instant
|
|
286
|
+
|
|
287
|
+
def __iter__(self) -> Iterable:
|
|
288
|
+
return iter(self._children)
|
|
289
|
+
|
|
290
|
+
def __repr__(self) -> str:
|
|
291
|
+
result = os.linesep.join(
|
|
292
|
+
[
|
|
293
|
+
os.linesep.join(["{}:", "{}"]).format(name, tools.indent(repr(value)))
|
|
294
|
+
for name, value in self._children.items()
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
return result
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def _resolve(state: _LazyChildren, child_name):
|
|
301
|
+
"""A child as the parameters give it, resolving it if no read has yet;
|
|
302
|
+
``_MISSING`` if the node has no such child or it has no value at the
|
|
303
|
+
instant."""
|
|
304
|
+
with _RESOLUTION_LOCK:
|
|
305
|
+
child_at_instant = state.resolved.get(child_name, _MISSING)
|
|
306
|
+
if child_at_instant is not _MISSING or child_name in state.absent:
|
|
307
|
+
return child_at_instant
|
|
308
|
+
source = state.source
|
|
309
|
+
child = None if source is None else source.get(child_name)
|
|
310
|
+
if child is None:
|
|
311
|
+
return _MISSING
|
|
312
|
+
child_at_instant = child._get_at_instant(state.instant)
|
|
313
|
+
# A read made while resolving (the same thread re-entering) may have
|
|
314
|
+
# recorded this child already; the first recorded result stands.
|
|
315
|
+
if child_name in state.absent:
|
|
316
|
+
return _MISSING
|
|
317
|
+
recorded = state.resolved.get(child_name, _MISSING)
|
|
318
|
+
if recorded is not _MISSING:
|
|
319
|
+
child_at_instant = recorded
|
|
320
|
+
elif child_at_instant is None:
|
|
321
|
+
state.absent.add(child_name)
|
|
322
|
+
else:
|
|
323
|
+
state.resolved[child_name] = child_at_instant
|
|
324
|
+
if state.source is not None and len(state.resolved) + len(state.absent) == len(
|
|
325
|
+
state.source
|
|
326
|
+
):
|
|
327
|
+
_complete(state)
|
|
328
|
+
return _MISSING if child_at_instant is None else child_at_instant
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def _complete(state: _LazyChildren):
|
|
332
|
+
"""Order every child once all of ``source`` is resolved; let go of the
|
|
333
|
+
parameter nodes. The caller holds ``_RESOLUTION_LOCK``."""
|
|
334
|
+
resolved, added = state.resolved, state.added
|
|
335
|
+
children = {
|
|
336
|
+
name: added.get(name, resolved[name])
|
|
337
|
+
for name in state.source
|
|
338
|
+
if name in resolved
|
|
339
|
+
}
|
|
340
|
+
for name, child_at_instant in added.items():
|
|
341
|
+
# Added children the parameters do not have (or have no value for)
|
|
342
|
+
# follow, in the order they were added.
|
|
343
|
+
children.setdefault(name, child_at_instant)
|
|
344
|
+
# ``resolved`` stays apart from ``children``: attribute reads return what
|
|
345
|
+
# the parameters give, whatever ``add_child`` or a direct write does to
|
|
346
|
+
# the items.
|
|
347
|
+
state.children = children
|
|
348
|
+
state.source = None
|
|
349
|
+
state.absent = set()
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def _resolve_remaining(state: _LazyChildren):
|
|
353
|
+
"""Resolve every child not read yet, and order every child."""
|
|
354
|
+
with _RESOLUTION_LOCK:
|
|
355
|
+
if state.children is None:
|
|
356
|
+
for child_name in list(state.source):
|
|
357
|
+
if state.children is not None:
|
|
358
|
+
break
|
|
359
|
+
_resolve(state, child_name)
|
|
360
|
+
if state.children is None:
|
|
361
|
+
_complete(state)
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def _materialise(node_at_instant: ParameterNodeAtInstant, state: _LazyChildren):
|
|
365
|
+
"""Resolve every child and set ``_children``."""
|
|
366
|
+
with _RESOLUTION_LOCK:
|
|
367
|
+
_resolve_remaining(state)
|
|
368
|
+
children = state.children
|
|
369
|
+
if "_children" not in node_at_instant.__dict__:
|
|
370
|
+
# Unless a child named ``_children`` took the name.
|
|
371
|
+
node_at_instant.__dict__["_children"] = children
|
|
372
|
+
return children
|