Repository navigation
Conversation
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Accept calendar clipping from either endpoint, diagnose a zero starting value, and count future cadence dates. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Compound annual amounts in the reference so valid zero-ending inputs produce a zero projection instead of sharing a synthetic-index division error. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self uprating compounds growth per whole year, month, or day. An amount that rises from 1 to 4 over two years projects to 8 in the following year. For extreme ratios, the calculation takes the roots of the endpoints before dividing. Opposite signs are valid over an odd number of intervals. See
policyengine_core/parameters/operations/uprate_parameters.py:1153,tests/core/parameters/operations/test_uprating.py:451and:563.numbercounts values after the last explicit date, defaults to ten, and rejects booleans. Tests cover annual, monthly, and daily projections, zero, and the default. The guide explains the cadence measurement window and floating-point rounding at exact boundaries. Seepolicyengine_core/parameters/operations/uprate_parameters.py:353,tests/core/parameters/operations/test_uprating.py:513anddocs/usage/parameters.md:97.The US parameter search found no self uprating. The three UK self-uprated spending series for DfE, DfT, and DHSC each gain a 2035 projection and have identical 2026 values in both runs. UK parameter sources
This change edits the same uprating module and tests as two companion PRs. The PR that lands later needs to merge the updated master first. #667 · #669
The parameter and period tests passed, including the chained comparison at
tests/core/parameters/operations/test_base_uprating_property.py:799. The full suite finished with 4,356 passed, 4 skipped, and 3 expected failures. Ruff format and lint checks passed.Tests
timeout 900 python -m pytest -q -p no:cacheprovider tests/core/parameters/operations/test_uprating.py— 61 passed.timeout 900 python -m pytest -q -p no:cacheprovider tests/core/parameters/operations/test_base_uprating_property.py— 62 passed, including the chained reference. A direct run ontests/fixtures/chained_uprating_reference.pycollected zero tests.timeout 900 python -m pytest -q -p no:cacheprovider tests/core/parameters tests/core/test_parameters.py tests/core/test_periods.py— 739 passed.timeout 900 make test-country-template— 39 passed.timeout 900 python -m pytest -q -p no:cacheprovider tests/core/test_pandas3_compatibility.py— 7 passed and 1 skipped in the default environment. With PyArrow available throughPYTHONPATH, all 8 passed.timeout 1500 python -m pytest -q -p no:cacheprovider tests— 4,356 passed, 4 skipped, and 3 expected failures.ruff format --checkandruff checkpassed on all four Python files changed by the PR.git diff --checkpassed. A Towncrier draft rendered the fragment under Fixed.🤖 Generated with Claude Code