Skip to content

feat: vehicle holder_count/order_winner_count and budget data_through_period (API 5.8.0) - #80

Merged
vdavez merged 3 commits into
mainfrom
feat/vehicle-company-counts
Oct 2, 2026
Merged

vdavez merged 3 commits into
mainfrom
feat/vehicle-company-counts

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What

Adds the fields Tango API 5.8.0 introduces.

Added

  • Vehicles: holder_count and order_winner_count. holder_count is the number of distinct companies holding one of the vehicle's IDVs. order_winner_count is the number of distinct companies that have won a task order under the vehicle. Both are in VEHICLES_MINIMAL and VEHICLES_COMPREHENSIVE, the explicit vehicle schema, and the Vehicle model.
  • Budget accounts: data_through_period (separate commit). The File A period (1-12) an account-year's figures run through; below 12 the year is partial. It is in BUDGET_ACCOUNTS_MINIMAL, and list_budget_accounts() gains data_through_period, data_through_period_gte, data_through_period_lte and data_through_period_isnull filters.

Deprecated

  • Vehicles: awardee_count. It is the same value as order_winner_count, and the API removes it at its next major version. It stays in the default shapes for now and is marked deprecated in the docs and changelog.

Changed

  • Re-vendored contracts/filter_shape_contract.json at API 5.8.0, regenerated tango/shapes/generated_overlay.py, and added the new fields' types to contracts/observed_shape_types.json.

Why

Keeps the SDK's default shapes and filters in line with the API contract, so callers get the new counts without a custom shape and the conformance gates stay green.

Merge order

Merge only after Tango API 5.8.0 is deployed. The default vehicle and budget-account shapes now name fields that older API versions reject, so releasing this first would break default list_vehicles(), get_vehicle() and list_budget_accounts() calls.

Testing

  • uv run pytest tests/ -m "not integration": 470 passed, 30 skipped.
  • New unit tests: the default vehicle list and detail shapes request both new fields and the response parses them; the data_through_period filters (including __isnull as true/false) reach the request and the field parses.
  • ruff format --check, ruff check and mypy clean on tango/ and the touched test file.
  • check_filter_shape_conformance.py and check_shape_coverage.py pass with no new baseline entries.
  • Known red: five vehicle cassette tests in tests/integration/test_vehicles_idvs_integration.py fail replay because the default shape in the request changed. Their cassettes need re-recording against the live API once 5.8.0 is deployed; they are deliberately not re-recorded here.

🤖 Generated with Claude Code

vdavez and others added 3 commits October 2, 2026 17:11
…ardee_count

Tango API 5.8.0 adds two company counts to vehicles: `holder_count` (distinct companies holding one of the vehicle's IDVs) and `order_winner_count` (distinct companies that have won a task order under it).
Both join the default `VEHICLES_MINIMAL` and `VEHICLES_COMPREHENSIVE` shapes and the explicit vehicle schema.
`awardee_count` is documented as deprecated, since it is the same value as `order_winner_count`.

Re-vendors the 5.8.0 contract and regenerates the shape overlay; the contract's new budget-account `data_through_period` filters are baselined until the SDK adds them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tango API 5.8.0 adds `data_through_period` to budget accounts: the File A period (1-12) an account-year's figures run through.
It joins the default `BUDGET_ACCOUNTS_MINIMAL` shape and the generated budget-account schema (typed `int`), and `list_budget_accounts()` gains `data_through_period`, `data_through_period_gte`, `data_through_period_lte` and `data_through_period_isnull` filters.
The conformance baseline entries for those filters are removed now that the SDK exposes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default vehicle shapes now request holder_count and order_winner_count, so the recorded request URLs changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez marked this pull request as ready for review October 2, 2026 23:15
@vdavez
vdavez merged commit 7531f40 into main Oct 2, 2026
11 checks passed
@makegov-mark makegov-mark Bot mentioned this pull request Oct 2, 2026
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