From 927cf40ab44cf09088efbeba2f67b6f059277581 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 13 Aug 2026 13:01:59 -0400 Subject: [PATCH] Update bundle to policyengine-uk 2.90.2 and policyengine-core 3.30.1 Brings Universal Credit deductions into the certified bundle: the Fair Repayment Rate cap history, latent deduction demand calibrated to DWP deductions statistics, and reform levers (cap changes, per-type abolition, protected minimum floor). Core moves to 3.30.1 to satisfy policyengine-uk 2.90.x. Regenerates the trace TRO sidecars and the UK model version surface snapshot to match. Co-Authored-By: Claude Fable 5 --- changelog.d/bump-pe-uk-deductions.fixed.md | 1 + pyproject.toml | 14 +++++----- src/policyengine/data/bundle/manifest.json | 8 +++--- .../data/bundle/uk.trace.tro.jsonld | 23 ++------------- .../data/bundle/us.trace.tro.jsonld | 4 +-- .../uk_model_surface.json | 2 +- uv.lock | 28 +++++++++---------- 7 files changed, 32 insertions(+), 48 deletions(-) create mode 100644 changelog.d/bump-pe-uk-deductions.fixed.md diff --git a/changelog.d/bump-pe-uk-deductions.fixed.md b/changelog.d/bump-pe-uk-deductions.fixed.md new file mode 100644 index 00000000..6ea53cb6 --- /dev/null +++ b/changelog.d/bump-pe-uk-deductions.fixed.md @@ -0,0 +1 @@ +Update the certified bundle to policyengine-uk 2.90.2 (Universal Credit deductions: Fair Repayment Rate cap, protected floor and abolition reform levers) and policyengine-core 3.30.1. diff --git a/pyproject.toml b/pyproject.toml index 4b9d0118..ca53225c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,16 +44,16 @@ graph = [ "networkx>=3.0", ] models = [ - "policyengine-core==3.30.0", + "policyengine-core==3.30.1", "policyengine-us==1.764.6", - "policyengine-uk==2.89.2", + "policyengine-uk==2.90.2", ] uk = [ - "policyengine-core==3.30.0", - "policyengine-uk==2.89.2", + "policyengine-core==3.30.1", + "policyengine-uk==2.90.2", ] us = [ - "policyengine-core==3.30.0", + "policyengine-core==3.30.1", "policyengine-us==1.764.6", ] dev = [ @@ -70,9 +70,9 @@ dev = [ "towncrier>=24.8.0", "mypy>=1.11.0", "pytest-cov>=5.0.0", - "policyengine-core==3.30.0", + "policyengine-core==3.30.1", "policyengine-us==1.764.6", - "policyengine-uk==2.89.2", + "policyengine-uk==2.90.2", ] [tool.setuptools] diff --git a/src/policyengine/data/bundle/manifest.json b/src/policyengine/data/bundle/manifest.json index d959ce01..61b336e4 100644 --- a/src/policyengine/data/bundle/manifest.json +++ b/src/policyengine/data/bundle/manifest.json @@ -219,18 +219,18 @@ }, "policyengine-core": { "import_name": "policyengine_core", - "install_requirement": "policyengine-core==3.30.0", + "install_requirement": "policyengine-core==3.30.1", "name": "policyengine-core", "role": "runtime_dependency", - "version": "3.30.0" + "version": "3.30.1" }, "policyengine-uk": { "country": "uk", "import_name": "policyengine_uk", - "install_requirement": "policyengine-uk==2.89.2", + "install_requirement": "policyengine-uk==2.90.2", "name": "policyengine-uk", "role": "country_model", - "version": "2.89.2" + "version": "2.90.2" }, "policyengine-us": { "country": "us", diff --git a/src/policyengine/data/bundle/uk.trace.tro.jsonld b/src/policyengine/data/bundle/uk.trace.tro.jsonld index 6f9339c6..094bf378 100644 --- a/src/policyengine/data/bundle/uk.trace.tro.jsonld +++ b/src/policyengine/data/bundle/uk.trace.tro.jsonld @@ -17,7 +17,6 @@ "schema:name": "PolicyEngine", "schema:url": "https://policyengine.org" }, - "schema:dateCreated": "2026-06-19T02:38:00Z", "schema:description": "TRACE TRO for certified runtime bundle uk-5.0.1 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.", "schema:name": "policyengine uk certified bundle TRO", "trov:createdWith": { @@ -39,14 +38,6 @@ }, "trov:hasLocation": "data/bundle/manifest.json" }, - { - "@id": "arrangement/1/location/data_release_manifest", - "@type": "trov:ArtifactLocation", - "trov:hasArtifact": { - "@id": "composition/1/artifact/data_release_manifest" - }, - "trov:hasLocation": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z/releases/populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z/release_manifest.json" - }, { "@id": "arrangement/1/location/dataset", "@type": "trov:ArtifactLocation", @@ -75,20 +66,12 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for uk", "trov:mimeType": "application/json", - "trov:sha256": "2a5575ca561fe577be2bbd1929f5f1b71fa62a9a2c76afe49245b16af5cc9919" - }, - { - "@id": "composition/1/artifact/data_release_manifest", - "@type": "trov:ResearchArtifact", - "schema:name": "populace-data release manifest 0.1.0", - "trov:mimeType": "application/json", - "trov:sha256": "687c5c19ee75aa7959d4eaedf310b10a00036dd8f9c46af4cb712c3f30f02921" + "trov:sha256": "5d9aa3205e131b0dc85aa9419628511d9c72adcb949e4d33fcfb746d46d5d68b" }, { "@id": "composition/1/artifact/dataset", "@type": "trov:ResearchArtifact", "schema:name": "populace_uk_2023", - "trov:mimeType": "application/x-hdf5", "trov:sha256": "f17306ccb2aad7ff0130be3589b560afb2e2a12a943570911cd0c77f07934833" }, { @@ -102,7 +85,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "5efe19004a8447da2a54f30bc8ac840a5f0751298aeda0cd5ef2c07b8068d3cc" + "trov:sha256": "6e5968139d86853070c75cf68b4c6175957d4cae73126e0d2ce867bf7dcee466" } }, "trov:hasPerformance": { @@ -113,12 +96,12 @@ "pe:certifiedForModelVersion": "2.89.2", "pe:compatibilityBasis": "built_with_model_package", "pe:dataBuildId": "populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z", + "pe:dataReleaseManifestStatus": "unavailable", "pe:emittedIn": "repository-bundle", "rdfs:comment": "Certification of build populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z for policyengine-uk 2.89.2.", "trov:accessedArrangement": { "@id": "arrangement/1" }, - "trov:startedAtTime": "2026-06-19T02:38:00Z", "trov:wasConductedBy": { "@id": "trs" } diff --git a/src/policyengine/data/bundle/us.trace.tro.jsonld b/src/policyengine/data/bundle/us.trace.tro.jsonld index f71a6fea..a3a81cec 100644 --- a/src/policyengine/data/bundle/us.trace.tro.jsonld +++ b/src/policyengine/data/bundle/us.trace.tro.jsonld @@ -75,7 +75,7 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for us", "trov:mimeType": "application/json", - "trov:sha256": "2a5575ca561fe577be2bbd1929f5f1b71fa62a9a2c76afe49245b16af5cc9919" + "trov:sha256": "5d9aa3205e131b0dc85aa9419628511d9c72adcb949e4d33fcfb746d46d5d68b" }, { "@id": "composition/1/artifact/data_release_manifest", @@ -102,7 +102,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "2b1130fc1d037bca0e294ef98682625a6386043da5b46b29aad97894ec8c865b" + "trov:sha256": "779d704ef9efcc224d088068f7abb4b23fb13b7618e2f8fa360d3b4d0c790109" } }, "trov:hasPerformance": { diff --git a/tests/fixtures/household_calculator_snapshots/uk_model_surface.json b/tests/fixtures/household_calculator_snapshots/uk_model_surface.json index db163a3a..4881a39d 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_model_surface.json +++ b/tests/fixtures/household_calculator_snapshots/uk_model_surface.json @@ -5,7 +5,7 @@ "has_income_tax": true, "has_region_registry": true, "model_package_name": "policyengine-uk", - "num_parameters_bucketed_100s": 22, + "num_parameters_bucketed_100s": 23, "num_variables_bucketed_100s": 8, "region_registry_country": "uk" } diff --git a/uv.lock b/uv.lock index 88c7f22d..66d249aa 100644 --- a/uv.lock +++ b/uv.lock @@ -2820,7 +2820,7 @@ wheels = [ [[package]] name = "policyengine" -version = "5.0.0" +version = "5.0.1" source = { editable = "." } dependencies = [ { name = "diskcache" }, @@ -2897,13 +2897,13 @@ requires-dist = [ { name = "pandas", specifier = ">=2.0.0" }, { name = "plotly", marker = "extra == 'dev'", specifier = ">=5.0.0" }, { name = "plotly", marker = "extra == 'plotting'", specifier = ">=5.0.0" }, - { name = "policyengine-core", marker = "extra == 'dev'", specifier = "==3.30.0" }, - { name = "policyengine-core", marker = "extra == 'models'", specifier = "==3.30.0" }, - { name = "policyengine-core", marker = "extra == 'uk'", specifier = "==3.30.0" }, - { name = "policyengine-core", marker = "extra == 'us'", specifier = "==3.30.0" }, - { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.89.2" }, - { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.89.2" }, - { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.89.2" }, + { name = "policyengine-core", marker = "extra == 'dev'", specifier = "==3.30.1" }, + { name = "policyengine-core", marker = "extra == 'models'", specifier = "==3.30.1" }, + { name = "policyengine-core", marker = "extra == 'uk'", specifier = "==3.30.1" }, + { name = "policyengine-core", marker = "extra == 'us'", specifier = "==3.30.1" }, + { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.90.2" }, + { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.90.2" }, + { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.90.2" }, { name = "policyengine-us", marker = "extra == 'dev'", specifier = "==1.764.6" }, { name = "policyengine-us", marker = "extra == 'models'", specifier = "==1.764.6" }, { name = "policyengine-us", marker = "extra == 'us'", specifier = "==1.764.6" }, @@ -2921,7 +2921,7 @@ provides-extras = ["plotting", "graph", "models", "uk", "us", "dev"] [[package]] name = "policyengine-core" -version = "3.30.0" +version = "3.30.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dpath" }, @@ -2945,14 +2945,14 @@ dependencies = [ { name = "standard-imghdr" }, { name = "wheel" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/04/1934fe401c2f654b1e483c08cdbe4b9cd8007a57b4c89e6556cd2bec8cbf/policyengine_core-3.30.0.tar.gz", hash = "sha256:f922e096efa59e748210202b5023ba56d1a1326963e4dc7fed57030247308a35", size = 498324, upload-time = "2026-07-09T17:08:31.67Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/9d/f71da3e348ddc52e058c76b72bbc4b2f20abcf0e7389ecd5aca5d550fd14/policyengine_core-3.30.1.tar.gz", hash = "sha256:a16f29fe51ec01a7be2171386f8bd26b9ba55ffc338adb70adcadafe33d9c55f", size = 500419, upload-time = "2026-07-19T15:50:41.288Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/fa/47e01d9f6c62e6fcacc1c9aa62d181e157bcb14beff7a1a4fe39974f52ea/policyengine_core-3.30.0-py3-none-any.whl", hash = "sha256:5e896b469ca1af04d783e84e033c7479344ba4c51a65e8fd043bf44c6b6cd646", size = 244334, upload-time = "2026-07-09T17:08:30.223Z" }, + { url = "https://files.pythonhosted.org/packages/b9/7e/07624d8add8889af1b4af796d36c38b2e2af494b1d78a064fab29e9bea00/policyengine_core-3.30.1-py3-none-any.whl", hash = "sha256:2dbcf5f590a0199a7b7c77fcbbda2ff6bc289f6c6169ca0af3beace35d8b3e63", size = 244846, upload-time = "2026-07-19T15:50:39.651Z" }, ] [[package]] name = "policyengine-uk" -version = "2.89.2" +version = "2.90.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "microdf-python" }, @@ -2962,9 +2962,9 @@ dependencies = [ { name = "tables", version = "3.10.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.10.*'" }, { name = "tables", version = "3.11.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/bc/d9cadc5b91804dab0937506e02463a4146a4c996b3d6cc400599b688eb7a/policyengine_uk-2.89.2.tar.gz", hash = "sha256:9eefdc321799f1b610dc1d72b465b6d35a0595469d67c2e4445529c3063a6ef7", size = 1217538, upload-time = "2026-06-18T10:09:46.6Z" } +sdist = { url = "https://files.pythonhosted.org/packages/40/e1/6652fd4ff8806d81b7c846ce2baeef4b9a8457ed380bb0853419d3cf36d9/policyengine_uk-2.90.2.tar.gz", hash = "sha256:c9baeaded1bb6d6f5ca5fcd962b80a198509513737c194aa867b0ef6d13d6a09", size = 1237478, upload-time = "2026-08-13T05:30:05.961Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/db/ce3154ba69b6fcd1e9e922ceee705ef4ddb1f81553da1e63b9296e74a4dc/policyengine_uk-2.89.2-py3-none-any.whl", hash = "sha256:80965d3dd7dc767db9b083820d40262ce543020d5a8880a0cf88da10ae641b24", size = 2001007, upload-time = "2026-06-18T10:09:44.808Z" }, + { url = "https://files.pythonhosted.org/packages/ec/da/658bff2df6094bd7bf2b0f561ff60fd41508adbd0a3af29b4553c83bc678/policyengine_uk-2.90.2-py3-none-any.whl", hash = "sha256:f100ef97e20b29b84138078f1dbc5b83f8857e6bc74b745fc6abef7ea1eeadf2", size = 2034933, upload-time = "2026-08-13T05:30:03.884Z" }, ] [[package]]