From d9d6b360fb8f388b855f2ccd7e7b5843f9fe1d9e Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 02:29:39 +0400 Subject: [PATCH 1/2] Restore Scotland live test with forthcoming PolicyEngine 6.2.3 --- .github/workflows/pr.yml | 2 ++ changelog.d/3876.changed.md | 1 + docker/Dockerfile | 2 +- pyproject.toml | 2 +- tests/integration/test_live_economy.py | 16 ++++++++++++++++ tests/unit/test_live_simulation_requests.py | 5 +++++ 6 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 changelog.d/3876.changed.md diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b2bfb28ed..5f3b63683 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,6 +29,8 @@ jobs: run: sudo apt-get install -y jq - name: Set up uv for installed bundle validation uses: astral-sh/setup-uv@v6 + - name: Verify required package versions exist and the lockfile is current + run: uv lock --check - name: Check simulation API supports updated PolicyEngine bundle run: bash .github/check-policyengine-bundle-supported.sh --if-changed-from-base "${{ github.base_ref }}" diff --git a/changelog.d/3876.changed.md b/changelog.d/3876.changed.md new file mode 100644 index 000000000..7d5802f59 --- /dev/null +++ b/changelog.d/3876.changed.md @@ -0,0 +1 @@ +Restore Scotland population live coverage and require PolicyEngine 6.2.3 with UK country filtering through stored household regions; verify dependency availability and lock consistency before checking simulation-worker support. diff --git a/docker/Dockerfile b/docker/Dockerfile index 83b3cabe4..5aa785703 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ FROM python:3.12 # Match the API bundle in pyproject.toml; the bundle updater changes both pins. # The models extra pins the complete certified runtime package set. -RUN pip install "policyengine[models]==6.2.1" ipython +RUN pip install "policyengine[models]==6.2.3" ipython diff --git a/pyproject.toml b/pyproject.toml index 54988ccad..7bdeac037 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dependencies = [ # versions certified by this PolicyEngine bundle. Cloud Run installs the # complete frozen environment from uv.lock; the generic image installs # this requirement directly. - "policyengine[models]==6.2.1", + "policyengine[models]==6.2.3", "pydantic", "pymysql", "python-dotenv", diff --git a/tests/integration/test_live_economy.py b/tests/integration/test_live_economy.py index 259f7949a..de363f039 100644 --- a/tests/integration/test_live_economy.py +++ b/tests/integration/test_live_economy.py @@ -132,3 +132,19 @@ def test_live_california_eitc_macro_reform( region="state/ca", probe_suffix="california-eitc", ) + + +def test_live_uk_universal_credit_macro_reform_in_scotland( + api_client, + integration_probe_id, + poll_live_endpoint, +): + _assert_live_macro_reform( + api_client, + integration_probe_id, + poll_live_endpoint, + country_id="uk", + reform_filename="uk_universal_credit_reform.json", + region="country/scotland", + probe_suffix="uk-scotland-uc", + ) diff --git a/tests/unit/test_live_simulation_requests.py b/tests/unit/test_live_simulation_requests.py index 1dfae6b87..627660458 100644 --- a/tests/unit/test_live_simulation_requests.py +++ b/tests/unit/test_live_simulation_requests.py @@ -16,6 +16,11 @@ [ (live_economy.test_live_utah_macro_reform, "us", "ut"), (live_economy.test_live_california_eitc_macro_reform, "us", "state/ca"), + ( + live_economy.test_live_uk_universal_credit_macro_reform_in_scotland, + "uk", + "country/scotland", + ), ], ) def test_live_macro_requests_follow_the_query_contract(live_test, country_id, region): From ab9ff656678832e32a0b1b6ec798953679b60fa7 Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 18:20:16 +0400 Subject: [PATCH 2/2] Lock published PolicyEngine 6.2.3 for API v1 --- uv.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/uv.lock b/uv.lock index 355ae95a9..5dfef5725 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '3.15' and sys_platform == 'win32'", @@ -2743,7 +2743,7 @@ wheels = [ [[package]] name = "policyengine" -version = "6.2.1" +version = "6.2.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "h5py" }, @@ -2755,9 +2755,9 @@ dependencies = [ { name = "pydantic" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/67/f2/3a75eb571fa3eda2e9f043c145cadae9eab4df6959fc447e767f92885d88/policyengine-6.2.1.tar.gz", hash = "sha256:0f2e51be23229ab5d8a8f80fb7b716fe4d3780806e2e16dfcda0362983beac56", size = 772927, upload-time = "2026-09-30T22:19:57.846Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7c/6e/21e8579efcf9feb8774d599ef75673d58e423b940d3efa4471290e15532c/policyengine-6.2.3.tar.gz", hash = "sha256:aab6f35259fead4278ac4cda16971db5a494c489b29fdb65bf8e50bf730ec5bb", size = 779139, upload-time = "2026-10-09T01:50:20.688Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/8b/4b216e42d150852e51c01ea654455496e1e1197c008e72e70f29392dec8c/policyengine-6.2.1-py3-none-any.whl", hash = "sha256:d07ff400da096be4b43843bd333ea0b7f42b06f5eea584e72c78f75a16fe3cdb", size = 252406, upload-time = "2026-09-30T22:19:56.61Z" }, + { url = "https://files.pythonhosted.org/packages/3a/27/68bfc3a1a1e70e1eccb581369a3c026fd04e5fd9b167c764334329d86530/policyengine-6.2.3-py3-none-any.whl", hash = "sha256:8f8f3d745c29ef81cf19144101dab86cfb9a895b2628eeba75d9f033b299f500", size = 253744, upload-time = "2026-10-09T01:50:18.851Z" }, ] [package.optional-dependencies] @@ -2844,7 +2844,7 @@ requires-dist = [ { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.15,<2" }, { name = "openai" }, { name = "packaging", specifier = ">=24,<27" }, - { name = "policyengine", extras = ["models"], specifier = "==6.2.1" }, + { name = "policyengine", extras = ["models"], specifier = "==6.2.3" }, { name = "policyengine-canada", specifier = "==0.96.3" }, { name = "policyengine-il", specifier = "==0.1.0" }, { name = "policyengine-ng", specifier = "==0.5.1" },