From f95b784270f0ee9e175ef1d8ab7e4ffce51a74bd Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Tue, 24 Feb 2026 22:32:05 +0100 Subject: [PATCH 1/2] chore: Update uv.lock for policyengine 0.12.1 Co-Authored-By: Claude Opus 4.6 --- projects/policyengine-api-simulation/uv.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/policyengine-api-simulation/uv.lock b/projects/policyengine-api-simulation/uv.lock index 18a379ee5..209a2b661 100644 --- a/projects/policyengine-api-simulation/uv.lock +++ b/projects/policyengine-api-simulation/uv.lock @@ -725,6 +725,7 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/ab/d26750f2b7242c2b90ea2ad71de70cfcd73a948a49513188a0fc0d6fc15a/greenlet-3.3.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:7ab327905cabb0622adca5971e488064e35115430cec2c35a50fd36e72a315b3", size = 275205, upload-time = "2026-01-23T15:30:24.556Z" }, { url = "https://files.pythonhosted.org/packages/10/d3/be7d19e8fad7c5a78eeefb2d896a08cd4643e1e90c605c4be3b46264998f/greenlet-3.3.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65be2f026ca6a176f88fb935ee23c18333ccea97048076aef4db1ef5bc0713ac", size = 599284, upload-time = "2026-01-23T16:00:58.584Z" }, { url = "https://files.pythonhosted.org/packages/ae/21/fe703aaa056fdb0f17e5afd4b5c80195bbdab701208918938bd15b00d39b/greenlet-3.3.1-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7a3ae05b3d225b4155bda56b072ceb09d05e974bc74be6c3fc15463cf69f33fd", size = 610274, upload-time = "2026-01-23T16:05:29.312Z" }, + { url = "https://files.pythonhosted.org/packages/06/00/95df0b6a935103c0452dad2203f5be8377e551b8466a29650c4c5a5af6cc/greenlet-3.3.1-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:12184c61e5d64268a160226fb4818af4df02cfead8379d7f8b99a56c3a54ff3e", size = 624375, upload-time = "2026-01-23T16:15:55.915Z" }, { url = "https://files.pythonhosted.org/packages/cb/86/5c6ab23bb3c28c21ed6bebad006515cfe08b04613eb105ca0041fecca852/greenlet-3.3.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6423481193bbbe871313de5fd06a082f2649e7ce6e08015d2a76c1e9186ca5b3", size = 612904, upload-time = "2026-01-23T15:32:52.317Z" }, { url = "https://files.pythonhosted.org/packages/c2/f3/7949994264e22639e40718c2daf6f6df5169bf48fb038c008a489ec53a50/greenlet-3.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:33a956fe78bbbda82bfc95e128d61129b32d66bcf0a20a1f0c08aa4839ffa951", size = 1567316, upload-time = "2026-01-23T16:04:23.316Z" }, { url = "https://files.pythonhosted.org/packages/8d/6e/d73c94d13b6465e9f7cd6231c68abde838bb22408596c05d9059830b7872/greenlet-3.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4b065d3284be43728dd280f6f9a13990b56470b81be20375a207cdc814a983f2", size = 1636549, upload-time = "2026-01-23T15:33:48.643Z" }, @@ -1589,7 +1590,7 @@ name = "pexpect" version = "4.9.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "ptyprocess" }, + { name = "ptyprocess", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } wheels = [ @@ -1629,7 +1630,7 @@ wheels = [ [[package]] name = "policyengine" -version = "0.12.0" +version = "0.12.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "diskcache" }, @@ -1641,7 +1642,7 @@ dependencies = [ { name = "policyengine-us" }, { name = "pydantic" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/56/2d/b1fd70a42b7d73ad532dac6775e260631475fbca2fe3c1ba4e0320113664/policyengine-0.12.0.tar.gz", hash = "sha256:be31558afe65682df8080fdb1968287549f24009ec91a703047f5afb1646c235", size = 227620, upload-time = "2026-02-05T19:35:25.715Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/ee/e26f2be32041233d27ab3dc76618db4667b23c1180f9926e30401d05f784/policyengine-0.12.1.tar.gz", hash = "sha256:8c3f63725eb6d7dbc23405cf26d1b375d7ca1074b756c7576adb7b0cea8c55ea", size = 229590, upload-time = "2026-02-24T20:13:32.978Z" } [[package]] name = "policyengine-core" @@ -1747,7 +1748,7 @@ requires-dist = [ { name = "openapi-python-client", marker = "extra == 'build'", specifier = ">=0.21.6" }, { name = "opentelemetry-instrumentation-fastapi", specifier = ">=0.51b0,<0.52" }, { name = "opentelemetry-instrumentation-sqlalchemy", specifier = ">=0.51b0,<0.52" }, - { name = "policyengine", specifier = "==0.12.0" }, + { name = "policyengine", specifier = "==0.12.1" }, { name = "policyengine-core", specifier = ">=3.23.5" }, { name = "policyengine-fastapi", editable = "../../libs/policyengine-fastapi" }, { name = "policyengine-uk", specifier = ">=2.22.8" }, From 22c7c4b7c33b50833c51124d36e260cd253f356e Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Wed, 25 Feb 2026 15:21:04 +0100 Subject: [PATCH 2/2] Fix stale us_model_version in integration tests Update hardcoded 1.459.0 defaults to 1.562.3 in conftest.py and app.py. Wire deployed US version from deploy job through CI to the integration test script so it always targets the actually-deployed version. Fixes #413 Co-Authored-By: Claude Opus 4.6 --- .github/scripts/modal-run-integ-tests.sh | 7 ++++++- .github/workflows/modal-deploy.reusable.yml | 3 ++- projects/policyengine-api-simulation/src/modal/app.py | 2 +- .../policyengine-apis-integ/tests/simulation/conftest.py | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/scripts/modal-run-integ-tests.sh b/.github/scripts/modal-run-integ-tests.sh index 0713ffd57..e05702b9b 100755 --- a/.github/scripts/modal-run-integ-tests.sh +++ b/.github/scripts/modal-run-integ-tests.sh @@ -1,18 +1,23 @@ #!/bin/bash # Run simulation integration tests -# Usage: ./modal-run-integ-tests.sh +# Usage: ./modal-run-integ-tests.sh [us-version] # Environment: beta runs all tests, prod excludes beta_only tests set -euo pipefail ENVIRONMENT="${1:?Environment required (beta or prod)}" BASE_URL="${2:?Base URL required}" +US_VERSION="${3:-}" cd projects/policyengine-apis-integ uv sync --extra test export simulation_integ_test_base_url="$BASE_URL" +if [ -n "$US_VERSION" ]; then + export simulation_integ_test_us_model_version="$US_VERSION" +fi + if [ "$ENVIRONMENT" = "beta" ]; then echo "Running all simulation integration tests (including beta_only)" uv run pytest tests/simulation/ -v diff --git a/.github/workflows/modal-deploy.reusable.yml b/.github/workflows/modal-deploy.reusable.yml index 971eb7053..07ce2d777 100644 --- a/.github/workflows/modal-deploy.reusable.yml +++ b/.github/workflows/modal-deploy.reusable.yml @@ -23,6 +23,7 @@ jobs: environment: ${{ inputs.environment }} outputs: simulation_api_url: ${{ steps.get-url.outputs.simulation_api_url }} + us_version: ${{ steps.versions.outputs.us_version }} steps: - name: Checkout repo @@ -101,4 +102,4 @@ jobs: run: ./scripts/generate-clients.sh - name: Run simulation integration tests - run: .github/scripts/modal-run-integ-tests.sh "${{ inputs.environment }}" "${{ needs.deploy.outputs.simulation_api_url }}" + run: .github/scripts/modal-run-integ-tests.sh "${{ inputs.environment }}" "${{ needs.deploy.outputs.simulation_api_url }}" "${{ needs.deploy.outputs.us_version }}" diff --git a/projects/policyengine-api-simulation/src/modal/app.py b/projects/policyengine-api-simulation/src/modal/app.py index 285201fc5..35974d81e 100644 --- a/projects/policyengine-api-simulation/src/modal/app.py +++ b/projects/policyengine-api-simulation/src/modal/app.py @@ -13,7 +13,7 @@ from src.modal._image_setup import snapshot_models # Get versions from environment or use defaults -US_VERSION = os.environ.get("POLICYENGINE_US_VERSION", "1.459.0") +US_VERSION = os.environ.get("POLICYENGINE_US_VERSION", "1.562.3") UK_VERSION = os.environ.get("POLICYENGINE_UK_VERSION", "2.65.9") diff --git a/projects/policyengine-apis-integ/tests/simulation/conftest.py b/projects/policyengine-apis-integ/tests/simulation/conftest.py index 1a6d650fe..265249ba1 100644 --- a/projects/policyengine-apis-integ/tests/simulation/conftest.py +++ b/projects/policyengine-apis-integ/tests/simulation/conftest.py @@ -10,7 +10,7 @@ class Settings(BaseSettings): access_token: str | None = None timeout_in_millis: int = 600_000 # 10 minutes for full simulations poll_interval_seconds: float = 5.0 - us_model_version: str = "1.459.0" + us_model_version: str = "1.562.3" model_config = SettingsConfigDict(env_prefix="simulation_integ_test_")