Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/release-lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ The opt-in probe creates an isolated, minimal project with a standard PyPI
dependency and exercises actual uv locking. CI enables it. These commands do not
install or import the country model.

For the SPM integration, `spm-calculator` 1.0.0 reached PyPI on 2026-09-11, and
For the SPM integration, `spm-calculator` 1.1.0 reached PyPI on 2026-11-02, and
the committed country lock resolves it from `https://pypi.org/simple` with sdist
and wheel SHA-256 hashes, so `--committed` passes on the committed files.
`pyproject.toml` requires `>=1.0.0,<=1.0.0.post1` and the lock pins 1.0.0;
moving that pin to the post-release is an ordinary reviewed lock change. This
`pyproject.toml` requires `>=1.1.0,<1.2` and the lock pins 1.1.0; moving to a
later 1.1.x release is an ordinary reviewed lock change. This
guard validates dependency sources, artifact URLs and hashes, never a version
string, so the calculator requirement is held by `pyproject.toml` and review
rather than by `release_lock.py`. A stale root version or an older calculator
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PolicyEngine US is a microsimulation model of the US state and federal tax and b
PolicyEngine US supports Python 3.11 through 3.14 and requires pandas 3 or
later. To install, run `pip install policyengine-us`.

This release requires `spm-calculator>=1.0.0,<=1.0.0.post1` (the canonical SPM threshold API).
This release requires `spm-calculator>=1.1.0,<1.2` (the canonical SPM threshold API, covering 2022–2036).
Previously published country versions retain their original dependency metadata;
when reproducing one of those versions, include the compatible calculator
explicitly, for example:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/spm-calculator-1.1.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Require spm-calculator 1.1, whose canonical forecast covers 2022–2036, so SPM thresholds and SPM resources calculate for 2036.
2 changes: 1 addition & 1 deletion docs/spm.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The country model uses the installed `spm-calculator` artifact for all five SPM
measurement amounts. It does not extrapolate thresholds with country CPI or income
parameters. Each supported year and scenario comes from the verified artifact.
The installed 1.0.0 artifact covers 2022 through 2035; unavailable years fail.
The installed 1.1.0 artifact covers 2022 through 2036; unavailable years fail.
Taxes, benefits, resources and the housing-assistance cap
remain country-model formulas. General household benefits and CBO transfer
aggregates count actual `housing_assistance`; only SPM resources count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def canonical(forecast, year, tenure, *, adults=2, children=2, county=None):
)
def test_every_amount_uses_canonical_final_value_for_every_supported_year(tenure):
forecast = load_forecast()
assert list(forecast.years) == list(range(2022, 2036))
assert list(forecast.years) == list(range(2022, 2037))
# Explicit period inputs cover the artifact, including its historical years.
situation = household(county="06037", tenure=tenure)
for person in situation["people"].values():
Expand Down Expand Up @@ -164,10 +164,11 @@ def test_unavailable_selection_or_consumer_extrapolation_rejected(config):
create_spm_provider(config)


def test_unknown_year_has_no_country_cpi_extrapolation():
@pytest.mark.parametrize("year", [2037, 2099])
def test_unknown_year_has_no_country_cpi_extrapolation(year):
simulation = Simulation(situation=household(county="06037"))
with pytest.raises(ValueError, match="no entry"):
simulation.calculate("spm_unit_spm_threshold", 2099)
simulation.calculate("spm_unit_spm_threshold", year)


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
# extension and is available on every supported Python version.
"pandas>=3.0",
"policyengine-core>=3.33.1",
"spm-calculator>=1.0.0,<=1.0.0.post1",
"spm-calculator>=1.1.0,<1.2",
"tables>=3.9",
"tqdm>=4.67.1",
]
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading