Skip to content

Add budget-window batch economy endpoint#3387

Draft
MaxGhenis wants to merge 10 commits intomasterfrom
codex/budget-window-batch
Draft

Add budget-window batch economy endpoint#3387
MaxGhenis wants to merge 10 commits intomasterfrom
codex/budget-window-batch

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

Summary

  • add a dedicated budget-window economy endpoint that batches yearly reform-impact work server-side
  • cap active yearly jobs and return aggregate progress, completed years, queued years, and final totals
  • cover completed, queued, and error flows in the economy service tests

Testing

  • FLASK_DEBUG=1 uv run --python 3.12 pytest tests/unit/services/test_economy_service.py
  • uv run --python 3.12 ruff format --check .

Companion app change: PolicyEngine/policyengine-app-v2#930

MaxGhenis and others added 2 commits March 10, 2026 08:44
The axes code path silently discarded all exceptions (`pass`),
causing variables like NJ gross income to return null with no
error trace. Now logs the full traceback via logging.exception().

Fixes #3322

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 76.21359% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.85%. Comparing base (6af28d7) to head (cdfbf01).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/services/economy_service.py 74.07% 24 Missing and 18 partials ⚠️
policyengine_api/routes/economy_routes.py 85.36% 3 Missing and 3 partials ⚠️
policyengine_api/country.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3387      +/-   ##
==========================================
+ Coverage   72.20%   72.85%   +0.64%     
==========================================
  Files          56       56              
  Lines        2425     2656     +231     
  Branches      423      476      +53     
==========================================
+ Hits         1751     1935     +184     
- Misses        595      622      +27     
- Partials       79       99      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant