Skip to content

docs(budget): document budget surface; paginate get_entity_budget_flows#41

Merged
vdavez merged 1 commit into
mainfrom
docs/budget-surface-and-entity-budget-flows-pagination
Jun 4, 2026
Merged

docs(budget): document budget surface; paginate get_entity_budget_flows#41
vdavez merged 1 commit into
mainfrom
docs/budget-surface-and-entity-budget-flows-pagination

Conversation

@makegov-mark
Copy link
Copy Markdown
Contributor

@makegov-mark makegov-mark Bot commented Jun 4, 2026

Summary

  • Documents the budget surface that shipped in v1.1.0 but was missing from docs/API_REFERENCE.md (TOC, ## Budget section for the 4 budget-account methods, get_entity_budget_flows() under Entity Sub-resources, and BUDGET_ACCOUNTS_MINIMAL in the ShapeConfig table).
  • Brings get_entity_budget_flows() in line with the backend's StandardResultsSetPagination: adds page / limit params and a fiscal_year filter, and returns PaginatedResponse[dict[str, Any]] instead of a raw dict.
  • Adds mock unit tests + a cassette-backed integration test for the new signature.

Why

The budget endpoints in tango/client.py had 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's dict-returning shim hid pages 2+ and gave no way to filter by fiscal year.

Behavior change

get_entity_budget_flows() now returns PaginatedResponse[dict[str, Any]]. Callers that were indexing result["results"] on the old return value should switch to result.results (and can now use result.next / page= to walk further pages). Captured in CHANGELOG under ## [Unreleased] / ### Changed.

Test plan

  • uv run ruff format --check tango/ — clean
  • uv run ruff check tango/ — clean
  • uv run mypy tango/ — clean
  • uv run pytest tests/ -m "not integration and not production" — 300 passed (includes 3 new mock tests for get_entity_budget_flows)
  • Integration test cassette replays cleanly in CI

~ Hal

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 vdavez merged commit 7e46095 into main Jun 4, 2026
12 checks passed
@makegov-mark makegov-mark Bot mentioned this pull request Jun 4, 2026
6 tasks
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>
@vdavez vdavez deleted the docs/budget-surface-and-entity-budget-flows-pagination branch June 4, 2026 22:10
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