docs(budget): document budget surface; paginate get_entity_budget_flows#41
Merged
vdavez merged 1 commit intoJun 4, 2026
Merged
Conversation
Extends `get_entity_budget_flows()` to expose the backend's StandardResultsSetPagination (`page`, `limit`) and a `fiscal_year` filter, returning `PaginatedResponse[dict[str, Any]]` instead of a raw dict. The previous signature gave callers no way to reach pages beyond the first or to narrow by fiscal year. Documents the budget surface that shipped in v1.1.0 but never made it into `docs/API_REFERENCE.md`: a new `## Budget` section covering `list_budget_accounts`, `get_budget_account`, `get_budget_account_quarters`, and `get_budget_account_recipients`; a `get_entity_budget_flows()` entry under Entity Sub-resources; a `BUDGET_ACCOUNTS_MINIMAL` row in the ShapeConfig table; and a Budget entry in the table of contents. Adds mock unit tests for the new signature (defaults, param flow-through with limit cap, empty-UEI validation) and a cassette-backed integration test that asserts the PaginatedResponse shape and `fiscal_year` filter behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vdavez
added a commit
that referenced
this pull request
Jun 4, 2026
Promotes [Unreleased] to [1.1.2] - 2026-06-04, covering the changes that landed since v1.1.1: - get_entity_budget_flows() now paginated + accepts fiscal_year (#41) - Budget surface documented in docs/API_REFERENCE.md (#41) - strict-mypy burn-down across tango/shapes/ (#37) — mypy is now a hard gate in lint.yml - CI runtimes bumped off Node 20 (#36) Bumps pyproject.toml + tango/__init__.py from 1.1.1 → 1.1.2 and refreshes uv.lock with the new project version. Co-authored-by: V. David Zvenyach <dave@zvenyach.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/API_REFERENCE.md(TOC,## Budgetsection for the 4 budget-account methods,get_entity_budget_flows()under Entity Sub-resources, andBUDGET_ACCOUNTS_MINIMALin the ShapeConfig table).get_entity_budget_flows()in line with the backend'sStandardResultsSetPagination: addspage/limitparams and afiscal_yearfilter, and returnsPaginatedResponse[dict[str, Any]]instead of a raw dict.Why
The budget endpoints in
tango/client.pyhad no presence in the user-facing API reference — the only way to discover them was reading the source. Separately, the backend has always paginated/api/entities/{uei}/budget-flows/; the SDK'sdict-returning shim hid pages 2+ and gave no way to filter by fiscal year.Behavior change
get_entity_budget_flows()now returnsPaginatedResponse[dict[str, Any]]. Callers that were indexingresult["results"]on the old return value should switch toresult.results(and can now useresult.next/page=to walk further pages). Captured in CHANGELOG under## [Unreleased] / ### Changed.Test plan
uv run ruff format --check tango/— cleanuv run ruff check tango/— cleanuv run mypy tango/— cleanuv run pytest tests/ -m "not integration and not production"— 300 passed (includes 3 new mock tests for get_entity_budget_flows)~ Hal