feat(budget): account_category and source_anomalies on budget accounts - #76
Merged
Merged
Conversation
Supports the Tango API 5.7.0 budget-account contract: `account_category` and `source_anomalies` in the default `BUDGET_ACCOUNTS_MINIMAL` shape and the shape overlay, typed `BudgetAccountSourceAnomaly` / `BudgetAccountAnomalySource` / `BudgetAccountAnomalySourceRow` TypedDicts, and the `account_category` / `account_category_in` filters on `list_budget_accounts()`. Re-vendors the API contract at 5.7.0, regenerates the shape overlay, and documents the default ordering (accounts without `enacted_ba` last). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vdavez
force-pushed
the
feat/budget-account-anomalies-category
branch
from
October 2, 2026 18:50
f788533 to
ed570dc
Compare
vdavez
marked this pull request as ready for review
October 2, 2026 18:50
Merged
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.
What
Supports the Tango API 5.7.0 and 5.8.0 budget-account changes:
account_category,source_anomalies, anddata_through_period(the File A fiscal period, 1–12, an account-year's figures run through; null with no File A data) with itsdata_through_period/_gte/_lte/_isnullfilters.account_categoryandsource_anomaliesare added toBUDGET_ACCOUNTS_MINIMAL, so they appear in the default shape just as they do in the API's default shape. Both are also accepted in custom shapes through the regenerated shape overlay.BudgetAccountSourceAnomaly,BudgetAccountAnomalySourceandBudgetAccountAnomalySourceRowTypedDicts type the anomaly objects. They are exported fromtango, every key is optional, andBudgetAccount.source_anomaliesis typed as a list of them.list_budget_accounts()gains two filters:account_category, which sendsaccount_category, andaccount_category_in, which sendsaccount_category__inas a comma-separated list.orderingdocstring now documents the API's default ordering, which puts accounts with noenacted_balast.contracts/filter_shape_contract.jsonis refreshed to 5.7.0.contracts/observed_shape_types.jsonrecordssource_anomaliesas a list of objects, andtango/shapes/generated_overlay.pyis regenerated from both.docs/API_REFERENCE.mdandCHANGELOG.md(Unreleased) are updated.account_categoryand an anomaly'scodeandactionare documented as open strings.Testing
uv run pytest: 586 passed, 31 skipped. This includes new unit tests for the filter params, for default-shape parsing ofsource_anomalies/account_category(including the[]case), and for an explicit shape onget_budget_account().ruff format --check tango/,ruff check tango/andmypy tango/are all clean.check_filter_shape_conformance.pyreports 0 errors.check_shape_coverage.pyreports 0 new gaps.🤖 Generated with Claude Code