Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3855 +/- ##
===========================================
+ Coverage 45.76% 87.68% +41.92%
===========================================
Files 182 198 +16
Lines 10812 12010 +1198
Branches 1837 2106 +269
===========================================
+ Hits 4948 10531 +5583
+ Misses 5456 901 -4555
- Partials 408 578 +170 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…-1-2-api # Conflicts: # tests/unit/routes/test_calculate_error_statuses.py # tests/unit/services/test_economy_service.py
|
CI follow-up completed in commits
Validation:
The only remaining unsuccessful check is the live simulation compatibility check because the deployed simulation service does not yet advertise PolicyEngine.py 6.1.2. No service was deployed or merged as part of this fix. |
|
@anth-volk, could this PR and PolicyEngine/policyengine-sim-api#703 target policyengine.py 6.2.0 instead of 6.1.2 before they merge? A UK household calculator I'm building needs the duties added in policyengine-uk 2.102.0 (PolicyEngine/policyengine-uk#1876: alcohol, tobacco, vehicle excise and road fuel gas). API v1 runs policyengine-uk 2.90.2 today, and 6.1.2 still selects 2.90.2. 6.2.0 was released on 29 Sep at 18:02 UTC, after this PR was opened, and selects 2.102.3 (PolicyEngine/policyengine.py#536). What moves between 6.1.2 and 6.2.0. Only policyengine-uk, from 2.90.2 to 2.102.3. Core 3.32.5, US 2.2.1, spm-calculator 1.0.0 and both certified data releases ( What else it changes. 6.2.0 moves every UK result the API serves, household and economy, onto 2.102.3. Its changelog lists the absolute poverty line rebased to FYE 2025, which raises UK absolute poverty in 2026-27 on the certified enhanced FRS by about 4 points overall and 7 points for children after housing costs, and relative poverty measured on the median over individuals (PolicyEngine/policyengine-uk#1865). Versions 2.102.1 and 2.102.2 also fix Class 4 National Insurance. If you and Max would rather land the v6 migration on 6.1.2 first, when would 6.2.0 follow? No bot PR will open for it: every |
…-1-2-api # Conflicts: # pyproject.toml # tests/unit/test_cloud_run_deploy_scripts.py
Summary
policyengine[models]==6.2.1, which selects PolicyEngine Core 3.32.10, PolicyEngine US 2.2.1, PolicyEngine UK 2.102.3, and spm-calculator 1.0.0.This supersedes #3837 as a clean implementation from current
master. It does not reuse the implementation logic or commits from #3837.PolicyEngine.py 6 behavior covered here
PolicyEngine.py 6.2.1 identifies the exact Supplemental Poverty Measure forecast file and default scenario used by the installed US model. API v1 resolves those settings before submitting an economy calculation. It rejects a worker that reports different settings, and it validates the forecast, scenario, year, and geography information in completed results before caching them.
The bundle also changes the installed public model catalog. The compatibility test now records 7,104 variables, 29,170 parameter nodes, 103,853 parameters, and 1,193,400 parameter values.
Simulation API relationship
PolicyEngine/policyengine-sim-api#703 contains the corresponding worker update to PolicyEngine.py 6.2.1. The two PRs can be reviewed independently. This PR does not merge or deploy #703, and opening this PR does not roll out either service.
Until a compatible worker is deployed, API v1 returns
SPM_CONFIGURATION_UNAVAILABLEfor affected US economy requests instead of submitting them to an incompatible worker. The live worker compatibility check may therefore remain unsuccessful while #703 is only a PR.Commits
Testing
uv lock --check