From 324ecad65bc89bbddf20acc8bd748c0505627cf5 Mon Sep 17 00:00:00 2001 From: Maria Juaristi Date: Mon, 26 Oct 2026 11:42:36 +0000 Subject: [PATCH 1/3] Certify the Microcosm UK national a6299504 with policyengine-uk 2.151.0 National-only for now (--drop-regional-release): the local-area cut from the same spine is added when it is published, which restores the area routing and the five routing tests that assume it. Co-Authored-By: Claude Opus 5.5 --- ...ional-20261025T091414Z-a6299504.changed.md | 1 + pyproject.toml | 6 +- src/policyengine/data/bundle/manifest.json | 82 ++++++++----------- .../data/bundle/uk.trace.tro.jsonld | 30 +++---- .../data/bundle/us.trace.tro.jsonld | 4 +- tests/test_models.py | 4 +- tests/test_release_manifests.py | 8 +- tests/test_uk_regions.py | 2 +- uv.lock | 12 +-- 9 files changed, 67 insertions(+), 82 deletions(-) create mode 100644 changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md diff --git a/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md b/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md new file mode 100644 index 000000000..0d97ee972 --- /dev/null +++ b/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md @@ -0,0 +1 @@ +Certify the UK populace data release `microcosm-uk-2024-25-national-20261025T091414Z-a6299504` (microcosm_uk_2024_25, policyengine-uk 2.151.0) into the PolicyEngine bundle manifest. diff --git a/pyproject.toml b/pyproject.toml index bfa8910de..2c4307043 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,12 +42,12 @@ graph = [ models = [ "policyengine-core==3.33.3", "policyengine-us==2.2.1", - "policyengine-uk==2.132.6", + "policyengine-uk==2.151.0", "spm-calculator==1.0.0", ] uk = [ "policyengine-core==3.33.3", - "policyengine-uk==2.132.6", + "policyengine-uk==2.151.0", ] us = [ "policyengine-core==3.33.3", @@ -72,7 +72,7 @@ dev = [ "rfc8785>=0.1.4", "policyengine-core==3.33.3", "policyengine-us==2.2.1", - "policyengine-uk==2.132.6", + "policyengine-uk==2.151.0", "spm-calculator==1.0.0", ] diff --git a/src/policyengine/data/bundle/manifest.json b/src/policyengine/data/bundle/manifest.json index 24783f55f..0873ae81f 100644 --- a/src/policyengine/data/bundle/manifest.json +++ b/src/policyengine/data/bundle/manifest.json @@ -16,31 +16,31 @@ }, "data_releases": { "uk": { - "build_id": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", + "build_id": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "bundle_id": "uk-6.11.0", "certification": { - "built_with_model_version": "2.132.6", + "built_with_model_version": "2.151.0", "certified_by": "policyengine.py bundle certification", - "certified_for_model_version": "2.132.6", + "certified_for_model_version": "2.151.0", "compatibility_basis": "built_with_model_package", "core_binding": "bundle_pin", - "data_build_id": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" + "data_build_id": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" }, "certified_data_artifact": { - "build_id": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", + "build_id": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "data_package": { "name": "microcosm-data", "version": "0.1.0" }, "dataset": "microcosm_uk_2024_25", - "sha256": "810ba980005a8b907cb51464279fa5e0125464b7af9a4871b7f6744c30951ece", - "uri": "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" + "sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "uri": "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5@microcosm-uk-2024-25-national-20261025T091414Z-a6299504" }, "country_id": "uk", "data_package": { "name": "microcosm-data", "release_manifest_path": "releases/microcosm-uk-2024-25-national/release_manifest.json", - "release_manifest_revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", + "release_manifest_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "repo_id": "policyengine/populace-uk-private", "repo_type": "dataset", "version": "0.1.0" @@ -50,86 +50,70 @@ "calibration_diagnostics": { "path": "releases/microcosm-uk-2024-25-national/calibration_diagnostics.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "34978e2bfde3f2641769c9c3a8f60455c59ecae5a50524b359d74388d7edc888" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "e61a60a1a8d57204be15600b2f98dbc864123589d48ede8414ebe43139d7c09b" }, "microcosm_uk_2024_25": { "path": "microcosm_uk_2024_25.h5", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "810ba980005a8b907cb51464279fa5e0125464b7af9a4871b7f6744c30951ece" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e" }, "microcosm_uk_2024_25_calibration": { "path": "microcosm_uk_2024_25_calibration.npz", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "104a8253bf1aebc91147c9bbb40e2603d1025317ba8c6b991383d5e4d91852c2" - }, - "microcosm_uk_2024_25_dense": { - "path": "microcosm_uk_2024_25_dense.h5", - "repo_id": "policyengine/populace-uk-private", - "repo_type": "dataset", - "revision": "microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe", - "sha256": "8e10e130d0260e0b52e2e29902f0502ebdff76a14a3e57d2c876bf4cd8db5872" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "96756884d719fa969c2fbdf548f4e56b8311c0c3765c66b1bf9bc8fe862f718f" }, "release_certification": { "path": "releases/microcosm-uk-2024-25-national/release_certification.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "6a68cc93595fc5a7ad451d75a902523c25659de27014f50431dd5e19af5bd959" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "fc657f7ec9a759d15d4ad683ab92d5324f37844667d9d54b6d0648108419cf59" }, "release_cut_gates": { "path": "releases/microcosm-uk-2024-25-national/release_cut_gates.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "c91c1364d9c3be98493039d4e1dd8c2256881a434c1f124dd2ed0701bfaf7751" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "54312402dc3152ab46208f89c86e5d8bf0dce13dfc723171f5a2c08a826217cd" }, "score_vs_enhanced_frs": { "path": "releases/microcosm-uk-2024-25-national/score_vs_enhanced_frs.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "ba8a675f36e7c836bf5521e5933e21bb689442734b7340e05cabd3e0cc55323d" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "9e80102acf02a09a70ba3f45d7e6da2d33178476840388d640105f36ee353bd2" }, "spine_gates": { "path": "releases/microcosm-uk-2024-25-national/spine_gates.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "6dbba976dd1304c07da531382cecb11c9cb69512de0ee65126b71f032a0f37d6" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "6856e437f4fa12a07ffe346a8f070b56d9a05c8dbece3eb277c293e75a0e582b" }, "terminal_gates": { "path": "releases/microcosm-uk-2024-25-national/terminal_gates.json", "repo_id": "policyengine/populace-uk-private", - "revision": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", - "sha256": "e29439d5ce0ea098d32579284ac06f26f086feba2fb8d12d1e88ac9a54840808" + "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "sha256": "cffa3db6734604c4fb7176bb81def41d313a8df26a2a2f675a970a6e9899a644" } }, "default_dataset": "microcosm_uk_2024_25", - "default_dataset_uri": "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", + "default_dataset_uri": "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5@microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "model_package": { "name": "policyengine-uk", - "sha256": "cc54025f2a3bc54be4f8d024d1e6f11ed29fed75ca513b214f2d2963c5bf4354", - "version": "2.132.6", - "wheel_url": "https://files.pythonhosted.org/packages/11/f2/c003cd7a95cb499737a5b8af0d619ba4e759c8bc7e55a2bb5c7efa46abd1/policyengine_uk-2.132.6-py3-none-any.whl" + "sha256": "5722f55aca3eb88e1a228e95e1a57e3bd70a4d530a5a000991565ebd8955ce35", + "version": "2.151.0", + "wheel_url": "https://files.pythonhosted.org/packages/42/15/610c6825ed934d4338a42707b8c021e5627738e68224b6672df94770295c/policyengine_uk-2.151.0-py3-none-any.whl" }, "policyengine_version": "6.11.0", "region_datasets": { - "constituency": { - "path_template": "microcosm_uk_2024_25_dense.h5" - }, - "local_authority": { - "path_template": "microcosm_uk_2024_25_dense.h5" - }, "national": { "path_template": "microcosm_uk_2024_25.h5" } }, - "regional_release_kind": "local_area", - "regional_release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe/releases/microcosm-uk-2024-25-dense/release_manifest.json", - "regional_source_manifest_uri": "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe/releases/microcosm-uk-2024-25-dense/release_manifest.json", - "release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71/releases/microcosm-uk-2024-25-national/release_manifest.json", + "release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261025T091414Z-a6299504/releases/microcosm-uk-2024-25-national/release_manifest.json", "schema_version": 1, - "source_manifest_uri": "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71/releases/microcosm-uk-2024-25-national/release_manifest.json", - "version": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" + "source_manifest_uri": "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-national-20261025T091414Z-a6299504/releases/microcosm-uk-2024-25-national/release_manifest.json", + "version": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" }, "us": { "build_id": "populace-us-2024-spm-20260915", @@ -363,10 +347,10 @@ "policyengine-uk": { "country": "uk", "import_name": "policyengine_uk", - "install_requirement": "policyengine-uk==2.132.6", + "install_requirement": "policyengine-uk==2.151.0", "name": "policyengine-uk", "role": "country_model", - "version": "2.132.6" + "version": "2.151.0" }, "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 cf0006f1b..48852bb00 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-10-19T10:17:15.545356+00:00", + "schema:dateCreated": "2026-10-25T10:57:31.393341+00:00", "schema:description": "TRACE TRO for certified runtime bundle uk-6.11.0 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/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71/releases/microcosm-uk-2024-25-national/release_manifest.json" + "trov:hasLocation": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261025T091414Z-a6299504/releases/microcosm-uk-2024-25-national/release_manifest.json" }, { "@id": "arrangement/1/location/dataset", @@ -53,7 +53,7 @@ "trov:hasArtifact": { "@id": "composition/1/artifact/dataset" }, - "trov:hasLocation": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71/microcosm_uk_2024_25.h5" + "trov:hasLocation": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261025T091414Z-a6299504/microcosm_uk_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/11/f2/c003cd7a95cb499737a5b8af0d619ba4e759c8bc7e55a2bb5c7efa46abd1/policyengine_uk-2.132.6-py3-none-any.whl" + "trov:hasLocation": "https://files.pythonhosted.org/packages/42/15/610c6825ed934d4338a42707b8c021e5627738e68224b6672df94770295c/policyengine_uk-2.151.0-py3-none-any.whl" } ] } @@ -75,51 +75,51 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for uk", "trov:mimeType": "application/json", - "trov:sha256": "bccf23acde631aed4665757094c04f86e60993fb9d388e7dc958b90c876e5a80" + "trov:sha256": "d61f5646f7b5ab11613f6ee6194cc51499aef15291065f8fd887f691ee77950e" }, { "@id": "composition/1/artifact/data_release_manifest", "@type": "trov:ResearchArtifact", "schema:name": "microcosm-data release manifest 0.1.0", "trov:mimeType": "application/json", - "trov:sha256": "49f9fa820db2e6544ff5cdceeb2d868a504843a6a1c1c06b37188621e700066f" + "trov:sha256": "1ebdbcc37535858c995e2d7434074f4ab89521e7b64f9b539a0684906f800e49" }, { "@id": "composition/1/artifact/dataset", "@type": "trov:ResearchArtifact", "schema:name": "microcosm_uk_2024_25", "trov:mimeType": "application/x-hdf5", - "trov:sha256": "810ba980005a8b907cb51464279fa5e0125464b7af9a4871b7f6744c30951ece" + "trov:sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e" }, { "@id": "composition/1/artifact/model_wheel", "@type": "trov:ResearchArtifact", - "schema:name": "policyengine-uk==2.132.6 wheel", + "schema:name": "policyengine-uk==2.151.0 wheel", "trov:mimeType": "application/zip", - "trov:sha256": "cc54025f2a3bc54be4f8d024d1e6f11ed29fed75ca513b214f2d2963c5bf4354" + "trov:sha256": "5722f55aca3eb88e1a228e95e1a57e3bd70a4d530a5a000991565ebd8955ce35" } ], "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "a6de911691f376d0092d99528b8592e60e65e8766a979cd7f7ea0a12d96f1a92" + "trov:sha256": "5cfa6e2e76caeb5335d9b8b28d314e1bd74298107a86250a85300aac84e41648" } }, "trov:hasPerformance": { "@id": "trp/1", "@type": "trov:TransparentResearchPerformance", - "pe:builtWithModelVersion": "2.132.6", + "pe:builtWithModelVersion": "2.151.0", "pe:certifiedBy": "policyengine.py bundle certification", - "pe:certifiedForModelVersion": "2.132.6", + "pe:certifiedForModelVersion": "2.151.0", "pe:compatibilityBasis": "built_with_model_package", "pe:coreBinding": "bundle_pin", - "pe:dataBuildId": "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71", + "pe:dataBuildId": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "pe:emittedIn": "repository-bundle", - "rdfs:comment": "Certification of build microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71 for policyengine-uk 2.132.6.", + "rdfs:comment": "Certification of build microcosm-uk-2024-25-national-20261025T091414Z-a6299504 for policyengine-uk 2.151.0.", "trov:accessedArrangement": { "@id": "arrangement/1" }, - "trov:startedAtTime": "2026-10-19T10:17:15.545356+00:00", + "trov:startedAtTime": "2026-10-25T10:57:31.393341+00:00", "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 a135c4512..d41525c41 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": "bccf23acde631aed4665757094c04f86e60993fb9d388e7dc958b90c876e5a80" + "trov:sha256": "d61f5646f7b5ab11613f6ee6194cc51499aef15291065f8fd887f691ee77950e" }, { "@id": "composition/1/artifact/data_release_manifest", @@ -101,7 +101,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "3c63dadd4e5c01ee40268ce3ba9ce433cf911b163adac88126ee6e8c6f4fb319" + "trov:sha256": "dd24bc01784972a876d5633afabdbf95956e4359ac5e9559d2d17938270d2ba9" } }, "trov:hasPerformance": { diff --git a/tests/test_models.py b/tests/test_models.py index 682925a09..c057a5196 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.132.6" + assert uk_latest.model_package.version == "2.151.0" assert uk_latest.data_package.name == "microcosm-data" assert uk_latest.data_package.version == "0.1.0" assert ( uk_latest.default_dataset_uri == "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5" - "@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" + "@microcosm-uk-2024-25-national-20261025T091414Z-a6299504" ) def test_has_hundreds_of_parameters(self): diff --git a/tests/test_release_manifests.py b/tests/test_release_manifests.py index 006070e2a..91254203d 100644 --- a/tests/test_release_manifests.py +++ b/tests/test_release_manifests.py @@ -73,11 +73,11 @@ "hf://policyengine/populace-us/populace_us_2024_acs_local.h5" f"@{US_LOCAL_AREA_RELEASE_ID}" ) -UK_MODEL_VERSION = "2.132.6" -UK_BUILT_WITH_MODEL_VERSION = "2.132.6" +UK_MODEL_VERSION = "2.151.0" +UK_BUILT_WITH_MODEL_VERSION = "2.151.0" UK_DATA_RELEASE_VERSION = "0.1.0" -UK_DATA_RELEASE_ID = "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" -UK_DATA_RELEASE_REVISION = "microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" +UK_DATA_RELEASE_ID = "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" +UK_DATA_RELEASE_REVISION = "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" UK_DATA_RELEASE_PATH = "releases/microcosm-uk-2024-25-national/release_manifest.json" UK_LOCAL_AREA_RELEASE_ID = "microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe" # The prior certified default (policyengine-uk-data 1.58.1), kept resolvable diff --git a/tests/test_uk_regions.py b/tests/test_uk_regions.py index 29c6b27eb..c9fa7c142 100644 --- a/tests/test_uk_regions.py +++ b/tests/test_uk_regions.py @@ -24,7 +24,7 @@ # release its constituency and local-authority regions are routed to. UK_CERTIFIED_NATIONAL_URI = ( "hf://policyengine/populace-uk-private/microcosm_uk_2024_25.h5" - "@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71" + "@microcosm-uk-2024-25-national-20261025T091414Z-a6299504" ) UK_CERTIFIED_LOCAL_AREA_URI = ( "hf://policyengine/populace-uk-private/microcosm_uk_2024_25_dense.h5" diff --git a/uv.lock b/uv.lock index 640262249..319406a86 100644 --- a/uv.lock +++ b/uv.lock @@ -1894,9 +1894,9 @@ requires-dist = [ { name = "policyengine-core", marker = "extra == 'models'", specifier = "==3.33.3" }, { name = "policyengine-core", marker = "extra == 'uk'", specifier = "==3.33.3" }, { name = "policyengine-core", marker = "extra == 'us'", specifier = "==3.33.3" }, - { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.132.6" }, - { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.132.6" }, - { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.132.6" }, + { name = "policyengine-uk", marker = "extra == 'dev'", specifier = "==2.151.0" }, + { name = "policyengine-uk", marker = "extra == 'models'", specifier = "==2.151.0" }, + { name = "policyengine-uk", marker = "extra == 'uk'", specifier = "==2.151.0" }, { 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" }, @@ -1946,7 +1946,7 @@ wheels = [ [[package]] name = "policyengine-uk" -version = "2.132.6" +version = "2.151.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "microdf-python" }, @@ -1954,9 +1954,9 @@ dependencies = [ { name = "pydantic" }, { name = "tables" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3f/88/bc06328a739b335d4ef5f2d07fd36cc6a3a5e0f6ec1b2c774a14e77e43a3/policyengine_uk-2.132.6.tar.gz", hash = "sha256:f9ce261d9881eee32fab96341c7080cd0c86717b40785b5cdaff44b07262a771", size = 2560464, upload-time = "2026-10-15T10:08:14.263Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8f/b4/4a4ccbca68518d3e433d2d00c7e35fe136239a8ae2baf59324637a941f97/policyengine_uk-2.151.0.tar.gz", hash = "sha256:93bc378cad973244e7e3854d7a3a35e1011d381895d029b6996f14b32c240fd1", size = 3316516, upload-time = "2026-10-23T22:35:26.619Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/11/f2/c003cd7a95cb499737a5b8af0d619ba4e759c8bc7e55a2bb5c7efa46abd1/policyengine_uk-2.132.6-py3-none-any.whl", hash = "sha256:cc54025f2a3bc54be4f8d024d1e6f11ed29fed75ca513b214f2d2963c5bf4354", size = 3882707, upload-time = "2026-10-15T10:08:11.572Z" }, + { url = "https://files.pythonhosted.org/packages/42/15/610c6825ed934d4338a42707b8c021e5627738e68224b6672df94770295c/policyengine_uk-2.151.0-py3-none-any.whl", hash = "sha256:5722f55aca3eb88e1a228e95e1a57e3bd70a4d530a5a000991565ebd8955ce35", size = 4896964, upload-time = "2026-10-23T22:35:24.116Z" }, ] [[package]] From c885af31ec862eecc06b5dec82d18b1aa5e63f4e Mon Sep 17 00:00:00 2001 From: Maria Juaristi Date: Mon, 26 Oct 2026 13:25:06 +0000 Subject: [PATCH 2/3] Add the local-area cut c9df4b86 to the 2.151.0 pair's certification Re-certified with --regional-manifest-uri: constituency and local-authority regions route to microcosm-uk-2024-25-dense- 20261026T105309Z-c9df4b86, built with policyengine-uk 2.151.0 on the national's spine, so the default registry has its 1,016 regions again. The two routing tests take the new cut; the changelog fragment covers the pair and the model pin. Co-Authored-By: Claude Opus 5.5 --- ...national-20261025T091414Z-a6299504.changed.md | 2 +- src/policyengine/data/bundle/manifest.json | 16 ++++++++++++++++ src/policyengine/data/bundle/uk.trace.tro.jsonld | 4 ++-- src/policyengine/data/bundle/us.trace.tro.jsonld | 4 ++-- tests/test_release_manifests.py | 2 +- tests/test_uk_regions.py | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md b/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md index 0d97ee972..9bdcfbdbc 100644 --- a/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md +++ b/changelog.d/certify-uk-microcosm-uk-2024-25-national-20261025T091414Z-a6299504.changed.md @@ -1 +1 @@ -Certify the UK populace data release `microcosm-uk-2024-25-national-20261025T091414Z-a6299504` (microcosm_uk_2024_25, policyengine-uk 2.151.0) into the PolicyEngine bundle manifest. +Certify the Microcosm UK pair built on policyengine-uk 2.151.0 (microcosm `67ee2ddf3`): the national cut `microcosm-uk-2024-25-national-20261025T091414Z-a6299504` (`microcosm_uk_2024_25`) and, for constituency and local-authority regions, the local-area cut `microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86` (`microcosm_uk_2024_25_dense`), both built from one spine. The UK model pin moves from policyengine-uk 2.132.6 to 2.151.0 (policyengine-core stays 3.33.3), so UK results change with both the model and the data. From policyengine-uk 2.134.0 a capital gains tax reform scales realised gains by a retention-rate elasticity of 1 by default (`gov.simulation.capital_gains_responses.elasticity`); set it to 0 for a static costing. With a Hugging Face token set, importing policyengine with any policyengine-uk other than 2.151.0 raises. diff --git a/src/policyengine/data/bundle/manifest.json b/src/policyengine/data/bundle/manifest.json index 0873ae81f..1d0606478 100644 --- a/src/policyengine/data/bundle/manifest.json +++ b/src/policyengine/data/bundle/manifest.json @@ -65,6 +65,13 @@ "revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", "sha256": "96756884d719fa969c2fbdf548f4e56b8311c0c3765c66b1bf9bc8fe862f718f" }, + "microcosm_uk_2024_25_dense": { + "path": "microcosm_uk_2024_25_dense.h5", + "repo_id": "policyengine/populace-uk-private", + "repo_type": "dataset", + "revision": "microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86", + "sha256": "cb3712f25b76109ad27b7b0cdf5dee78c55d3b7f55ce7bf207ef1a191da2ae9a" + }, "release_certification": { "path": "releases/microcosm-uk-2024-25-national/release_certification.json", "repo_id": "policyengine/populace-uk-private", @@ -106,10 +113,19 @@ }, "policyengine_version": "6.11.0", "region_datasets": { + "constituency": { + "path_template": "microcosm_uk_2024_25_dense.h5" + }, + "local_authority": { + "path_template": "microcosm_uk_2024_25_dense.h5" + }, "national": { "path_template": "microcosm_uk_2024_25.h5" } }, + "regional_release_kind": "local_area", + "regional_release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86/releases/microcosm-uk-2024-25-dense/release_manifest.json", + "regional_source_manifest_uri": "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86/releases/microcosm-uk-2024-25-dense/release_manifest.json", "release_manifest_uri": "https://huggingface.co/datasets/policyengine/populace-uk-private/resolve/microcosm-uk-2024-25-national-20261025T091414Z-a6299504/releases/microcosm-uk-2024-25-national/release_manifest.json", "schema_version": 1, "source_manifest_uri": "hf://dataset/policyengine/populace-uk-private@microcosm-uk-2024-25-national-20261025T091414Z-a6299504/releases/microcosm-uk-2024-25-national/release_manifest.json", diff --git a/src/policyengine/data/bundle/uk.trace.tro.jsonld b/src/policyengine/data/bundle/uk.trace.tro.jsonld index 48852bb00..b2a26d7e7 100644 --- a/src/policyengine/data/bundle/uk.trace.tro.jsonld +++ b/src/policyengine/data/bundle/uk.trace.tro.jsonld @@ -75,7 +75,7 @@ "@type": "trov:ResearchArtifact", "schema:name": "policyengine.py bundle manifest for uk", "trov:mimeType": "application/json", - "trov:sha256": "d61f5646f7b5ab11613f6ee6194cc51499aef15291065f8fd887f691ee77950e" + "trov:sha256": "93556c99569af70d6a49c3c6f20e17638521d4d9e32724ab516243f2a2be7eaa" }, { "@id": "composition/1/artifact/data_release_manifest", @@ -102,7 +102,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "5cfa6e2e76caeb5335d9b8b28d314e1bd74298107a86250a85300aac84e41648" + "trov:sha256": "63d795c6e09e37954c193f1d0a08b1b61ab1ccc75fd1181f830431750ae8fe4b" } }, "trov:hasPerformance": { diff --git a/src/policyengine/data/bundle/us.trace.tro.jsonld b/src/policyengine/data/bundle/us.trace.tro.jsonld index d41525c41..4c316c6c2 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": "d61f5646f7b5ab11613f6ee6194cc51499aef15291065f8fd887f691ee77950e" + "trov:sha256": "93556c99569af70d6a49c3c6f20e17638521d4d9e32724ab516243f2a2be7eaa" }, { "@id": "composition/1/artifact/data_release_manifest", @@ -101,7 +101,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "dd24bc01784972a876d5633afabdbf95956e4359ac5e9559d2d17938270d2ba9" + "trov:sha256": "3c17ca543cf560848ed35f296279cb6c0d86660fa6148882baccf9d0446b4cf2" } }, "trov:hasPerformance": { diff --git a/tests/test_release_manifests.py b/tests/test_release_manifests.py index 91254203d..abc8b1a2b 100644 --- a/tests/test_release_manifests.py +++ b/tests/test_release_manifests.py @@ -79,7 +79,7 @@ UK_DATA_RELEASE_ID = "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" UK_DATA_RELEASE_REVISION = "microcosm-uk-2024-25-national-20261025T091414Z-a6299504" UK_DATA_RELEASE_PATH = "releases/microcosm-uk-2024-25-national/release_manifest.json" -UK_LOCAL_AREA_RELEASE_ID = "microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe" +UK_LOCAL_AREA_RELEASE_ID = "microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86" # The prior certified default (policyengine-uk-data 1.58.1), kept resolvable # via dataset_overlays. UK_EFRS_DATASET_URI = ( diff --git a/tests/test_uk_regions.py b/tests/test_uk_regions.py index c9fa7c142..f1e7e716e 100644 --- a/tests/test_uk_regions.py +++ b/tests/test_uk_regions.py @@ -28,7 +28,7 @@ ) UK_CERTIFIED_LOCAL_AREA_URI = ( "hf://policyengine/populace-uk-private/microcosm_uk_2024_25_dense.h5" - "@microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe" + "@microcosm-uk-2024-25-dense-20261026T105309Z-c9df4b86" ) UK_AREA_REGION_COUNT = 650 + 361 From 99a3e48b405e513a98850c64ee3564f0ca8e7553 Mon Sep 17 00:00:00 2001 From: Maria Juaristi Date: Mon, 26 Oct 2026 13:29:02 +0000 Subject: [PATCH 3/3] Regenerate the household calculator snapshots on policyengine-uk 2.151.0 PE_UPDATE_SNAPSHOTS=1 on tests/test_household_calculator_snapshot.py, as the certification tool does: the UK households and the model surface move with the new model; the US ones are unchanged. Co-Authored-By: Claude Opus 5.5 --- .../uk_couple_two_kids.json | 8 ++++---- .../household_calculator_snapshots/uk_model_surface.json | 4 ++-- .../uk_single_adult_employment_income.json | 4 ++-- .../uk_single_adult_no_income.json | 4 ++-- .../uk_single_parent_one_child.json | 4 ++-- 5 files changed, 12 insertions(+), 12 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 28fa19e29..2d5394702 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +++ b/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json @@ -13,14 +13,14 @@ "household.equiv_hbai_household_net_income": 52510.29, "household.fuel_duty": 0.0, "household.hbai_household_net_income": 73514.4, - "household.household_benefits": 9441.78, + "household.household_benefits": 9872.8, "household.household_count_people": 4.0, - "household.household_gross_income": 99441.78, + "household.household_gross_income": 99872.8, "household.household_id": 0.0, "household.household_income_decile": 10.0, "household.household_market_income": 90000.0, - "household.household_net_income": 80438.73, - "household.household_tax": 19003.05, + "household.household_net_income": 80869.8, + "household.household_tax": 19003.0, "household.household_wealth_decile": 10.0, "household.household_weight": 1.0, "household.in_poverty_ahc": 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 25270d576..c926e1f2d 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": 32, - "num_variables_bucketed_100s": 11, + "num_parameters_bucketed_100s": 42, + "num_variables_bucketed_100s": 12, "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 ab0db4990..a96a4e099 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 @@ -19,8 +19,8 @@ "household.household_id": 0.0, "household.household_income_decile": 10.0, "household.household_market_income": 30000.0, - "household.household_net_income": 24939.55, - "household.household_tax": 5060.45, + "household.household_net_income": 24939.6, + "household.household_tax": 5060.4, "household.household_wealth_decile": 10.0, "household.household_weight": 1.0, "household.in_poverty_ahc": 0.0, diff --git a/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json b/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json index 391af4492..2dba151cd 100644 --- a/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json +++ b/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json @@ -19,8 +19,8 @@ "household.household_id": 0.0, "household.household_income_decile": 10.0, "household.household_market_income": 0.0, - "household.household_net_income": 4918.75, - "household.household_tax": 180.04, + "household.household_net_income": 4918.8, + "household.household_tax": 180.0, "household.household_wealth_decile": 10.0, "household.household_weight": 1.0, "household.in_poverty_ahc": 1.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 c0d339da5..3c4e5025a 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 @@ -19,8 +19,8 @@ "household.household_id": 0.0, "household.household_income_decile": 10.0, "household.household_market_income": 25000.0, - "household.household_net_income": 24342.45, - "household.household_tax": 3660.45, + "household.household_net_income": 24342.5, + "household.household_tax": 3660.4, "household.household_wealth_decile": 10.0, "household.household_weight": 1.0, "household.in_poverty_ahc": 0.0,