From 7a197f2dd922c8610b0c1e0874b49a4f9d5280d2 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 7 Oct 2026 16:52:06 -0400 Subject: [PATCH 1/2] Certify policyengine-uk-data 1.58.0 with policyengine-uk 2.123.4 and core 3.32.21 Certify enhanced_frs_2024_25 from policyengine-uk-data 1.58.0 as the UK default, on the publisher's compatibility claim added to the 1.58.0 release manifest at HF commit c30504aa. Pin the latest policyengine-uk (2.123.4) and policyengine-core (3.32.21), regenerate the extras, lock and TRO sidecars, and move the tests that pin the certified UK release. Fixes #554 Co-Authored-By: Claude Opus 5.5 --- changelog.d/554.changed.md | 1 + docs/households.md | 2 +- pyproject.toml | 14 ++-- src/policyengine/data/bundle/manifest.json | 76 +++++++++---------- .../data/bundle/uk.trace.tro.jsonld | 36 ++++----- .../data/bundle/us.trace.tro.jsonld | 4 +- tests/test_models.py | 6 +- tests/test_release_manifests.py | 14 ++-- tests/test_uk_regions.py | 2 +- uv.lock | 26 +++---- 10 files changed, 91 insertions(+), 90 deletions(-) create mode 100644 changelog.d/554.changed.md diff --git a/changelog.d/554.changed.md b/changelog.d/554.changed.md new file mode 100644 index 00000000..8e057ded --- /dev/null +++ b/changelog.d/554.changed.md @@ -0,0 +1 @@ +Certify policyengine-uk-data 1.58.0 (`enhanced_frs_2024_25`) as the UK default, and pin policyengine-uk 2.123.4 and policyengine-core 3.32.21. The data was built with policyengine-uk 2.122.2 and core 3.32.13; the publisher's compatibility claim in the 1.58.0 release manifest covers the newer versions. UK results change with the new data release. diff --git a/docs/households.md b/docs/households.md index 22500e15..2b572920 100644 --- a/docs/households.md +++ b/docs/households.md @@ -106,7 +106,7 @@ separate benefit inputs; they do not override SPM measurement composition. These changes require the coordinated canonical country/calculator bundle, which the packaged production manifest now pins and certifies: `policyengine-us` -2.2.1, `policyengine-core` 3.32.10, `spm-calculator` 1.0.0, and the US data +2.2.1, `policyengine-core` 3.32.21, `spm-calculator` 1.0.0, and the US data release `populace-us-2024-spm-20260915`. Local-wheel development manifest fixtures remain explicitly uncertified. The measurement receipt identifies a calculation; it does not certify a population dataset or establish publication diff --git a/pyproject.toml b/pyproject.toml index 0d22f448..86fdcf01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,17 +40,17 @@ graph = [ "networkx>=3.0", ] models = [ - "policyengine-core==3.32.10", + "policyengine-core==3.32.21", "policyengine-us==2.2.1", - "policyengine-uk==2.102.3", + "policyengine-uk==2.123.4", "spm-calculator==1.0.0", ] uk = [ - "policyengine-core==3.32.10", - "policyengine-uk==2.102.3", + "policyengine-core==3.32.21", + "policyengine-uk==2.123.4", ] us = [ - "policyengine-core==3.32.10", + "policyengine-core==3.32.21", "policyengine-us==2.2.1", "spm-calculator==1.0.0", ] @@ -69,9 +69,9 @@ dev = [ "mypy>=1.11.0", "pytest-cov>=5.0.0", "hypothesis>=6.100.0", - "policyengine-core==3.32.10", + "policyengine-core==3.32.21", "policyengine-us==2.2.1", - "policyengine-uk==2.102.3", + "policyengine-uk==2.123.4", "spm-calculator==1.0.0", ] diff --git a/src/policyengine/data/bundle/manifest.json b/src/policyengine/data/bundle/manifest.json index 2c67fafe..ef27278f 100644 --- a/src/policyengine/data/bundle/manifest.json +++ b/src/policyengine/data/bundle/manifest.json @@ -16,88 +16,88 @@ }, "data_releases": { "uk": { - "build_id": "policyengine-uk-data-1.56.16", + "build_id": "policyengine-uk-data-1.58.0", "bundle_id": "uk-6.2.1", "certification": { - "built_with_model_git_sha": "12a1e028afeef08d8b2d74ee03fd9de3a78b2dd3", - "built_with_model_version": "2.89.2", + "built_with_model_git_sha": "4cbedbecca352f52dffe47e849553c2759a00711", + "built_with_model_version": "2.122.2", "certified_by": "policyengine.py bundle certification", - "certified_for_model_version": "2.102.3", + "certified_for_model_version": "2.123.4", "compatibility_basis": "legacy_compatible_model_package", - "data_build_fingerprint": "sha256:6bfff835b504094c05342d2b4d770d2d94c8c1adcb15c4468931f53b21a89ea9", - "data_build_id": "policyengine-uk-data-1.56.16" + "data_build_fingerprint": "sha256:c094d7006fdd81df220090284212f16bbffb15624643bc442c4bb3e1b1e5dac8", + "data_build_id": "policyengine-uk-data-1.58.0" }, "certified_data_artifact": { - "build_id": "policyengine-uk-data-1.56.16", + "build_id": "policyengine-uk-data-1.58.0", "data_package": { "name": "policyengine-uk-data", - "version": "1.56.16" + "version": "1.58.0" }, "dataset": "enhanced_frs_2024_25", - "sha256": "e433e532b17bd8ce76030156285816e33d44e93edabd2204adbef71d19a68712", - "uri": "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.56.16" + "sha256": "5ba399ea5ab9a6c7d4e9aaf6c623080beb34d9ad5f330f6244dbad72b8d960b6", + "uri": "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.58.0" }, "country_id": "uk", "data_package": { "name": "policyengine-uk-data", - "release_manifest_path": "releases/1.56.16/release_manifest.json", - "release_manifest_revision": "78788372fec47fc8df835bd32307ef61eaed83c2", + "release_manifest_path": "releases/1.58.0/release_manifest.json", + "release_manifest_revision": "c30504aa6892f888c36a92f9f41b98cca6c21808", "repo_id": "policyengine/policyengine-uk-data-private", "repo_type": "model", - "version": "1.56.16" + "version": "1.58.0" }, "data_producer": "populace", "datasets": { "enhanced_frs_2024_25": { "path": "enhanced_frs_2024_25.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "e433e532b17bd8ce76030156285816e33d44e93edabd2204adbef71d19a68712" + "revision": "1.58.0", + "sha256": "5ba399ea5ab9a6c7d4e9aaf6c623080beb34d9ad5f330f6244dbad72b8d960b6" }, "enhanced_frs_2024_25_tiny": { "path": "enhanced_frs_2024_25_tiny.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "6cbbda7eef1b0b16d62e24a3099dc7959906287d659868d31aa7fc82af598871" + "revision": "1.58.0", + "sha256": "a2e938b6c68952dc6fa3af998501371d9014b66263baef262d4f649fe6f19dd5" }, "frs_2024_25": { "path": "frs_2024_25.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "d4d29901d7ea0c1f636060d4177a411a39c1977fa9fd23a61af3bb0f030769bd" + "revision": "1.58.0", + "sha256": "2ec0ea6c10bc82d030a071474c1b376780ea88053e1659d784b4253662341634" }, "frs_2024_25_tiny": { "path": "frs_2024_25_tiny.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "74ca086be959b2942ecbf7755034d94dc6a817f4d9d54f2585a1c6df849d9588" + "revision": "1.58.0", + "sha256": "e91d17c4bae92067222272da33918f15027f65a58e3765c7bdff8aa119df914e" }, "local_authority_weights": { "path": "local_authority_weights.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "6d634d69fb472b80cc17ffe696e028c54d7b739166bb7d9a57860f9d73537aa5" + "revision": "1.58.0", + "sha256": "0f8e43877f13cea86ea7bd78ce938769d0c2746ac0b191be661c25608aa786fc" }, "local_geography_weights": { "path": "local_geography_weights.csv.gz", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "6f623e277089d06c2c50ec3d8ab766635f695c8579d360410e3dcb4214ea9709" + "revision": "1.58.0", + "sha256": "2c4026139eb69d26af5a0ddad7e7fe9ee981b89a0968e77a5f41820091f641c2" }, "parliamentary_constituency_weights": { "path": "parliamentary_constituency_weights.h5", "repo_id": "policyengine/policyengine-uk-data-private", - "revision": "1.56.16", - "sha256": "6870c36072a0c34d2e6ce3ebf58664b7932ca46a9e3808d387988773e63b66d5" + "revision": "1.58.0", + "sha256": "da3d021bf6cd57f06e878094e48524a6a691207231158d9a109da73ea459e900" } }, "default_dataset": "enhanced_frs_2024_25", - "default_dataset_uri": "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.56.16", + "default_dataset_uri": "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.58.0", "model_package": { "name": "policyengine-uk", - "sha256": "f02a76712a3edf9983c713c1db42e9653a6e974e4ce335dd4b5676bbc2bcd636", - "version": "2.102.3", - "wheel_url": "https://files.pythonhosted.org/packages/37/e6/e8d9069d498f1510a1380f24a78e957902d01f00b10248c146d6710d5b37/policyengine_uk-2.102.3-py3-none-any.whl" + "sha256": "f0261a0afa905196742b5aa9aac776c923daeed75d5815797acb192a65d83acf", + "version": "2.123.4", + "wheel_url": "https://files.pythonhosted.org/packages/6b/4c/bd5e453ffe516752a171b4ca27cfa036eefc8108aa9bfd0e364eb73c672f/policyengine_uk-2.123.4-py3-none-any.whl" }, "policyengine_version": "6.2.1", "region_datasets": { @@ -105,10 +105,10 @@ "path_template": "enhanced_frs_2024_25.h5" } }, - "release_manifest_uri": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/78788372fec47fc8df835bd32307ef61eaed83c2/releases/1.56.16/release_manifest.json", + "release_manifest_uri": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/c30504aa6892f888c36a92f9f41b98cca6c21808/releases/1.58.0/release_manifest.json", "schema_version": 1, - "source_manifest_uri": "hf://model/policyengine/policyengine-uk-data-private@78788372fec47fc8df835bd32307ef61eaed83c2/releases/1.56.16/release_manifest.json", - "version": "policyengine-uk-data-1.56.16" + "source_manifest_uri": "hf://model/policyengine/policyengine-uk-data-private@c30504aa6892f888c36a92f9f41b98cca6c21808/releases/1.58.0/release_manifest.json", + "version": "policyengine-uk-data-1.58.0" }, "us": { "build_id": "populace-us-2024-spm-20260915", @@ -297,18 +297,18 @@ }, "policyengine-core": { "import_name": "policyengine_core", - "install_requirement": "policyengine-core==3.32.10", + "install_requirement": "policyengine-core==3.32.21", "name": "policyengine-core", "role": "runtime_dependency", - "version": "3.32.10" + "version": "3.32.21" }, "policyengine-uk": { "country": "uk", "import_name": "policyengine_uk", - "install_requirement": "policyengine-uk==2.102.3", + "install_requirement": "policyengine-uk==2.123.4", "name": "policyengine-uk", "role": "country_model", - "version": "2.102.3" + "version": "2.123.4" }, "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 81179410..0f293095 100644 --- a/src/policyengine/data/bundle/uk.trace.tro.jsonld +++ b/src/policyengine/data/bundle/uk.trace.tro.jsonld @@ -17,7 +17,7 @@ "schema:name": "PolicyEngine", "schema:url": "https://policyengine.org" }, - "schema:dateCreated": "2026-08-18T14:20:32.100961Z", + "schema:dateCreated": "2026-10-07T17:31:53.189867Z", "schema:description": "TRACE TRO for certified runtime bundle uk-6.2.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": { @@ -45,7 +45,7 @@ "trov:hasArtifact": { "@id": "composition/1/artifact/data_release_manifest" }, - "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/78788372fec47fc8df835bd32307ef61eaed83c2/releases/1.56.16/release_manifest.json" + "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/c30504aa6892f888c36a92f9f41b98cca6c21808/releases/1.58.0/release_manifest.json" }, { "@id": "arrangement/1/location/dataset", @@ -53,7 +53,7 @@ "trov:hasArtifact": { "@id": "composition/1/artifact/dataset" }, - "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/1.56.16/enhanced_frs_2024_25.h5" + "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-uk-data-private/resolve/1.58.0/enhanced_frs_2024_25.h5" }, { "@id": "arrangement/1/location/model_wheel", @@ -61,7 +61,7 @@ "trov:hasArtifact": { "@id": "composition/1/artifact/model_wheel" }, - "trov:hasLocation": "https://files.pythonhosted.org/packages/37/e6/e8d9069d498f1510a1380f24a78e957902d01f00b10248c146d6710d5b37/policyengine_uk-2.102.3-py3-none-any.whl" + "trov:hasLocation": "https://files.pythonhosted.org/packages/6b/4c/bd5e453ffe516752a171b4ca27cfa036eefc8108aa9bfd0e364eb73c672f/policyengine_uk-2.123.4-py3-none-any.whl" } ] } @@ -75,52 +75,52 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for uk", "trov:mimeType": "application/json", - "trov:sha256": "0b80f402511f5cec0cfbe018b7f8b42e83b54a7bdfc5c9c210a2f77bb63bd21b" + "trov:sha256": "9a0f56ad578e4e61e80b30b62e215410a160b03baa3b2d9b82447f0929fcc214" }, { "@id": "composition/1/artifact/data_release_manifest", "@type": "trov:ResearchArtifact", - "schema:name": "policyengine-uk-data release manifest 1.56.16", + "schema:name": "policyengine-uk-data release manifest 1.58.0", "trov:mimeType": "application/json", - "trov:sha256": "cb61e3d897fbfa0cc079edc140aebc8947b1a685f581a420de91170ce2686155" + "trov:sha256": "e14b7c973f320415af53751aae9ae98cdfba7cbabe2513b7c26e129eb99b1618" }, { "@id": "composition/1/artifact/dataset", "@type": "trov:ResearchArtifact", "schema:name": "enhanced_frs_2024_25", "trov:mimeType": "application/x-hdf5", - "trov:sha256": "e433e532b17bd8ce76030156285816e33d44e93edabd2204adbef71d19a68712" + "trov:sha256": "5ba399ea5ab9a6c7d4e9aaf6c623080beb34d9ad5f330f6244dbad72b8d960b6" }, { "@id": "composition/1/artifact/model_wheel", "@type": "trov:ResearchArtifact", - "schema:name": "policyengine-uk==2.102.3 wheel", + "schema:name": "policyengine-uk==2.123.4 wheel", "trov:mimeType": "application/zip", - "trov:sha256": "f02a76712a3edf9983c713c1db42e9653a6e974e4ce335dd4b5676bbc2bcd636" + "trov:sha256": "f0261a0afa905196742b5aa9aac776c923daeed75d5815797acb192a65d83acf" } ], "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "a318203a1ff8cf141dfe8b138902e445ae1ab7bcce6e3d714e87661a4bb6deaa" + "trov:sha256": "912ab8a3aa5e09b8d64b00bcb2973d3faad00389c51d23790fb6e07de205f164" } }, "trov:hasPerformance": { "@id": "trp/1", "@type": "trov:TransparentResearchPerformance", - "pe:builtWithModelGitSha": "12a1e028afeef08d8b2d74ee03fd9de3a78b2dd3", - "pe:builtWithModelVersion": "2.89.2", + "pe:builtWithModelGitSha": "4cbedbecca352f52dffe47e849553c2759a00711", + "pe:builtWithModelVersion": "2.122.2", "pe:certifiedBy": "policyengine.py bundle certification", - "pe:certifiedForModelVersion": "2.102.3", + "pe:certifiedForModelVersion": "2.123.4", "pe:compatibilityBasis": "legacy_compatible_model_package", - "pe:dataBuildFingerprint": "sha256:6bfff835b504094c05342d2b4d770d2d94c8c1adcb15c4468931f53b21a89ea9", - "pe:dataBuildId": "policyengine-uk-data-1.56.16", + "pe:dataBuildFingerprint": "sha256:c094d7006fdd81df220090284212f16bbffb15624643bc442c4bb3e1b1e5dac8", + "pe:dataBuildId": "policyengine-uk-data-1.58.0", "pe:emittedIn": "repository-bundle", - "rdfs:comment": "Certification of build policyengine-uk-data-1.56.16 for policyengine-uk 2.102.3.", + "rdfs:comment": "Certification of build policyengine-uk-data-1.58.0 for policyengine-uk 2.123.4.", "trov:accessedArrangement": { "@id": "arrangement/1" }, - "trov:startedAtTime": "2026-08-18T14:20:32.100961Z", + "trov:startedAtTime": "2026-10-07T17:31:53.189867Z", "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 213e1300..0684ade4 100644 --- a/src/policyengine/data/bundle/us.trace.tro.jsonld +++ b/src/policyengine/data/bundle/us.trace.tro.jsonld @@ -74,7 +74,7 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for us", "trov:mimeType": "application/json", - "trov:sha256": "0b80f402511f5cec0cfbe018b7f8b42e83b54a7bdfc5c9c210a2f77bb63bd21b" + "trov:sha256": "9a0f56ad578e4e61e80b30b62e215410a160b03baa3b2d9b82447f0929fcc214" }, { "@id": "composition/1/artifact/data_release_manifest", @@ -101,7 +101,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "7f7f19f41f2cfd707098768565562f6509b454b48c79bcd0558dab061b5b40a6" + "trov:sha256": "4308fce10ccb552e0731b21b4eacd78eea35cc918c78135a90dc548d76f8dc9b" } }, "trov:hasPerformance": { diff --git a/tests/test_models.py b/tests/test_models.py index ea799390..ce37525e 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -43,13 +43,13 @@ def test_has_release_manifest_metadata(self): assert uk_latest.release_manifest is not None assert uk_latest.release_manifest.country_id == "uk" assert uk_latest.model_package.name == "policyengine-uk" - assert uk_latest.model_package.version == "2.102.3" + assert uk_latest.model_package.version == "2.123.4" assert uk_latest.data_package.name == "policyengine-uk-data" - assert uk_latest.data_package.version == "1.56.16" + assert uk_latest.data_package.version == "1.58.0" assert ( uk_latest.default_dataset_uri == "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5" - "@1.56.16" + "@1.58.0" ) def test_has_hundreds_of_parameters(self): diff --git a/tests/test_release_manifests.py b/tests/test_release_manifests.py index 485cc1d0..0fcc2317 100644 --- a/tests/test_release_manifests.py +++ b/tests/test_release_manifests.py @@ -72,12 +72,12 @@ "hf://policyengine/populace-us/populace_us_2024_acs_local.h5" f"@{US_LOCAL_AREA_RELEASE_ID}" ) -UK_MODEL_VERSION = "2.102.3" -UK_BUILT_WITH_MODEL_VERSION = "2.89.2" -UK_DATA_RELEASE_VERSION = "1.56.16" -UK_DATA_RELEASE_ID = "policyengine-uk-data-1.56.16" -UK_DATA_RELEASE_REVISION = "78788372fec47fc8df835bd32307ef61eaed83c2" -UK_DATA_RELEASE_PATH = "releases/1.56.16/release_manifest.json" +UK_MODEL_VERSION = "2.123.4" +UK_BUILT_WITH_MODEL_VERSION = "2.122.2" +UK_DATA_RELEASE_VERSION = "1.58.0" +UK_DATA_RELEASE_ID = "policyengine-uk-data-1.58.0" +UK_DATA_RELEASE_REVISION = "c30504aa6892f888c36a92f9f41b98cca6c21808" +UK_DATA_RELEASE_PATH = "releases/1.58.0/release_manifest.json" # The prior certified default, kept resolvable via dataset_overlays. UK_POPULACE_RELEASE_ID = "populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z" UK_POPULACE_DATASET_URI = ( @@ -86,7 +86,7 @@ ) UK_CERTIFICATION_SOURCE = "policyengine.py bundle certification" UK_CERTIFIED_DATASET_URI = ( - "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.56.16" + "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@1.58.0" ) diff --git a/tests/test_uk_regions.py b/tests/test_uk_regions.py index 8327cee2..3ef31fc0 100644 --- a/tests/test_uk_regions.py +++ b/tests/test_uk_regions.py @@ -73,7 +73,7 @@ def test__given_uk_registry__then_has_national_region(self): assert ( national.dataset_path == "hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5" - "@1.56.16" + "@1.58.0" ) assert not national.requires_filter diff --git a/uv.lock b/uv.lock index 677917cf..69d9267e 100644 --- a/uv.lock +++ b/uv.lock @@ -1880,13 +1880,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.32.10" }, - { name = "policyengine-core", marker = "extra == 'models'", specifier = "==3.32.10" }, - { name = "policyengine-core", marker = "extra == 'uk'", specifier = "==3.32.10" }, - { name = "policyengine-core", marker = "extra == 'us'", specifier = "==3.32.10" }, - { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.102.3" }, - { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.102.3" }, - { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.102.3" }, + { name = "policyengine-core", marker = "extra == 'dev'", specifier = "==3.32.21" }, + { name = "policyengine-core", marker = "extra == 'models'", specifier = "==3.32.21" }, + { name = "policyengine-core", marker = "extra == 'uk'", specifier = "==3.32.21" }, + { name = "policyengine-core", marker = "extra == 'us'", specifier = "==3.32.21" }, + { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.123.4" }, + { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.123.4" }, + { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.123.4" }, { name = "policyengine-us", marker = "extra == 'dev'", specifier = "==2.2.1" }, { name = "policyengine-us", marker = "extra == 'models'", specifier = "==2.2.1" }, { name = "policyengine-us", marker = "extra == 'us'", specifier = "==2.2.1" }, @@ -1907,7 +1907,7 @@ provides-extras = ["plotting", "graph", "models", "uk", "us", "dev"] [[package]] name = "policyengine-core" -version = "3.32.10" +version = "3.32.21" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dpath" }, @@ -1928,14 +1928,14 @@ dependencies = [ { name = "standard-imghdr" }, { name = "wheel" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/d6/cd/9fc967c5b787baa5f9d83461773ba0982a8e22ae83c40155a7ee55edd11a/policyengine_core-3.32.10.tar.gz", hash = "sha256:0f51e8abfa8f172c69d03ba8f4304632a348fc6dca780e41021b2fd0cec04fde", size = 427479, upload-time = "2026-09-29T17:56:43.582Z" } +sdist = { url = "https://files.pythonhosted.org/packages/22/ba/602b70178d0c4cd549caafa0cad34d5c30bcfab9699185859d09c96cfa7e/policyengine_core-3.32.21.tar.gz", hash = "sha256:df70e9ba3403b6a8b0692acee35a7965aec3c5dda480cb42a6ed853c7f3acb4e", size = 542359, upload-time = "2026-10-07T13:49:59.14Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/58/50/291d73da16f39a3c4f05dffb6d40b1142fc400ec39b5a2ca7481e6fe9d90/policyengine_core-3.32.10-py3-none-any.whl", hash = "sha256:124afc555fe7c848ae8237b820fed0b6ea0ea1280e8850ad8bf356937ee10e5b", size = 247410, upload-time = "2026-09-29T17:56:42.218Z" }, + { url = "https://files.pythonhosted.org/packages/35/f7/42f622ff63607791344e03013764824359dc763c77c7bdb7e279e9347ae4/policyengine_core-3.32.21-py3-none-any.whl", hash = "sha256:6b53224a67294f219bc270505c7717ca2fb9cc6b4e3baaed51e2ca97c53ba4ba", size = 270109, upload-time = "2026-10-07T13:49:57.686Z" }, ] [[package]] name = "policyengine-uk" -version = "2.102.3" +version = "2.123.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "microdf-python" }, @@ -1943,9 +1943,9 @@ dependencies = [ { name = "pydantic" }, { name = "tables" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a7/49/1db19a439463f1304e93521debf40794f7b3483d37356c6d99c346112d0f/policyengine_uk-2.102.3.tar.gz", hash = "sha256:cdb0900e78818b46fdb79b2a8299bce6c7d6c14692e26cf38367781beea607be", size = 1314347, upload-time = "2026-09-28T19:50:44.714Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5d/9d/6f457ebc0f0da1dbbbaade1e9c6d2102260f6d61dc358434eb210357f981/policyengine_uk-2.123.4.tar.gz", hash = "sha256:f1c1e597554ffaa70d2c8185e91239ee212a764882dab881bdc6481173f6a0a6", size = 2014931, upload-time = "2026-10-07T16:20:12.115Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/37/e6/e8d9069d498f1510a1380f24a78e957902d01f00b10248c146d6710d5b37/policyengine_uk-2.102.3-py3-none-any.whl", hash = "sha256:f02a76712a3edf9983c713c1db42e9653a6e974e4ce335dd4b5676bbc2bcd636", size = 2189605, upload-time = "2026-09-28T19:50:42.472Z" }, + { url = "https://files.pythonhosted.org/packages/6b/4c/bd5e453ffe516752a171b4ca27cfa036eefc8108aa9bfd0e364eb73c672f/policyengine_uk-2.123.4-py3-none-any.whl", hash = "sha256:f0261a0afa905196742b5aa9aac776c923daeed75d5815797acb192a65d83acf", size = 3171860, upload-time = "2026-10-07T16:20:10.066Z" }, ] [[package]] From debc61d598940a801facb0767474fdb9e85541af Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 7 Oct 2026 17:17:22 -0400 Subject: [PATCH 2/2] Refresh UK snapshots and variable metadata for policyengine-uk 2.123.4 - Employer NI falls by GBP 1.20 per employee: policyengine-uk 2.123.2 stores the Class 1 secondary threshold as the statutory GBP 5,000 a year rather than 52 x GBP 96. - The couple's three-year-old now gets the extended 30-hour childcare entitlement (GBP 7,104.38) instead of the universal 15 hours (GBP 3,552.19). Bisected to policyengine-uk 2.114.2, which rewrote the extended entitlement's qualifying-child and income tests (SI 2022/1134). - The model surface grows to about 3,200 parameters and 1,000 variables. - personal_rent became a formula variable with no defined_for, so the metadata test checks child_benefit's defined_for instead. Fixes #554 Co-Authored-By: Claude Opus 5.5 --- .../uk_couple_two_kids.json | 10 +++++----- .../uk_model_surface.json | 4 ++-- .../uk_single_adult_employment_income.json | 2 +- .../uk_single_parent_one_child.json | 2 +- tests/test_variable_metadata.py | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json b/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json index 94a4950e..28fa19e2 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +++ b/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json @@ -13,13 +13,13 @@ "household.equiv_hbai_household_net_income": 52510.29, "household.fuel_duty": 0.0, "household.hbai_household_net_income": 73514.4, - "household.household_benefits": 5889.59, + "household.household_benefits": 9441.78, "household.household_count_people": 4.0, - "household.household_gross_income": 95889.59, + "household.household_gross_income": 99441.78, "household.household_id": 0.0, "household.household_income_decile": 10.0, "household.household_market_income": 90000.0, - "household.household_net_income": 76886.55, + "household.household_net_income": 80438.73, "household.household_tax": 19003.05, "household.household_wealth_decile": 10.0, "household.household_weight": 1.0, @@ -46,7 +46,7 @@ "person[0].is_child": 0.0, "person[0].is_male": 1.0, "person[0].national_insurance": 3110.6, - "person[0].ni_employer": 7501.2, + "person[0].ni_employer": 7500.0, "person[0].pension_credit": 0.0, "person[0].pension_income": 0.0, "person[0].person_id": 0.0, @@ -75,7 +75,7 @@ "person[1].is_child": 0.0, "person[1].is_male": 1.0, "person[1].national_insurance": 1794.4, - "person[1].ni_employer": 4501.2, + "person[1].ni_employer": 4500.0, "person[1].pension_credit": 0.0, "person[1].pension_income": 0.0, "person[1].person_id": 0.0, diff --git a/tests/fixtures/household_calculator_snapshots/uk_model_surface.json b/tests/fixtures/household_calculator_snapshots/uk_model_surface.json index dd10f62d..d501dd8a 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": 26, - "num_variables_bucketed_100s": 9, + "num_parameters_bucketed_100s": 32, + "num_variables_bucketed_100s": 10, "region_registry_country": "uk" } diff --git a/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json b/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json index 1d37b7aa..ab0db499 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json +++ b/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json @@ -46,7 +46,7 @@ "person[0].is_child": 0.0, "person[0].is_male": 1.0, "person[0].national_insurance": 1394.4, - "person[0].ni_employer": 3751.2, + "person[0].ni_employer": 3750.0, "person[0].pension_credit": 0.0, "person[0].pension_income": 0.0, "person[0].person_id": 0.0, diff --git a/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json b/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json index acec3cc8..c0d339da 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json +++ b/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json @@ -46,7 +46,7 @@ "person[0].is_child": 0.0, "person[0].is_male": 1.0, "person[0].national_insurance": 994.4, - "person[0].ni_employer": 3001.2, + "person[0].ni_employer": 3000.0, "person[0].pension_credit": 0.0, "person[0].pension_income": 0.0, "person[0].person_id": 0.0, diff --git a/tests/test_variable_metadata.py b/tests/test_variable_metadata.py index 575d77e5..4bfa3d5a 100644 --- a/tests/test_variable_metadata.py +++ b/tests/test_variable_metadata.py @@ -126,10 +126,10 @@ def test_uk_model_exposes_selected_variable_metadata(): assert employment_income.is_period_size_independent is False assert employment_income.metadata == {} - personal_rent = uk_latest.get_variable("personal_rent") - assert personal_rent.defined_for == "is_household_head" - assert personal_rent.min_value is None - assert personal_rent.max_value is None + child_benefit = uk_latest.get_variable("child_benefit") + assert child_benefit.defined_for == "would_claim_child_benefit" + assert child_benefit.min_value is None + assert child_benefit.max_value is None def test_us_model_exposes_selected_variable_metadata():