Skip to content

feat(opportunities): award fields and the awarded / awardee_uei filters - #74

Merged
vdavez merged 2 commits into
mainfrom
feat/opportunity-award-fields
Sep 30, 2026
Merged

vdavez merged 2 commits into
mainfrom
feat/opportunity-award-fields

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

What

Supports the opportunity and notice award fields added in Tango API 5.5.0.

  • list_opportunities() gains two filters: awarded (bool) and awardee_uei (case-insensitive; OR several with |). Both search every opportunity rather than only active ones, so combine with active=True to narrow to open opportunities.
  • The opportunity shape schema accepts awarded, award_date, award_amount, awardee, awardee_uei, award_count, solicitation_opportunity_id and an awards(...) expand (opportunity_id, notice_id, award_number, award_date, award_amount, awardee, awardee_uei). The same fields are accepted under list_vehicles(shape="opportunity(...)").
  • The notice shape schema accepts award_date, award_amount, awardee and awardee_uei.
  • Opportunity and Notice schema dataclasses gain the matching fields, and docs/API_REFERENCE.md gets a short section with an example.
  • The vendored API contract is refreshed to 5.5.0, and tango/shapes/generated_overlay.py is regenerated from it. Types for the new paths are recorded in contracts/observed_shape_types.json so the generator resolves awarded as bool, award_amount as str, and awards as a list.

Caveats worth knowing

  • The award leaves are filled only where SAM.gov posted an award notice; elsewhere they are null. award_amount is the text SAM.gov published, not a number.
  • An award posted as its own opportunity is linked to its solicitation only when SAM.gov's award notice references that solicitation. awards(...) lists up to ten of the most recent linked awards; award_count is the full count.
  • None of the new fields is in the SDK's default shapes (OPPORTUNITIES_MINIMAL / NOTICES_MINIMAL are unchanged), so callers name them in shape.

Testing

  • uv run ruff format --check tango/, uv run ruff check tango/, uv run mypy tango/: clean.
  • uv run python scripts/check_filter_shape_conformance.py: no errors.
  • uv run python scripts/check_shape_coverage.py: no new drift.
  • uv run pytest: 581 passed, 31 skipped. New tests/test_opportunity_awards.py covers shape validation for the new fields, response parsing on get_opportunity / list_notices, and that the two filters reach the request.

🤖 Generated with Claude Code

Tango API 5.5.0 adds award information to opportunities and notices.
`list_opportunities()` gains `awarded` and `awardee_uei` filters, and the opportunity shape schema accepts `awarded`, `award_date`, `award_amount`, `awardee`, `awardee_uei`, `award_count`, `solicitation_opportunity_id` and the `awards(...)` expand.
The notice shape schema accepts the four award leaves.
The vendored API contract is refreshed to 5.5.0 and the shape overlay regenerated from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez marked this pull request as ready for review September 30, 2026 01:49
… list_opportunities

Inserting `awarded` / `awardee_uei` alphabetically shifted every later positional argument, so an existing positional call would have sent its date as `awarded`.
They now come after the existing parameters, behind `*`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez merged commit 56102d6 into main Sep 30, 2026
11 checks passed
@makegov-mark makegov-mark Bot mentioned this pull request Sep 30, 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