From 329a50f82f6b814f3f9ac92d95e0417299abdf0c Mon Sep 17 00:00:00 2001 From: "V. David Zvenyach" Date: Thu, 28 May 2026 06:42:33 -0500 Subject: [PATCH 1/5] feat: sync to Tango API v4.6.9 (budget surface, singleton GETs, bug fixes) Phase 1 (bug fixes): - Contract model: drop dead fields (id, award_id, recipient_name, award_amount, awarding_agency, funding_agency); add real ContractListSerializer fields. Old fields kept Optional/None + deprecation note, to be removed in 2.0.0. - list_contracts: stop sending page=1 to the cursor-only /api/contracts/. - add list_otidv_awards (parity with Node). Phase 2 (additive): - budget accounts surface: list_budget_accounts, get_budget_account, get_budget_account_quarters, get_budget_account_recipients (+ BudgetAccount model + shape schema). - singleton detail GETs: get_contract, get_contract_subawards, get_contract_transactions, get_forecast, get_grant, get_notice, get_opportunity, get_subaward. - get_entity_budget_flows(uei). - grant_id filter on list_grants. Phase 3 (CI): - re-enable lint.yml as a PR gate; conformance split into a non-blocking job. Version bump to 1.1.0. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/lint.yml | 62 ++- CHANGELOG.md | 33 ++ pyproject.toml | 2 +- scripts/check_filter_shape_conformance.py | 3 + tango/__init__.py | 4 +- tango/client.py | 445 +++++++++++++++++++++- tango/models.py | 159 +++++++- tango/shapes/explicit_schemas.py | 12 +- uv.lock | 2 +- 9 files changed, 676 insertions(+), 46 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c48cbfa..ca84965 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,18 +1,53 @@ name: Linting -# Disabled: requires checkout of private makegov/tango repo for filter_shape conformance check. -# Re-enable when that repo is accessible (e.g. add TANGO_API_REPO_ACCESS_TOKEN secret). +# Lint gate (ruff format + ruff check + mypy) runs on every PR and push to main. +# +# The SDK filter/shape conformance check needs the canonical manifest from the +# private makegov/tango repo. That checkout requires a token the public CI does +# not have, so the conformance step is kept separate and non-blocking +# (continue-on-error) until a TANGO_API_REPO_ACCESS_TOKEN secret is wired up. +# The lint gate below is fully self-contained and blocks the PR on failure. on: workflow_dispatch: - # push: - # branches: [ main, develop ] - # pull_request: - # branches: [ main, develop ] + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: lint: runs-on: ubuntu-latest - + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + + - name: Set up Python + run: uv python install 3.12 + + - name: Install dependencies + run: uv sync --all-extras + + - name: Check formatting with ruff + run: uv run ruff format --check tango/ + + - name: Lint with ruff + run: uv run ruff check tango/ + + - name: Type check with mypy + run: uv run mypy tango/ + + conformance: + # Non-blocking: requires checkout of the private makegov/tango repo for the + # canonical filter_shape manifest. Wire a TANGO_API_REPO_ACCESS_TOKEN secret + # and flip continue-on-error to make this a hard gate. + runs-on: ubuntu-latest + continue-on-error: true + steps: - uses: actions/checkout@v4 @@ -21,23 +56,18 @@ jobs: with: repository: makegov/tango path: tango-api - + token: ${{ secrets.TANGO_API_REPO_ACCESS_TOKEN }} + - name: Install uv uses: astral-sh/setup-uv@v4 with: version: "latest" - + - name: Set up Python run: uv python install 3.12 - + - name: Install dependencies run: uv sync --all-extras - - - name: Check formatting with ruff - run: uv run ruff format --check tango/ - - - name: Lint with ruff - run: uv run ruff check tango/ - name: Check SDK filter/shape conformance run: uv run python scripts/check_filter_shape_conformance.py --manifest tango-api/contracts/filter_shape_contract.json diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f6e34..a177771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- `Contract` model: removed dead fields (`id`, `award_id`, `recipient_name`, + `award_amount`, `awarding_agency`, `funding_agency`) and added the real API + fields (`key`, `piid`, `obligated`, `total_contract_value`, + `base_and_exercised_options_value`, `awarding_office`, `funding_office`, + `naics_code`, `psc_code`, `set_aside`, `solicitation_identifier`, + `parent_award`, `legislative_mandates`, `subawards_summary`, + `place_of_performance`). The deprecated fields remain declared with `None` + defaults for one minor cycle (they never returned data) and will be removed + in `2.0.0`. New `OrganizationOfficePayload` dataclass for the office fields. + (`Contract` is a documentation-only dataclass — not instantiated or exported + — so there is no runtime impact.) +- `list_contracts`: no longer sends `page=1` to the cursor-only `/api/contracts/` + endpoint. When no cursor is supplied, neither `page` nor `cursor` is sent and + the API returns the first page by default. + +### Added +- Budget accounts surface (tango v4.6.8): `list_budget_accounts`, + `get_budget_account`, `get_budget_account_quarters`, + `get_budget_account_recipients`. New `BudgetAccount` dataclass exported from + the top-level package, plus `ShapeConfig.BUDGET_ACCOUNTS_MINIMAL`. +- Singleton detail GETs: `get_contract`, `get_contract_subawards`, + `get_contract_transactions`, `get_forecast`, `get_grant`, `get_notice`, + `get_opportunity`, `get_subaward`. +- `get_entity_budget_flows(uei)` for `/api/entities/{uei}/budget-flows/`. +- `list_otidv_awards(key)` for `/api/otidvs/{key}/awards/` (parity with Node). +- `grant_id` filter kwarg on `list_grants` (supports multi-value OR via `|`). + +### CI +- Re-enabled `lint.yml` as a PR + push-to-main gate (ruff format, ruff check, + mypy). The filter/shape conformance check is split into a separate + non-blocking job pending a token for the private manifest repo. + ## [1.0.0] - 2026-05-13 > First stable release. `tango-python` is now at full API parity with the diff --git a/pyproject.toml b/pyproject.toml index ece8faf..4f1aa55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "tango-python" -version = "1.0.0" +version = "1.1.0" description = "Python SDK for the Tango API" readme = "README.md" requires-python = ">=3.12" diff --git a/scripts/check_filter_shape_conformance.py b/scripts/check_filter_shape_conformance.py index 298f2cd..1fea1be 100644 --- a/scripts/check_filter_shape_conformance.py +++ b/scripts/check_filter_shape_conformance.py @@ -51,6 +51,7 @@ "naics": "list_naics", "gsa_elibrary_contracts": "list_gsa_elibrary_contracts", "itdashboard": "list_itdashboard_investments", + "budget_accounts": "list_budget_accounts", # Resources not yet implemented in SDK "offices": None, } @@ -62,6 +63,7 @@ def get_shape_config_entries() -> list[tuple[str, str, type[Any]]]: IDV, OTA, OTIDV, + BudgetAccount, Contract, Entity, Forecast, @@ -110,6 +112,7 @@ def get_shape_config_entries() -> list[tuple[str, str, type[Any]]]: ShapeConfig.ITDASHBOARD_INVESTMENTS_COMPREHENSIVE, ITDashboardInvestment, ), + ("BUDGET_ACCOUNTS_MINIMAL", ShapeConfig.BUDGET_ACCOUNTS_MINIMAL, BudgetAccount), ] for name, shape_str, model_cls in configs: entries.append((name, shape_str, model_cls)) diff --git a/tango/__init__.py b/tango/__init__.py index 9c25b42..08980ab 100644 --- a/tango/__init__.py +++ b/tango/__init__.py @@ -9,6 +9,7 @@ TangoValidationError, ) from .models import ( + BudgetAccount, GsaElibraryContract, ITDashboardInvestment, PaginatedResponse, @@ -43,7 +44,7 @@ ) from .webhooks.receiver import Delivery, WebhookReceiver -__version__ = "1.0.0" +__version__ = "1.1.0" __all__ = [ "TangoClient", "TangoAPIError", @@ -54,6 +55,7 @@ "RateLimitInfo", "ResolveCandidate", "ResolveResult", + "BudgetAccount", "GsaElibraryContract", "ITDashboardInvestment", "PaginatedResponse", diff --git a/tango/client.py b/tango/client.py index a4d98e4..710a7b0 100644 --- a/tango/client.py +++ b/tango/client.py @@ -21,6 +21,7 @@ OTA, OTIDV, Agency, + BudgetAccount, BusinessType, Contract, Entity, @@ -220,9 +221,7 @@ def _post( picking one — that ambiguity would hide caller bugs. """ if json_data is not None and json is not None: - raise TangoValidationError( - "_post: pass `json_data` or `json`, not both." - ) + raise TangoValidationError("_post: pass `json_data` or `json`, not both.") body = json_data if json_data is not None else json if body is None: body = {} @@ -243,9 +242,7 @@ def _patch( picking one — that ambiguity would hide caller bugs. """ if json_data is not None and json is not None: - raise TangoValidationError( - "_patch: pass `json_data` or `json`, not both." - ) + raise TangoValidationError("_patch: pass `json_data` or `json`, not both.") body = json_data if json_data is not None else json if body is None: body = {} @@ -673,8 +670,9 @@ def list_contracts( params: dict[str, Any] = {"limit": min(limit, 100)} if cursor: params["cursor"] = cursor - else: - params["page"] = 1 + # /api/contracts/ is cursor-only (KeysetPagination). When no cursor is + # supplied, send neither page nor cursor — the API returns the first + # page by default. (Previously sent page=1, which the endpoint ignores.) # Handle legacy filters parameter (backward compatibility) filter_dict: dict[str, Any] = {} @@ -772,6 +770,89 @@ def list_contracts( cursor=data.get("cursor"), ) + def get_contract( + self, + key: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single contract by key (`/api/contracts/{key}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.CONTRACTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/contracts/{key}/", params) + return self._parse_response_with_shape( + data, shape, Contract, flat, flat_lists, joiner=joiner + ) + + def get_contract_subawards( + self, + key: str, + page: int = 1, + limit: int = 25, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + ordering: str | None = None, + ) -> PaginatedResponse: + """List subawards under a contract (`/api/contracts/{key}/subawards/`).""" + params: dict[str, Any] = {"page": page, "limit": min(limit, 100)} + if shape is None: + shape = ShapeConfig.SUBAWARDS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if flat_lists: + params["flat_lists"] = "true" + if ordering: + params["ordering"] = ordering + data = self._get(f"/api/contracts/{key}/subawards/", params) + raw_results = data.get("results") or [] + results = [ + self._parse_response_with_shape(obj, shape, Subaward, flat, flat_lists) + for obj in raw_results + ] + return PaginatedResponse( + count=int(data.get("count") or len(results)), + next=data.get("next"), + previous=data.get("previous"), + results=results, + cursor=data.get("cursor"), + ) + + def get_contract_transactions( + self, + key: str, + limit: int = 100, + cursor: str | None = None, + ordering: str | None = None, + ) -> PaginatedResponse: + """List transactions under a contract (`/api/contracts/{key}/transactions/`).""" + params: dict[str, Any] = {"limit": min(limit, 500)} + if cursor: + params["cursor"] = cursor + if ordering: + params["ordering"] = ordering + data = self._get(f"/api/contracts/{key}/transactions/", params) + return PaginatedResponse( + count=int(data.get("count") or len(data.get("results") or [])), + next=data.get("next"), + previous=data.get("previous"), + results=data.get("results") or [], + cursor=data.get("cursor"), + ) + # ============================================================================ # IDVs (Awards) # ============================================================================ @@ -1246,6 +1327,59 @@ def get_otidv( data = self._get(f"/api/otidvs/{key}/", params) return self._parse_response_with_shape(data, shape, OTIDV, flat, flat_lists, joiner=joiner) + def list_otidv_awards( + self, + key: str, + limit: int = 25, + cursor: str | None = None, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ordering: str | None = None, + ) -> PaginatedResponse: + """List child awards under an OTIDV (`/api/otidvs/{key}/awards/`). + + Args: + key: The OTIDV key. + limit: Results per page (max 100). + cursor: Cursor token for keyset pagination. + shape: Response shape string (defaults to minimal contract shape). + flat: If True, flatten nested objects using dot notation. + flat_lists: If True, flatten arrays using indexed keys. + joiner: Separator used when flattening. + ordering: Server-side sort (prefix with '-' for descending). + """ + params: dict[str, Any] = {"limit": min(limit, 100)} + if cursor: + params["cursor"] = cursor + if shape is None: + shape = ShapeConfig.CONTRACTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + if ordering: + params["ordering"] = ordering + data = self._get(f"/api/otidvs/{key}/awards/", params) + raw_results = data.get("results") or [] + results = [ + self._parse_response_with_shape(obj, shape, Contract, flat, flat_lists, joiner=joiner) + for obj in raw_results + ] + return PaginatedResponse( + count=int(data.get("count") or len(results)), + next=data.get("next"), + previous=data.get("previous"), + results=results, + cursor=data.get("cursor"), + page_metadata=data.get("page_metadata"), + ) + def list_subawards( self, page: int = 1, @@ -1300,6 +1434,31 @@ def list_subawards( results=results, ) + def get_subaward( + self, + key: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single subaward by key (`/api/subawards/{key}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.SUBAWARDS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/subawards/{key}/", params) + return self._parse_response_with_shape( + data, shape, Subaward, flat, flat_lists, joiner=joiner + ) + # ============================================================================ # GSA eLibrary Contracts # ============================================================================ @@ -1922,6 +2081,12 @@ def get_entity( data = self._get(f"/api/entities/{key}/", params) return self._parse_response_with_shape(data, shape, Entity, flat, flat_lists) + def get_entity_budget_flows(self, uei: str) -> dict[str, Any]: + """Get budget flows for an entity (`/api/entities/{uei}/budget-flows/`).""" + if not uei: + raise TangoValidationError("UEI is required") + return self._get(f"/api/entities/{uei}/budget-flows/") + # Forecast endpoints def list_forecasts( self, @@ -2014,6 +2179,31 @@ def list_forecasts( results=results, ) + def get_forecast( + self, + id: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single forecast by id (`/api/forecasts/{id}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.FORECASTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/forecasts/{id}/", params) + return self._parse_response_with_shape( + data, shape, Forecast, flat, flat_lists, joiner=joiner + ) + # Opportunity endpoints def list_opportunities( self, @@ -2112,6 +2302,31 @@ def list_opportunities( results=results, ) + def get_opportunity( + self, + opportunity_id: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single opportunity by id (`/api/opportunities/{opportunity_id}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.OPPORTUNITIES_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/opportunities/{opportunity_id}/", params) + return self._parse_response_with_shape( + data, shape, Opportunity, flat, flat_lists, joiner=joiner + ) + # Notice endpoints def list_notices( self, @@ -2201,6 +2416,29 @@ def list_notices( results=results, ) + def get_notice( + self, + notice_id: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single notice by id (`/api/notices/{notice_id}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.NOTICES_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/notices/{notice_id}/", params) + return self._parse_response_with_shape(data, shape, Notice, flat, flat_lists, joiner=joiner) + # Protest endpoints # See https://tango.makegov.com/docs/api-reference/protests.md # Note: Protests API does not support ordering (returns 400 if provided). @@ -2328,6 +2566,170 @@ def get_protest( data = self._get(f"/api/protests/{case_id}/", params) return self._parse_response_with_shape(data, shape, Protest, flat, flat_lists) + # ============================================================================ + # Budget (federal account x fiscal year rollups) + # ============================================================================ + + def list_budget_accounts( + self, + page: int = 1, + limit: int = 25, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + federal_account_symbol: str | None = None, + fiscal_year: int | None = None, + fiscal_year_gte: int | None = None, + fiscal_year_lte: int | None = None, + agency_code: str | None = None, + bureau_name: str | None = None, + account_title: str | None = None, + bea_category: str | None = None, + on_off_budget: str | None = None, + subfunction_code: str | None = None, + search: str | None = None, + ordering: str | None = None, + ) -> PaginatedResponse: + """List budget accounts (`/api/budget/accounts/`). + + One row per ``(federal_account_symbol, fiscal_year)`` covering the full + budget lifecycle, pre-computed ratios + trends, the + contract/assistance/unlinked breakdown, and request-vs-actual spend. + + Args: + page: Page number. + limit: Results per page (max 100). + shape: Response shape string (defaults to minimal shape). + flat: If True, flatten nested objects using dot notation. + flat_lists: If True, flatten arrays using indexed keys. + federal_account_symbol: Exact federal account symbol. + fiscal_year: Fiscal year (exact). + fiscal_year_gte: Fiscal year >=. + fiscal_year_lte: Fiscal year <=. + agency_code: Agency code (exact). + bureau_name: Bureau name (exact). + account_title: Account title (icontains). + bea_category: BEA category (exact). + on_off_budget: On/off budget flag (exact). + subfunction_code: Subfunction code (exact). + search: Full-text search over account_title/agency_name/bureau_name. + ordering: Sort field (prefix with '-' for descending). + """ + params: dict[str, Any] = {"page": page, "limit": min(limit, 100)} + if shape is None: + shape = ShapeConfig.BUDGET_ACCOUNTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if flat_lists: + params["flat_lists"] = "true" + for key, val in ( + ("federal_account_symbol", federal_account_symbol), + ("fiscal_year", fiscal_year), + ("fiscal_year__gte", fiscal_year_gte), + ("fiscal_year__lte", fiscal_year_lte), + ("agency_code", agency_code), + ("bureau_name", bureau_name), + ("account_title__icontains", account_title), + ("bea_category", bea_category), + ("on_off_budget", on_off_budget), + ("subfunction_code", subfunction_code), + ("search", search), + ("ordering", ordering), + ): + if val is not None: + params[key] = val + data = self._get("/api/budget/accounts/", params) + results = [ + self._parse_response_with_shape(obj, shape, BudgetAccount, flat, flat_lists) + for obj in data.get("results", []) + ] + return PaginatedResponse( + count=data.get("count", 0), + next=data.get("next"), + previous=data.get("previous"), + results=results, + ) + + def get_budget_account( + self, + id: str | int, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single budget account by id (`/api/budget/accounts/{id}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.BUDGET_ACCOUNTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/budget/accounts/{id}/", params) + return self._parse_response_with_shape( + data, shape, BudgetAccount, flat, flat_lists, joiner=joiner + ) + + def get_budget_account_quarters( + self, + id: str | int, + tas: str | None = None, + limit: int = 25, + ) -> PaginatedResponse: + """Get quarterly TAS-grain flow for a budget account. + + (`/api/budget/accounts/{id}/quarters/`). FY21+ only. + + Args: + id: Budget account id. + tas: Narrow to a single Treasury Account Symbol. + limit: Results per page (max 100). + """ + params: dict[str, Any] = {"limit": min(limit, 100)} + if tas: + params["tas"] = tas + data = self._get(f"/api/budget/accounts/{id}/quarters/", params) + return PaginatedResponse( + count=int(data.get("count") or len(data.get("results") or [])), + next=data.get("next"), + previous=data.get("previous"), + results=data.get("results") or [], + ) + + def get_budget_account_recipients( + self, + id: str | int, + funding_organization_id: str | None = None, + limit: int = 25, + ) -> PaginatedResponse: + """Get funding-office x recipient contract-flow detail for a budget account. + + (`/api/budget/accounts/{id}/recipients/`). + + Args: + id: Budget account id. + funding_organization_id: Narrow to a single funding office + (Organization UUID). + limit: Results per page (max 100). + """ + params: dict[str, Any] = {"limit": min(limit, 100)} + if funding_organization_id: + params["funding_organization_id"] = funding_organization_id + data = self._get(f"/api/budget/accounts/{id}/recipients/", params) + return PaginatedResponse( + count=int(data.get("count") or len(data.get("results") or [])), + next=data.get("next"), + previous=data.get("previous"), + results=data.get("results") or [], + ) + # Grant endpoints def list_grants( self, @@ -2341,6 +2743,7 @@ def list_grants( cfda_number: str | None = None, funding_categories: str | None = None, funding_instruments: str | None = None, + grant_id: str | None = None, opportunity_number: str | None = None, ordering: str | None = None, posted_date_after: str | None = None, @@ -2364,6 +2767,8 @@ def list_grants( cfda_number: CFDA number filter funding_categories: Funding categories filter funding_instruments: Funding instruments filter + grant_id: Filter by grant ID (matches the detail-endpoint + identifier). Supports multi-value OR via '|' (e.g. "123|456"). opportunity_number: Opportunity number filter ordering: Sort field (prefix with '-' for descending) posted_date_after: Posted date after @@ -2390,6 +2795,7 @@ def list_grants( ("cfda_number", cfda_number), ("funding_categories", funding_categories), ("funding_instruments", funding_instruments), + ("grant_id", grant_id), ("opportunity_number", opportunity_number), ("ordering", ordering), ("posted_date_after", posted_date_after), @@ -2417,6 +2823,29 @@ def list_grants( results=results, ) + def get_grant( + self, + grant_id: str, + shape: str | None = None, + flat: bool = False, + flat_lists: bool = False, + joiner: str = ".", + ) -> Any: + """Get a single grant by its grant id (`/api/grants/{grant_id}/`).""" + params: dict[str, Any] = {} + if shape is None: + shape = ShapeConfig.GRANTS_MINIMAL + if shape: + params["shape"] = shape + if flat: + params["flat"] = "true" + if joiner: + params["joiner"] = joiner + if flat_lists: + params["flat_lists"] = "true" + data = self._get(f"/api/grants/{grant_id}/", params) + return self._parse_response_with_shape(data, shape, Grant, flat, flat_lists, joiner=joiner) + # ============================================================================ # Webhooks (v2) # ============================================================================ diff --git a/tango/models.py b/tango/models.py index 54a2207..a40fcb0 100644 --- a/tango/models.py +++ b/tango/models.py @@ -281,21 +281,66 @@ class AwardTransaction: obligated: Decimal | None = None +@dataclass +class OrganizationOfficePayload: + """Schema definition for OrganizationOfficePayload (not used for instances). + + Returned for a contract's ``awarding_office`` / ``funding_office``. + """ + + organization_id: str | None = None + office_code: str | None = None + office_name: str | None = None + agency_code: str | None = None + agency_name: str | None = None + department_code: int | None = None + department_name: str | None = None + + @dataclass class Contract: - """Schema definition for Contract (not used for instances)""" + """Schema definition for Contract (not used for instances). - id: str - award_id: str - recipient_name: str - description: str - award_amount: Decimal | None = None + Mirrors the API ``ContractList`` schema (``ContractListSerializer``). + ``/api/contracts/`` is shape-on-demand: which fields appear in a response + depends on the ``?shape=`` query param, so every field is optional. + """ + + key: str | None = None + piid: str | None = None award_date: date | None = None fiscal_year: int | None = None + obligated: Decimal | None = None + base_and_exercised_options_value: Decimal | None = None + total_contract_value: Decimal | None = None + naics_code: int | None = None + psc_code: str | None = None + set_aside: str | None = None + solicitation_identifier: str | None = None + description: str | None = None + awarding_office: OrganizationOfficePayload | None = None + funding_office: OrganizationOfficePayload | None = None recipient: RecipientProfile | None = None + parent_award: ParentAward | None = None + legislative_mandates: LegislativeMandates | None = None + place_of_performance: PlaceOfPerformance | None = None + subawards_summary: SubawardsSummary | None = None + + # --- Deprecated fields (never returned by the API; removed in 2.0.0) --- + # Declared with None defaults so existing consumers reading these do not + # raise AttributeError; they always resolve to None. + id: str | None = None + """.. deprecated:: Never returned by the API. Removed in 2.0.0.""" + award_id: str | None = None + """.. deprecated:: Never returned by the API. Removed in 2.0.0.""" + recipient_name: str | None = None + """.. deprecated:: Use ``recipient.display_name``. Removed in 2.0.0.""" + award_amount: Decimal | None = None + """.. deprecated:: Use ``obligated`` / ``total_contract_value``. Removed in 2.0.0.""" awarding_agency: Agency | None = None + """.. deprecated:: Use ``awarding_office``. Removed in 2.0.0.""" funding_agency: Agency | None = None - place_of_performance: Location | None = None + """.. deprecated:: Use ``funding_office``. Removed in 2.0.0.""" @dataclass @@ -626,9 +671,7 @@ class WebhookSamplePayloadAllResponse(TypedDict): note: str -WebhookSamplePayloadResponse = ( - WebhookSamplePayloadSingleResponse | WebhookSamplePayloadAllResponse -) +WebhookSamplePayloadResponse = WebhookSamplePayloadSingleResponse | WebhookSamplePayloadAllResponse @dataclass @@ -713,6 +756,90 @@ class ValidateResult: errors: list[str] | None = None +@dataclass +class BudgetAccount: + """Schema definition for BudgetAccount (not used for instances). + + Federal account x fiscal year budget rollup. ``/api/budget/accounts/`` is + shape-on-demand: which fields appear depends on the ``?shape=`` query param, + so every field is optional. Mirrors the API ``BudgetAccount`` schema. + """ + + id: int | None = None + federal_account_symbol: str | None = None + fiscal_year: int | None = None + agency_code: str | None = None + agency_name: str | None = None + bureau_name: str | None = None + account_title: str | None = None + bea_category: str | None = None + on_off_budget: str | None = None + subfunction_code: str | None = None + # Lifecycle + requested_ba: Decimal | None = None + enacted_ba: Decimal | None = None + apportioned: Decimal | None = None + obligated_total: Decimal | None = None + outlayed_total: Decimal | None = None + unobligated_balance: Decimal | None = None + # Contract / assistance / unlinked breakdown + contract_obligated: Decimal | None = None + contract_outlayed: Decimal | None = None + n_contracts: int | None = None + n_unique_contract_recipients: int | None = None + assistance_obligated: Decimal | None = None + assistance_outlayed: Decimal | None = None + n_grants: int | None = None + n_unique_grant_recipients: int | None = None + unlinked_obligated: Decimal | None = None + contract_share_of_obligated: Decimal | None = None + contract_share_of_obligated_capped: Decimal | None = None + contract_share_capped_flag: bool | None = None + assistance_share_of_obligated: Decimal | None = None + assistance_share_of_obligated_capped: Decimal | None = None + assistance_share_capped_flag: bool | None = None + # Forward-look + next_year_requested_ba: Decimal | None = None + ba_growth_next_year: Decimal | None = None + ba_growth_next_year_pct: Decimal | None = None + # Ratios + enacted_to_requested_pct: Decimal | None = None + enacted_to_requested_pct_capped: Decimal | None = None + enacted_to_requested_pct_capped_flag: bool | None = None + apportioned_to_enacted_pct: Decimal | None = None + apportioned_to_enacted_pct_capped: Decimal | None = None + apportioned_to_enacted_pct_capped_flag: bool | None = None + obligated_to_apportioned_pct: Decimal | None = None + obligated_to_apportioned_pct_capped: Decimal | None = None + obligated_to_apportioned_pct_capped_flag: bool | None = None + obligated_to_enacted_pct: Decimal | None = None + obligated_to_enacted_pct_capped: Decimal | None = None + obligated_to_enacted_pct_capped_flag: bool | None = None + outlayed_to_obligated_pct: Decimal | None = None + outlayed_to_obligated_pct_capped: Decimal | None = None + outlayed_to_obligated_pct_capped_flag: bool | None = None + unobligated_pct: Decimal | None = None + # Trends + enacted_ba_yoy_pct: Decimal | None = None + obligated_yoy_pct: Decimal | None = None + contract_obligated_yoy_pct: Decimal | None = None + enacted_ba_5yr_cagr: Decimal | None = None + contract_obligated_5yr_cagr: Decimal | None = None + # Request-vs-actual + requested_contractual_services: Decimal | None = None + requested_personnel_share: Decimal | None = None + actual_vs_requested_contract: Decimal | None = None + actual_vs_requested_contract_capped: Decimal | None = None + actual_vs_requested_contract_capped_flag: bool | None = None + # Provenance + narrative + appendix_pdf_url: str | None = None + account_narrative_excerpt: str | None = None + top_contract_recipients: list[Any] | None = None + top_grant_recipients: list[Any] | None = None + created: str | None = None + modified: str | None = None + + @dataclass class PaginatedResponse[T]: """Paginated API response @@ -831,6 +958,18 @@ class ShapeConfig: "key,piid,award_date,obligated,total_contract_value,description,recipient(display_name,uei)" ) + # Default for list_budget_accounts() / get_budget_account() + # Mirrors the API's BUDGET_ACCOUNT_DEFAULT_SHAPE. + BUDGET_ACCOUNTS_MINIMAL: Final = ( + "id,federal_account_symbol,fiscal_year,agency_code,agency_name,bureau_name," + "account_title,bea_category,on_off_budget,subfunction_code," + "requested_ba,enacted_ba,apportioned,obligated_total,outlayed_total," + "unobligated_balance,contract_obligated,contract_share_of_obligated_capped," + "assistance_obligated,obligated_to_apportioned_pct_capped," + "obligated_to_enacted_pct_capped,outlayed_to_obligated_pct_capped," + "ba_growth_next_year_pct" + ) + # Default for list_organizations() ORGANIZATIONS_MINIMAL: Final = "key,fh_key,name,level,type,short_name" diff --git a/tango/shapes/explicit_schemas.py b/tango/shapes/explicit_schemas.py index d821f28..9960e38 100644 --- a/tango/shapes/explicit_schemas.py +++ b/tango/shapes/explicit_schemas.py @@ -1315,12 +1315,8 @@ "recipient_dba_name": FieldSchema( name="recipient_dba_name", type=str, is_optional=True, is_list=False ), - "recipient_duns": FieldSchema( - name="recipient_duns", type=str, is_optional=True, is_list=False - ), - "recipient_name": FieldSchema( - name="recipient_name", type=str, is_optional=True, is_list=False - ), + "recipient_duns": FieldSchema(name="recipient_duns", type=str, is_optional=True, is_list=False), + "recipient_name": FieldSchema(name="recipient_name", type=str, is_optional=True, is_list=False), "recipient_parent_duns": FieldSchema( name="recipient_parent_duns", type=str, is_optional=True, is_list=False ), @@ -1330,9 +1326,7 @@ "recipient_parent_uei": FieldSchema( name="recipient_parent_uei", type=str, is_optional=True, is_list=False ), - "recipient_uei": FieldSchema( - name="recipient_uei", type=str, is_optional=True, is_list=False - ), + "recipient_uei": FieldSchema(name="recipient_uei", type=str, is_optional=True, is_list=False), # Expandable nested objects "awarding_office": FieldSchema( name="awarding_office", diff --git a/uv.lock b/uv.lock index 2a00102..82963f6 100644 --- a/uv.lock +++ b/uv.lock @@ -1843,7 +1843,7 @@ wheels = [ [[package]] name = "tango-python" -version = "1.0.0" +version = "1.1.0" source = { editable = "." } dependencies = [ { name = "httpx" }, From 0ffc5509b712d2a81b76d015379bfb8d7b5a0dbb Mon Sep 17 00:00:00 2001 From: "V. David Zvenyach" Date: Thu, 28 May 2026 07:45:23 -0500 Subject: [PATCH 2/5] test: re-record contract integration cassettes for cursor-only pagination The list_contracts page=1 removal changed the recorded request URI, so 32 contract/edge-case cassettes no longer matched. Re-recorded against live API (v4.6.9). Two expensive filter queries (awarding_agency, multi-param search) 504 at the gateway on re-record, so those two cassettes retain their prior valid 200 response with only the stale `&page=1` stripped from the request URI. Co-Authored-By: Claude Opus 4.7 (1M context) --- ...ration.test_combined_filters_work_together | 76 ++++++ ...ntegration.test_contract_cursor_pagination | 173 ++++++++++++ ...egration.test_contract_data_object_parsing | 88 ++++++ ...ractsIntegration.test_contract_field_types | 97 +++++++ ...ilter_parameter_mappings[keyword-software] | 87 ++++++ ...t_filter_parameter_mappings[psc_code-R425] | 89 ++++++ ...list_contracts_with_awarding_agency_filter | 2 +- ...test_list_contracts_with_date_range_filter | 86 ++++++ ...sIntegration.test_list_contracts_with_flat | 88 ++++++ ...test_list_contracts_with_naics_code_filter | 197 +++++++++++++ ...lay_name),total_contract_value,award_date] | 81 ++++++ ...t_list_contracts_with_shapes[default-None] | 88 ++++++ ...erforma...ce114a3c47e2037aaa3c15d00b7031bd | 103 +++++++ ...ay_name),description,total_contract_value] | 88 ++++++ ...ractsIntegration.test_new_expiring_filters | 87 ++++++ ...gration.test_new_fiscal_year_range_filters | 89 ++++++ ...ctsIntegration.test_new_identifier_filters | 76 ++++++ ...gration.test_search_contracts_with_filters | 86 ++++++ ..._search_filters_object_with_new_parameters | 2 +- ...st_sort_and_order_mapped_to_ordering[asc-] | 81 ++++++ ..._sort_and_order_mapped_to_ordering[desc--] | 88 ++++++ ...t_api_schema_stability_detection_contracts | 86 ++++++ ...gration.test_date_field_parsing_edge_cases | 137 ++++++++++ ...tion.test_decimal_field_parsing_edge_cases | 126 +++++++++ ...CasesIntegration.test_empty_list_responses | 76 ++++++ ...n.test_flattened_responses_with_flat_lists | 88 ++++++ ...t_parsing_nested_objects_with_missing_data | 258 ++++++++++++++++++ ...t_parsing_null_missing_fields_in_contracts | 126 +++++++++ ...est_parsing_with_minimal_shape_sparse_data | 86 ++++++ ...s_dict_access[custom-key,piid,description] | 83 ++++++ ...ay_name),description,total_contract_value] | 88 ++++++ ...ipient(display_name),total_contract_value] | 81 ++++++ 32 files changed, 3085 insertions(+), 2 deletions(-) diff --git a/tests/cassettes/TestContractsIntegration.test_combined_filters_work_together b/tests/cassettes/TestContractsIntegration.test_combined_filters_work_together index f7a71ba..1379142 100644 --- a/tests/cassettes/TestContractsIntegration.test_combined_filters_work_together +++ b/tests/cassettes/TestContractsIntegration.test_combined_filters_work_together @@ -73,4 +73,80 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_type=A&awarding_agency=4700&fiscal_year=2024&search=software + response: + body: + string: '{"count":0,"next":null,"previous":null,"cursor":null,"previous_cursor":null,"results":[]}' + headers: + CF-RAY: + - a02d54629de5a225-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:45 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=9ozbhoqlmHg%2FBGCO%2BU%2FuSyUMSurNyI%2BL5N416679KkuooxHkj96WLLVZa1DLlXXURTb3mKbmc40DMWitSElNhQU1IOZ5sPnw6GDNBtkupPAPdNuji3YsIaUaa2Lh7HfnD%2FkUZrYpAGy2LC36n%2Fzy"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '89' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.151s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '985' + x-ratelimit-burst-reset: + - '14' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999911' + x-ratelimit-daily-reset: + - '40754' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '985' + x-ratelimit-reset: + - '14' + x-results-counttype: + - exact + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_contract_cursor_pagination b/tests/cassettes/TestContractsIntegration.test_contract_cursor_pagination index 3c82b30..3670382 100644 --- a/tests/cassettes/TestContractsIntegration.test_contract_cursor_pagination +++ b/tests/cassettes/TestContractsIntegration.test_contract_cursor_pagination @@ -171,4 +171,177 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d54649a12511a-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:45 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=841HljoWP2Hh5y3rYLmitigLJNzUZafDczTD57vtjDLOkzmWNPhRanGHUOcpVlzNj01EamXD0%2FQxvm3z39ZDuYeXW%2BgQBvJNPsk39hE2HqbcTZa6QS%2FhkZxIJJcsvePgeEBg7qCrVuBvW07G993H"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.039s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '984' + x-ratelimit-burst-reset: + - '14' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999910' + x-ratelimit-daily-reset: + - '40754' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '984' + x-ratelimit-reset: + - '14' + x-results-counttype: + - approximate + status: + code: 200 + message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&cursor=WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value","previous":"https://tango.makegov.com/api/contracts/?limit=5&cursor=eyJ2IjogWyIyMDI2LTA1LTI2IiwgImZkMzQ5OTVkLTM4ZmItNTNmYy1hYjYxLThjYjU5MGI5ZDkyNiJdLCAiZCI6ICJwcmV2In0%3D&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value","cursor":"WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous_cursor":"eyJ2IjogWyIyMDI2LTA1LTI2IiwgImZkMzQ5OTVkLTM4ZmItNTNmYy1hYjYxLThjYjU5MGI5ZDkyNiJdLCAiZCI6ICJwcmV2In0=","results":[{"award_date":"2026-05-26","description":"TENEBALE + SOFTWARE","key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","description":"TSFB + SOFT PRESSURE WASH LOCATED IN RALEIGH, NC AT THE TERRY SANFORD FEDERAL BUILDING","key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","piid":"47PC5226F0297","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"award_date":"2026-05-26","description":"UIPATH","key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","piid":"1331L526FNB160100","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"award_date":"2026-05-26","description":"EMERGENCY + SEWER REPAIR","key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","piid":"36C24626P0712","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"award_date":"2026-05-26","description":"HBG-21171-C--G-LIHT + PROCUREMENT","key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","piid":"80NSSC26FA425","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8}]}' + headers: + CF-RAY: + - a02d54654afc511a-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:45 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=1XK8b52tTUDHkwa2VTkS0JhL6YGA1puktffJaRcOkEvnSZs6dETPuUj4ld90oQG1fA%2FJBmLoMyB%2FiF4Ktjwm1wNiHuc0kjrz9oiRyhTn6a7jdV%2B04Nug5htp9VYn9norX7hklKdVLBjj1BDC5n0Y"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1957' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.038s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '983' + x-ratelimit-burst-reset: + - '14' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999909' + x-ratelimit-daily-reset: + - '40754' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '983' + x-ratelimit-reset: + - '14' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_contract_data_object_parsing b/tests/cassettes/TestContractsIntegration.test_contract_data_object_parsing index b7719e1..767d61f 100644 --- a/tests/cassettes/TestContractsIntegration.test_contract_data_object_parsing +++ b/tests/cassettes/TestContractsIntegration.test_contract_data_object_parsing @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d534f0bb35108-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:01 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=61IKmTo6jCljNLkAHDJvbKOWuzjus7ZEJjg8pMhMCwrM8EBDsELraTacXWOlXZROvWyNv8bFqM29iQZT7ZeRADUITant%2B1BiS%2BxNOIVHtD4pKOxmGFMjF5wQfctcaSyg1oA9JmurJydHCVDU4ReF"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.040s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '988' + x-ratelimit-burst-reset: + - '36' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999920' + x-ratelimit-daily-reset: + - '40798' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '988' + x-ratelimit-reset: + - '36' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_contract_field_types b/tests/cassettes/TestContractsIntegration.test_contract_field_types index ef9674f..2cdaa92 100644 --- a/tests/cassettes/TestContractsIntegration.test_contract_field_types +++ b/tests/cassettes/TestContractsIntegration.test_contract_field_types @@ -97,4 +97,101 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Cdescription%2Ctotal_contract_value%2Crecipient%28display_name%29%2Cnaics_code%2Cpsc_code + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Cdescription%2Ctotal_contract_value%2Crecipient%28display_name%29%2Cnaics_code%2Cpsc_code&cursor=WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","naics_code":811210,"piid":"36C26126P0571","psc_code":"J065","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","naics_code":541370,"piid":"693JJ326P000012","psc_code":"C215","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","naics_code":561210,"piid":"47PE5226F0113","psc_code":"Z1AA","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","naics_code":541519,"piid":"89503026FWA401176","psc_code":"7A21","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C24126P0441","psc_code":"6515","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0},{"award_date":"2026-05-26","description":"TENEBALE + SOFTWARE","key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","naics_code":541519,"piid":"89603026F0034","psc_code":"7B22","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","description":"TSFB + SOFT PRESSURE WASH LOCATED IN RALEIGH, NC AT THE TERRY SANFORD FEDERAL BUILDING","key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","naics_code":561210,"piid":"47PC5226F0297","psc_code":"Z1AA","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"award_date":"2026-05-26","description":"UIPATH","key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","naics_code":541519,"piid":"1331L526FNB160100","psc_code":"7A21","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"award_date":"2026-05-26","description":"EMERGENCY + SEWER REPAIR","key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","naics_code":221320,"piid":"36C24626P0712","psc_code":"F103","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"award_date":"2026-05-26","description":"HBG-21171-C--G-LIHT + PROCUREMENT","key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","naics_code":541519,"piid":"80NSSC26FA425","psc_code":"7B20","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8}]}' + headers: + CF-RAY: + - a02d534d6ba54ca9-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:00 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=iEq3H%2B%2BQXFxu5BuT3mbUhqZWB%2FO9HSXEOK5sWNc4j4u6xAvJtygP0%2F8XN%2FcBMZnD5Yqla4Fw3T9AF8ymxn9E77fVeyAzeinUALfds%2Bow2z27q0lRK8uz%2FRBizU2z2BQp3J28D7h1I%2FKS9PansKFY"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '3416' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.044s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '989' + x-ratelimit-burst-reset: + - '37' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999921' + x-ratelimit-daily-reset: + - '40799' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '989' + x-ratelimit-reset: + - '37' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[keyword-software] b/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[keyword-software] index d2a1296..4c62476 100644 --- a/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[keyword-software] +++ b/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[keyword-software] @@ -91,4 +91,91 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&search=software + response: + body: + string: '{"count":333925,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&search=software&cursor=WyIyMDI2LTA1LTI2IiwgImI1NzQ3MGZkLTI0MWUtNTBiZS1hODllLWNmZGFkYmNhMzVmMiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImI1NzQ3MGZkLTI0MWUtNTBiZS1hODllLWNmZGFkYmNhMzVmMiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"TENEBALE + SOFTWARE","key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","description":"CENSITRAC + AND RELATED CENSIS SOFTWARE IDIQ","key":"CONT_AWD_36C10B26F0145_3600_36C10B26D0007_3600","piid":"36C10B26F0145","recipient":{"display_name":"CENSIS + TECHNOLOGIES, INC."},"total_contract_value":61818.8},{"award_date":"2026-05-26","description":"CENSITRAC + AND RELATED CENSIS SOFTWARE IDIQ","key":"CONT_AWD_36C10B26F0135_3600_36C10B26D0007_3600","piid":"36C10B26F0135","recipient":{"display_name":"CENSIS + TECHNOLOGIES, INC."},"total_contract_value":650552.8},{"award_date":"2026-05-26","description":"NHLBI: + SUPPLY: AGILENT 8850 GC SYSTEM, 7650 ALS SAMPLER, OPENLAB CDS WORKSTATION/SOFTWARE + BUNDLE","key":"CONT_AWD_75N98026F00154_7529_GS07F0564X_4732","piid":"75N98026F00154","recipient":{"display_name":"AGILENT + TECHNOLOGIES INC"},"total_contract_value":41265.64},{"award_date":"2026-05-26","description":"PCARE + TRUTHPOINT ROUNDING SOLUTION SOFTWARE","key":"CONT_AWD_36C24926N0536_3600_NNG15SD24B_8000","piid":"36C24926N0536","recipient":{"display_name":"TECHANAX + LLC"},"total_contract_value":84872.0}]}' + headers: + CF-RAY: + - a02d53510ab8ae26-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:21 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=ldsFHSfmEs%2FDSQYrW7NqD31vUzc%2BSGERdSNR01gbnf%2FQ%2B30tEOA5KenxFYxUc48fbs9jtwLI%2FvJ2nbMgM2AB1scedVmSnD5P3ShaIgoBXSsIIITdBOFXjqZofaHW1Z%2BhchTBFXXmJK%2FYnveMwd36"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1691' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 19.935s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '987' + x-ratelimit-burst-reset: + - '16' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999919' + x-ratelimit-daily-reset: + - '40778' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '987' + x-ratelimit-reset: + - '16' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[psc_code-R425] b/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[psc_code-R425] index 3f66c94..43c650a 100644 --- a/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[psc_code-R425] +++ b/tests/cassettes/TestContractsIntegration.test_filter_parameter_mappings[psc_code-R425] @@ -83,4 +83,93 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&psc=R425 + response: + body: + string: '{"count":194236,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&psc=R425&cursor=WyIyMDI2LTA1LTI1IiwgImQ1NmEzYWY1LTY2OWYtNTVkZS05YWRhLTQzODQ4YWFiNjVjZiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI1IiwgImQ1NmEzYWY1LTY2OWYtNTVkZS05YWRhLTQzODQ4YWFiNjVjZiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"REA + CONSULTANT REVIEW SERVICES","key":"CONT_AWD_36C77626F0019_3600_36C10F24A0003_3600","piid":"36C77626F0019","recipient":{"display_name":"Summit + Federal, LLC"},"total_contract_value":39875.4},{"award_date":"2026-05-26","description":"EARTH + RESOURCES OBSERVATION AND SCIENCE CENTER (EROS) LANDSAT MISSION OPERATIONS + PROJECT","key":"CONT_AWD_140G0126C0008_1434_-NONE-_-NONE-","piid":"140G0126C0008","recipient":{"display_name":"THE + AEROSPACE CORPORATION"},"total_contract_value":14681664.45},{"award_date":"2026-05-26","description":"THE + TSA HEREBY ISSUES THIS FFP TASK ORDER 70T01026F7672N002 UNDER THE PELSS BPA + 70T05021A7672N001 IN SUPPORT OF SECURITY TECHNOLOGY INTEGRATION PROGRAM BRIDGE + OPERATIONS AND MAINTENANCE SUPPORT.","key":"CONT_AWD_70T01026F7672N003_7013_70T01026A7672N001_7013","piid":"70T01026F7672N003","recipient":{"display_name":"Global + Systems Technologies, LLC"},"total_contract_value":4228217.06},{"award_date":"2026-05-25","description":"ERMS + PANEL INSTALLATION VARIOUS SITES VENDOR: OCEUS NETWORKS LLC","key":"CONT_AWD_693KA826F00183_6920_693KA820D00011_6920","piid":"693KA826F00183","recipient":{"display_name":"OCEUS + NETWORKS, LLC"},"total_contract_value":28588.42},{"award_date":"2026-05-25","description":"EG + QXV & QJX SITE SURVEY FUNDING FOR DC BUS SYSTEM","key":"CONT_AWD_693KA826F00075_6920_693KA820D00011_6920","piid":"693KA826F00075","recipient":{"display_name":"OCEUS + NETWORKS, LLC"},"total_contract_value":15065.88}]}' + headers: + CF-RAY: + - a02d53ceba51ad17-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:21 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=sC12ramKYwiloiQfpiXI0fWgfhy%2FN%2B8bxRSrCBA30WOn1uhZmYEExL7xLgNO212pT2C1jWySz9Y3%2FQiCs03E6eUWTSWMk6AURP4Vo4hyL3xPafPDI3jHWSD6LXA%2Fn5TjGbjlGoJrYESmOXkyEW6S"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1887' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.042s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '986' + x-ratelimit-burst-reset: + - '16' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999918' + x-ratelimit-daily-reset: + - '40778' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '986' + x-ratelimit-reset: + - '16' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_awarding_agency_filter b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_awarding_agency_filter index dbcf6fa..615e2ed 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_awarding_agency_filter +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_awarding_agency_filter @@ -13,7 +13,7 @@ interactions: user-agent: - python-httpx/0.28.1 method: GET - uri: https://tango.makegov.com/api/contracts/?limit=5&page=1&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&awarding_agency=4700 + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&awarding_agency=4700 response: body: string: '{"count":438863,"next":"https://tango.makegov.com/api/contracts/?limit=5&page=1&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&awarding_agency=4700&cursor=WyIyMDI2LTAzLTAzIiwgImQ4MGViMDdkLTRlNjktNTEwNS04NmQ1LWU5NTI4MTJhMTRlNSJd","previous":null,"cursor":"WyIyMDI2LTAzLTAzIiwgImQ4MGViMDdkLTRlNjktNTEwNS04NmQ1LWU5NTI4MTJhMTRlNSJd","previous_cursor":null,"results":[{"key":"CONT_AWD_47PC5226F0162_4740_47PN0323A0001_4740","piid":"47PC5226F0162","award_date":"2026-03-03","description":"THIS diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_date_range_filter b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_date_range_filter index de32e6d..252cad4 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_date_range_filter +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_date_range_filter @@ -83,4 +83,90 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_date_gte=2023-01-01&award_date_lte=2023-12-31 + response: + body: + string: '{"count":704561,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_date_gte=2023-01-01&award_date_lte=2023-12-31&cursor=WyIyMDIzLTEyLTMxIiwgImZlMDM5MzUxLWNkYzMtNWEyOC05OTc4LTc5NmIyYTIwZTM5YSJd","previous":null,"cursor":"WyIyMDIzLTEyLTMxIiwgImZlMDM5MzUxLWNkYzMtNWEyOC05OTc4LTc5NmIyYTIwZTM5YSJd","previous_cursor":null,"results":[{"award_date":"2023-12-31","description":"4563205804!DOUGHNUTS, + FRESH, VARIETY PACK,","key":"CONT_AWD_SPE30024FHDVS_9700_SPE30022DA000_9700","piid":"SPE30024FHDVS","recipient":{"display_name":"GLOBAL + FOOD SERVICES COMPANY"},"total_contract_value":185.92},{"award_date":"2023-12-31","description":"4563205985!KIT + FOL CATH TMM-FC 1S","key":"CONT_AWD_SPE2DV24FTNFB_9700_SPE2DV17D0200_9700","piid":"SPE2DV24FTNFB","recipient":{"display_name":"CARDINAL + HEALTH 200, LLC"},"total_contract_value":242.16},{"award_date":"2023-12-31","description":"4563205978!INSOLE + CUST SZ A 2S","key":"CONT_AWD_SPE2DV24FTNFT_9700_SPE2DV17D0200_9700","piid":"SPE2DV24FTNFT","recipient":{"display_name":"CARDINAL + HEALTH 200, LLC"},"total_contract_value":468.0},{"award_date":"2023-12-31","description":"8510360826!ASPIRIN + TABLETS,USP","key":"CONT_AWD_SPE2D924F1092_9700_SPE2DX15D0022_9700","piid":"SPE2D924F1092","recipient":{"display_name":"Cardinal + Health, Inc."},"total_contract_value":1.22},{"award_date":"2023-12-31","description":"CEILING + TILE 24 W 24 L 5/8 THICK PK16","key":"CONT_AWD_47QSSC24F23L7_4732_47QSHA21A0017_4732","piid":"47QSSC24F23L7","recipient":{"display_name":"W.W. + GRAINGER, INC."},"total_contract_value":1400.4}]}' + headers: + CF-RAY: + - a02d53473cc6a1be-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:59 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=CpgU%2FMd7mgMLNK9byrepb37CyyViILzAXC3xxboiL4uWle2rqSEblvrs%2Fec2QlnSnAU1lDw8iDr148kDZj6qvqCecmXagjWVvbKlqrwYh7Gx6Tiko6PtD40rMZ%2BYb9M6NyBaCGQNJTGb0jt3jHEg"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1648' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.064s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '993' + x-ratelimit-burst-reset: + - '38' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999925' + x-ratelimit-daily-reset: + - '40800' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '993' + x-ratelimit-reset: + - '38' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_flat b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_flat index 5ef5cc1..6daba92 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_flat +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_flat @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&flat=true + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&flat=true&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient.display_name":"CARDIOQUIP, + LLC","total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient.display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC","total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient.display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC.","total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient.display_name":"ADVANCED + COMPUTER CONCEPTS, INC.","total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient.display_name":"Edwards + Lifesciences LLC","total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d52c53ed8179d-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:39 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=R6q111LWBZXdrfxaUXgo0cP77ne0M2rEvYUPhyXwq0Fa8%2F3q33or0VpongepZNjjzKLrNNlytyTAUYeVZ4PdZuTHSCCebtmdOFs90jRHgqsFZaZC0M%2FxCH8DbUjeAjC0WTQKNF9ByIwPdAwqseh%2F"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1783' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.031s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '995' + x-ratelimit-burst-reset: + - '58' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999927' + x-ratelimit-daily-reset: + - '40820' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '995' + x-ratelimit-reset: + - '58' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_naics_code_filter b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_naics_code_filter index f0d8435..8a17e20 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_naics_code_filter +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_naics_code_filter @@ -193,4 +193,201 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0},{"award_date":"2026-05-26","description":"TENEBALE + SOFTWARE","key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","description":"TSFB + SOFT PRESSURE WASH LOCATED IN RALEIGH, NC AT THE TERRY SANFORD FEDERAL BUILDING","key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","piid":"47PC5226F0297","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"award_date":"2026-05-26","description":"UIPATH","key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","piid":"1331L526FNB160100","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"award_date":"2026-05-26","description":"EMERGENCY + SEWER REPAIR","key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","piid":"36C24626P0712","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"award_date":"2026-05-26","description":"HBG-21171-C--G-LIHT + PROCUREMENT","key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","piid":"80NSSC26FA425","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8}]}' + headers: + CF-RAY: + - a02d534aa9a0acde-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:00 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Z00VrNLvHZK5TZMivjuTrJoWlrP39Bj0JdajaZ6F03qRvxZsv5KroGC2tevwXox9ENWS%2Fhswk6iDkx3JtnIjSZ0ODh9mdtWKpBYJcvhfTZ4wkujTe6SJ2UO9GgAn8ojV5nVZrRuyjHJA3UBKN%2B8S"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '3012' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.047s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '991' + x-ratelimit-burst-reset: + - '37' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999923' + x-ratelimit-daily-reset: + - '40799' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '991' + x-ratelimit-reset: + - '37' + x-results-counttype: + - approximate + status: + code: 200 + message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value%2Cnaics_code&naics=541511 + response: + body: + string: '{"count":133201,"next":"https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value%2Cnaics_code&naics=541511&cursor=WyIyMDI2LTA1LTIxIiwgImVlZjMzMzVmLTUxMDQtNTA3Zi1hNDE1LTZkYjE4Yzk1ODFjMSJd","previous":null,"cursor":"WyIyMDI2LTA1LTIxIiwgImVlZjMzMzVmLTUxMDQtNTA3Zi1hNDE1LTZkYjE4Yzk1ODFjMSJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"PAYMENT + FOR APPROVED RATIFICATION: CONTROL NO. UAC-25-35-BIL","key":"CONT_AWD_75H70926P00086_7527_-NONE-_-NONE-","naics_code":541511,"piid":"75H70926P00086","recipient":{"display_name":"MEDICAL + CONSULTANTS NETWORK INC"},"total_contract_value":132224.66},{"award_date":"2026-05-26","description":"TAAMS + APPLICATION LOGIC AND SUPPORT EPS\nTRUST ASSET & ACCOUNTING MANAGEMENT SYSTEM + (TAAMS) IDIQ","key":"CONT_AWD_140A1626F0054_1450_140A1621D0008_1450","naics_code":541511,"piid":"140A1626F0054","recipient":{"display_name":"CGI + FEDERAL INC."},"total_contract_value":323490.63},{"award_date":"2026-05-26","description":"NSPIRE + OPERATIONS AND MAINTENANCE (O&M)","key":"CONT_AWD_86615426C00007_8600_-NONE-_-NONE-","naics_code":541511,"piid":"86615426C00007","recipient":{"display_name":"MILLSAPPS, + BALLINGER & ASSOCIATES, INC."},"total_contract_value":1654360.0},{"award_date":"2026-05-26","description":"INNOVIAN + IQ","key":"CONT_AWD_36C24126N0592_3600_36C10G23A0004_3600","naics_code":541511,"piid":"36C24126N0592","recipient":{"display_name":"DRAEGER + INC"},"total_contract_value":50074.48},{"award_date":"2026-05-26","description":"LAB + INTERFACE FOR MONACAN AND MATHC \n\n''EO 14398''","key":"CONT_AWD_75H71526P00016_7527_-NONE-_-NONE-","naics_code":541511,"piid":"75H71526P00016","recipient":{"display_name":"CIMARRON + MEDICAL INFORMATICS LLC"},"total_contract_value":30000.0},{"award_date":"2026-05-22","description":"ADMINISTRATIVE + RECORDS TRACKER FOR ENVIRONMENTAL AND HISTORIC PRESERVATION MANAGEMENT & INTEGRATION + SERVICES (ARTEMIS) CLOUD","key":"CONT_AWD_70FA3126F00000025_7022_70FA3020A00000008_7022","naics_code":541511,"piid":"70FA3126F00000025","recipient":{"display_name":"SHR + CONSULTING GROUP LLC"},"total_contract_value":63400.0},{"award_date":"2026-05-22","description":"SEE + STATEMENT OF WORK ATTACHMENT","key":"CONT_AWD_75FCMC26F0089_7530_GS35F393CA_4732","naics_code":541511,"piid":"75FCMC26F0089","recipient":{"display_name":"GENERAL + DYNAMICS INFORMATION TECHNOLOGY, INC."},"total_contract_value":3763100.96},{"award_date":"2026-05-21","description":"BHW90 + C 7304. FY26 BMISS OPERATIONS AND MAINTENANCE (O&M).","key":"CONT_AWD_75R60226F34019_7526_75R60223A00024_7526","naics_code":541511,"piid":"75R60226F34019","recipient":{"display_name":"SAPIENT + GOVERNMENT SERVICES, INC."},"total_contract_value":10798682.88},{"award_date":"2026-05-21","description":"4CAST + ID: OO68 C 7549\nTITLE: FRAUD DETECTION AND MANAGEMENT PLATFORM: ARTIFICIAL + INTELLIGENCE AND MACHINE LEARNING SUPPORT SERVICES\nAWARD TYPE: FIRM FIXED + PRICE","key":"CONT_AWD_75R60226F80041_7526_47QTCA21D001U_4732","naics_code":541511,"piid":"75R60226F80041","recipient":{"display_name":"NODE.DIGITAL + LLC"},"total_contract_value":2987510.0},{"award_date":"2026-05-21","description":"BASE + COAT SOFTWARE","key":"CONT_AWD_80NSSC26P0680_8000_-NONE-_-NONE-","naics_code":541511,"piid":"80NSSC26P0680","recipient":{"display_name":"GREENFIELD + DIVERSIFIED, LLC"},"total_contract_value":133020.0}]}' + headers: + CF-RAY: + - a02d534b8a7aacde-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:00 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=qIuPeWsoXMWUhPCh5ajqHPsIkFG8VQFs8A61uTPJavsYHNvE%2B5HSRzCqrqfBSXIFQFA8FjEJNeIrlCSQTteTVwxWRPSjZph%2Bv%2Fk2WNEMjQqq2PzjCVISfnAX64AnGyarxRD95yGW0G5Ft7r82dQm"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '3414' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.050s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '990' + x-ratelimit-burst-reset: + - '37' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999922' + x-ratelimit-daily-reset: + - '40799' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '990' + x-ratelimit-reset: + - '37' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[custom-key,piid,recipient(display_name),total_contract_value,award_date] b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[custom-key,piid,recipient(display_name),total_contract_value,award_date] index 3f1faa6..6a0dfd1 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[custom-key,piid,recipient(display_name),total_contract_value,award_date] +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[custom-key,piid,recipient(display_name),total_contract_value,award_date] @@ -78,4 +78,85 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value%2Caward_date + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value%2Caward_date&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d52c19a51ad23-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:38 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=V4HrR1XaqtUR4Wl%2FoEwCZCfy4vapIYusAjPSxIJAWOzMOJa%2FT5uIAEucRz6GSYBi5XSf15L4ymJxz3a0aR3t6cL47I6lnQ95BiD3RuH%2BfgIgXAsT1zEG6RieePruM6ZtBgQ5ObVhw9RYl1IFrZ94"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1364' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.039s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '997' + x-ratelimit-burst-reset: + - '59' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999929' + x-ratelimit-daily-reset: + - '40821' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '997' + x-ratelimit-reset: + - '59' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[default-None] b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[default-None] index e6a92fb..7192aee 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[default-None] +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[default-None] @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d52be1f3919ca-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:38 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Y7vFC9wsCIVgUfZOXFGNxP4wbxsBGOvaW%2Bj0Q3h6TCZPuabDT1LLg9RbcpqC36vMSmMiMDIIAQZD4d5Y5rfqq3SiE9e10JcFsaNksEYc8T6%2B6MBjMca42VTfslf8KBW6dU7dBGKlECjdoLN58xRv"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.038s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '999' + x-ratelimit-burst-reset: + - '59' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999931' + x-ratelimit-daily-reset: + - '40821' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '999' + x-ratelimit-reset: + - '59' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[detailed-key,piid,award_date,description,total_contract_value,obligated,fiscal_year,set_aside,recipient(display_name,uei),awarding_office(-),place_of_performa...ce114a3c47e2037aaa3c15d00b7031bd b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[detailed-key,piid,award_date,description,total_contract_value,obligated,fiscal_year,set_aside,recipient(display_name,uei),awarding_office(-),place_of_performa...ce114a3c47e2037aaa3c15d00b7031bd index 6b33297..3b4f674 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[detailed-key,piid,award_date,description,total_contract_value,obligated,fiscal_year,set_aside,recipient(display_name,uei),awarding_office(-),place_of_performa...ce114a3c47e2037aaa3c15d00b7031bd +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[detailed-key,piid,award_date,description,total_contract_value,obligated,fiscal_year,set_aside,recipient(display_name,uei),awarding_office(-),place_of_performa...ce114a3c47e2037aaa3c15d00b7031bd @@ -97,4 +97,107 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Cdescription%2Ctotal_contract_value%2Cobligated%2Cfiscal_year%2Cset_aside%2Crecipient%28display_name%2Cuei%29%2Cawarding_office%28%2A%29%2Cplace_of_performance%28city_name%2Cstate_code%2Cstate_name%2Ccountry_code%2Ccountry_name%29%2Cnaics_code%2Cpsc_code + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Cdescription%2Ctotal_contract_value%2Cobligated%2Cfiscal_year%2Cset_aside%2Crecipient%28display_name%2Cuei%29%2Cawarding_office%28%2A%29%2Cplace_of_performance%28city_name%2Cstate_code%2Cstate_name%2Ccountry_code%2Ccountry_name%29%2Cnaics_code%2Cpsc_code&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","awarding_office":{"organization_id":"2c45fd53-3590-5589-a188-1f34917b3de5","office_code":"36C261","office_name":"261-NETWORK + CONTRACT OFFICE 21 (36C261)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"description":"CARDIOQUIP SERVICES","fiscal_year":2026,"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","naics_code":811210,"obligated":13450.82,"piid":"36C26126P0571","place_of_performance":{"country_code":"USA","country_name":"UNITED + STATES","state_code":"CA","state_name":"CALIFORNIA","city_name":"SAN FRANCISCO"},"psc_code":"J065","recipient":{"uei":"R8CPTNLLAJJ7","display_name":"CARDIOQUIP, + LLC"},"set_aside":null,"total_contract_value":26901.64},{"award_date":"2026-05-26","awarding_office":{"organization_id":"bb941157-db91-59e5-9a2b-bd50ebf75b2b","office_code":"693JJ3","office_name":"693JJ3 + ACQUISITION AND GRANTS MGT","agency_code":"6925","agency_name":"FEDERAL HIGHWAY + ADMINISTRATION","department_code":"069","department_name":"TRANSPORTATION, + DEPARTMENT OF"},"description":"NON-PERSONAL SERVICES TO DEFINE A PRODUCT SPECIFICATION + AND CREATE A CONCEPTUAL MODEL OF THE NATIONAL ROAD NETWORK (NRN).","fiscal_year":2026,"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","naics_code":541370,"obligated":369600.0,"piid":"693JJ326P000012","place_of_performance":{"country_code":"USA","country_name":"UNITED + STATES","state_code":"IN","state_name":"INDIANA","city_name":"INDIANAPOLIS"},"psc_code":"C215","recipient":{"uei":"ZR6EPV2TYJS1","display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":369600.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"828b5738-4ca2-5644-bbd4-6b0acae5746a","office_code":"47PE52","office_name":"PBS + PROJECT DELIVERY CENTRAL - BRANCH B","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"description":"URGENT REPLACE RECESSED LED PULSATING LIGHTING, + U.S. SECRET SERVICES (USSS) HEADQUARTERS BUILDING, 950 H STREET, NW, WASHINGTON, + DC 20223.","fiscal_year":2026,"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","naics_code":561210,"obligated":27500.0,"piid":"47PE5226F0113","place_of_performance":{"country_code":"USA","country_name":"UNITED + STATES","state_code":"DC","state_name":"DISTRICT OF COLUMBIA","city_name":"WASHINGTON"},"psc_code":"Z1AA","recipient":{"uei":"ZVX7ZJ5WZ576","display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"set_aside":null,"total_contract_value":27500.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"430af738-027d-5243-9d57-7c1ee23abe15","office_code":"895030","office_name":"WESTERN-CORPORATE + SERVICES OFFICE","agency_code":"8900","agency_name":"ENERGY, DEPARTMENT OF","department_code":"089","department_name":"ENERGY, + DEPARTMENT OF"},"description":"ESRI ARCGIS MAINTENANCE","fiscal_year":2026,"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","naics_code":541519,"obligated":83384.92,"piid":"89503026FWA401176","place_of_performance":{"country_code":"USA","country_name":"UNITED + STATES","state_code":"CO","state_name":"COLORADO","city_name":"LAKEWOOD"},"psc_code":"7A21","recipient":{"uei":"CGE8ABMZLZN9","display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"set_aside":"SBA","total_contract_value":83384.92},{"award_date":"2026-05-26","awarding_office":{"organization_id":"41755914-5162-5f81-bc5e-ceafc6c3beae","office_code":"36C241","office_name":"241-NETWORK + CONTRACT OFFICE 01 (36C241)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"description":"SURGICAL IMPLANT - HEART TAVR","fiscal_year":2026,"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","naics_code":339113,"obligated":68000.0,"piid":"36C24126P0441","place_of_performance":{"country_code":"USA","country_name":"UNITED + STATES","state_code":"CA","state_name":"CALIFORNIA","city_name":"IRVINE"},"psc_code":"6515","recipient":{"uei":"MR4FCKSNGRC1","display_name":"Edwards + Lifesciences LLC"},"set_aside":null,"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d52c38f37511c-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:38 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=V9OhSRL3H%2Bo%2BDGOmt0YZVO1JaWC6bo4gB%2BejpbjQJdNRPy3hidnwQh39AJSR5jIX0EGlVJinjUFdZwNl3LA4kFZj4akp7OmfQQG44WbVchRq%2F7eew4ceZ86h0pxmPFsnAo6PJj8fEWFxAZKhr5u7"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '4759' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.040s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '996' + x-ratelimit-burst-reset: + - '59' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999928' + x-ratelimit-daily-reset: + - '40821' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '996' + x-ratelimit-reset: + - '59' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] index 68c9b4c..2200cf7 100644 --- a/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] +++ b/tests/cassettes/TestContractsIntegration.test_list_contracts_with_shapes[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d52c04ceeacf0-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:39:38 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=YXF2uhLDkNfqm%2Fhwy4vrdUWW5IzzhBn58XKPV1TaCTykDYzvL6MlXAziPt87hCy2b8D8QY3AGOvgkEcU%2B%2F%2F%2FzH2%2Brtmbqh1oMwo1DX%2BcK%2F42njptd2p5SaSxXnx62nKVjgvxzmF1%2Fi030O9p9xIh"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.032s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '998' + x-ratelimit-burst-reset: + - '59' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999930' + x-ratelimit-daily-reset: + - '40821' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '998' + x-ratelimit-reset: + - '59' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_new_expiring_filters b/tests/cassettes/TestContractsIntegration.test_new_expiring_filters index 1c7ff44..a90f2e5 100644 --- a/tests/cassettes/TestContractsIntegration.test_new_expiring_filters +++ b/tests/cassettes/TestContractsIntegration.test_new_expiring_filters @@ -83,4 +83,91 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&expiring_gte=2025-01-01&expiring_lte=2025-12-31 + response: + body: + string: '{"count":5245796,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&expiring_gte=2025-01-01&expiring_lte=2025-12-31&cursor=WyIyMDI2LTA1LTIwIiwgIjZmMGE4Y2RhLTM4ZjEtNWQ2ZS1iNDUyLTY2MmQwMjJlYmY0YyJd","previous":null,"cursor":"WyIyMDI2LTA1LTIwIiwgIjZmMGE4Y2RhLTM4ZjEtNWQ2ZS1iNDUyLTY2MmQwMjJlYmY0YyJd","previous_cursor":null,"results":[{"award_date":"2026-05-21","description":"EXPRESS + REPORT: COR SPEND REPORT","key":"CONT_AWD_36C25726K0201_3600_36C25720D0099_3600","piid":"36C25726K0201","recipient":{"display_name":"DEWITT + MEDICAL DISTRICT"},"total_contract_value":44370.53},{"award_date":"2026-05-21","description":"EXPRESS + REPORT: COR SPEND REPORT","key":"CONT_AWD_36C25726K0203_3600_36C25720D0099_3600","piid":"36C25726K0203","recipient":{"display_name":"DEWITT + MEDICAL DISTRICT"},"total_contract_value":18168.23},{"award_date":"2026-05-21","description":"EXPRESS + REPORT: COR SPEND REPORT","key":"CONT_AWD_36C25726K0202_3600_36C25720D0099_3600","piid":"36C25726K0202","recipient":{"display_name":"DEWITT + MEDICAL DISTRICT"},"total_contract_value":18453.26},{"award_date":"2026-05-20","description":"EXPRESS + REPORT: MIAMI & WEST PALM DME: QUARTERLY REPORT POP: SEPTEMBER 2025-NOVEMBER + 2025","key":"CONT_AWD_36C24826K0005_3600_36C24825D0036_3600","piid":"36C24826K0005","recipient":{"display_name":"MEDICAL + EQUIPMENT & SUPPLIES OF AMERICA LLC"},"total_contract_value":282038.62},{"award_date":"2026-05-20","description":"CONTROL + MEDICATION - OCT FY26","key":"CONT_AWD_15B31026F00000058_1540_36W79720D0001_3600","piid":"15B31026F00000058","recipient":{"display_name":"MCKESSON + CORPORATION"},"total_contract_value":320.33}]}' + headers: + CF-RAY: + - a02d53d38f77ff48-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:23 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=zF4jObKyQiwDmia4Hea0L2sY6uQ5AZ8fuDdxy4g9d9NP7qM%2BgEW7SBAc86QOzQ6FDG%2FKO%2FM7wYJ%2FbvAs42rUij1qXOW7yAkK4pyAAD3pxBP1eFb4iMFjt4ZcEdUKOkrIynGbTwgjiedmhP%2Br7SYS"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1724' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.679s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '983' + x-ratelimit-burst-reset: + - '15' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999915' + x-ratelimit-daily-reset: + - '40776' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '983' + x-ratelimit-reset: + - '15' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_new_fiscal_year_range_filters b/tests/cassettes/TestContractsIntegration.test_new_fiscal_year_range_filters index 230515a..d44366b 100644 --- a/tests/cassettes/TestContractsIntegration.test_new_fiscal_year_range_filters +++ b/tests/cassettes/TestContractsIntegration.test_new_fiscal_year_range_filters @@ -118,4 +118,93 @@ interactions: status: code: 504 message: Gateway Timeout +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&fiscal_year_gte=2020&fiscal_year_lte=2024 + response: + body: + string: '{"count":26413890,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&fiscal_year_gte=2020&fiscal_year_lte=2024&cursor=WyIyMDI0LTA5LTMwIiwgImZmZTRmMmUxLTE3NDUtNTgzNi05MTAzLTNkNmNiZjkwOGNkNSJd","previous":null,"cursor":"WyIyMDI0LTA5LTMwIiwgImZmZTRmMmUxLTE3NDUtNTgzNi05MTAzLTNkNmNiZjkwOGNkNSJd","previous_cursor":null,"results":[{"award_date":"2024-09-30","description":"4565982784!PEARS, + FRESH,","key":"CONT_AWD_SPE3SU24FJJFB_9700_SPE30020DS351_9700","piid":"SPE3SU24FJJFB","recipient":{"display_name":"CHICO + PRODUCE, INC."},"total_contract_value":814.4},{"award_date":"2024-09-30","description":"BAG + PLASTIC","key":"CONT_AWD_47QSSC24FFYM4_4732_GS02FW0003_4730","piid":"47QSSC24FFYM4","recipient":{"display_name":"NATIONAL + INDUSTRIES FOR THE BLIND"},"total_contract_value":178.9},{"award_date":"2024-09-30","description":"2024 + COMM PROJECTS ATTACH 1A - SOW-CN 317 TO CN 797 V2 21DEC23ATTACH 2 - SOW-CN + 317 TO CN 799, 11 APR 24 ATTACH 3 - SOW-CN 317 TO B800 11 APR 2024ATTACH 4A + - SOW-CN 317 TO B802 V2 REV 21DEC23 ATTACH 5 - SOW-B618 PREMISES WIRING 29 + MARCH 2024","key":"CONT_AWD_FA667024C0005_9700_-NONE-_-NONE-","piid":"FA667024C0005","recipient":{"display_name":"DMYLES + INC."},"total_contract_value":348798.51},{"award_date":"2024-09-30","description":"FBC + FY24 - GIS DESKTOP","key":"CONT_AWD_12FPC224F0082_12D0_12314424A0016_1205","piid":"12FPC224F0082","recipient":{"display_name":"PANAMERICA + COMPUTERS, INC."},"total_contract_value":10132.46},{"award_date":"2024-09-30","description":"TENNSCO + JAN6618DHBK JANITORIAL CABINET,","key":"CONT_AWD_47QSWA24F2Y64_4732_47QSWA23A0024_4732","piid":"47QSWA24F2Y64","recipient":{"display_name":"MONO + MACHINES LLC"},"total_contract_value":730.97}]}' + headers: + CF-RAY: + - a02d53d8cfcd4ca0-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:23 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=dW%2BeStIrVavoZ93a0VYhE279rHa4RVteKFeAduR46CW3TycXKUB0LsX4LxOTDeOzcc8%2F1dhrys8ngq%2BoH1mLYgQxhcrBvFrtz8JxUI7gcA3ma8DPbwfX1F%2BuAPg4KKHU2gEVKhSYo1NZXzD12xX5"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.092s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '982' + x-ratelimit-burst-reset: + - '14' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999914' + x-ratelimit-daily-reset: + - '40776' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '982' + x-ratelimit-reset: + - '14' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_new_identifier_filters b/tests/cassettes/TestContractsIntegration.test_new_identifier_filters index b02246a..d63acba 100644 --- a/tests/cassettes/TestContractsIntegration.test_new_identifier_filters +++ b/tests/cassettes/TestContractsIntegration.test_new_identifier_filters @@ -73,4 +73,80 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&piid=GS00Q14OADU130 + response: + body: + string: '{"count":0,"next":null,"previous":null,"cursor":null,"previous_cursor":null,"results":[]}' + headers: + CF-RAY: + - a02d53dace69393c-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:23 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=usAesv%2FyYTDC5rlZ2lYjuQxkozKW1Fb%2FEgkLptw5Nd2%2BGcpxIZbZaPZC5Lee5H5HGqayRA8HcxYwghH1248Ts6W0IQ%2Bl8McUPM4s2e813wwchNB1nOHAck8y0BFropz9gxoeCLMd0oGIe5K8lD4o"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '89' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.025s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '981' + x-ratelimit-burst-reset: + - '14' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999913' + x-ratelimit-daily-reset: + - '40776' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '981' + x-ratelimit-reset: + - '14' + x-results-counttype: + - exact + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_search_contracts_with_filters b/tests/cassettes/TestContractsIntegration.test_search_contracts_with_filters index 7ff8641..b541bf2 100644 --- a/tests/cassettes/TestContractsIntegration.test_search_contracts_with_filters +++ b/tests/cassettes/TestContractsIntegration.test_search_contracts_with_filters @@ -83,4 +83,90 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_date_gte=2023-01-01&award_date_lte=2023-12-31 + response: + body: + string: '{"count":704561,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_date_gte=2023-01-01&award_date_lte=2023-12-31&cursor=WyIyMDIzLTEyLTMxIiwgImZlMDM5MzUxLWNkYzMtNWEyOC05OTc4LTc5NmIyYTIwZTM5YSJd","previous":null,"cursor":"WyIyMDIzLTEyLTMxIiwgImZlMDM5MzUxLWNkYzMtNWEyOC05OTc4LTc5NmIyYTIwZTM5YSJd","previous_cursor":null,"results":[{"award_date":"2023-12-31","description":"4563205804!DOUGHNUTS, + FRESH, VARIETY PACK,","key":"CONT_AWD_SPE30024FHDVS_9700_SPE30022DA000_9700","piid":"SPE30024FHDVS","recipient":{"display_name":"GLOBAL + FOOD SERVICES COMPANY"},"total_contract_value":185.92},{"award_date":"2023-12-31","description":"4563205985!KIT + FOL CATH TMM-FC 1S","key":"CONT_AWD_SPE2DV24FTNFB_9700_SPE2DV17D0200_9700","piid":"SPE2DV24FTNFB","recipient":{"display_name":"CARDINAL + HEALTH 200, LLC"},"total_contract_value":242.16},{"award_date":"2023-12-31","description":"4563205978!INSOLE + CUST SZ A 2S","key":"CONT_AWD_SPE2DV24FTNFT_9700_SPE2DV17D0200_9700","piid":"SPE2DV24FTNFT","recipient":{"display_name":"CARDINAL + HEALTH 200, LLC"},"total_contract_value":468.0},{"award_date":"2023-12-31","description":"8510360826!ASPIRIN + TABLETS,USP","key":"CONT_AWD_SPE2D924F1092_9700_SPE2DX15D0022_9700","piid":"SPE2D924F1092","recipient":{"display_name":"Cardinal + Health, Inc."},"total_contract_value":1.22},{"award_date":"2023-12-31","description":"CEILING + TILE 24 W 24 L 5/8 THICK PK16","key":"CONT_AWD_47QSSC24F23L7_4732_47QSHA21A0017_4732","piid":"47QSSC24F23L7","recipient":{"display_name":"W.W. + GRAINGER, INC."},"total_contract_value":1400.4}]}' + headers: + CF-RAY: + - a02d5348aba5ae26-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:00 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Tbx4UGwimJ7W61tTg9QeO1hJ0vbdTXPFhNY5UK9Rl2HunBY%2F9btqfr5BIY6L5g8b7ZmKWuC6Xv%2BLDug55Z%2B5ILU0FeTfYOBdYtd8Qdqp5a4gpZza0EwmzsC9Brc1lkPh9KKsM6dkpr8xguXiOPCG"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1648' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.043s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '992' + x-ratelimit-burst-reset: + - '37' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999924' + x-ratelimit-daily-reset: + - '40799' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '992' + x-ratelimit-reset: + - '37' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_search_filters_object_with_new_parameters b/tests/cassettes/TestContractsIntegration.test_search_filters_object_with_new_parameters index 00b7286..d64f105 100644 --- a/tests/cassettes/TestContractsIntegration.test_search_filters_object_with_new_parameters +++ b/tests/cassettes/TestContractsIntegration.test_search_filters_object_with_new_parameters @@ -13,7 +13,7 @@ interactions: user-agent: - python-httpx/0.28.1 method: GET - uri: https://tango.makegov.com/api/contracts/?limit=5&page=1&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&search=software&pop_start_date_gte=2024-01-01&expiring_lte=2025-12-31&fiscal_year=2024 + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&search=software&pop_start_date_gte=2024-01-01&expiring_lte=2025-12-31&fiscal_year=2024 response: body: string: '{"count":3838,"next":"https://tango.makegov.com/api/contracts/?limit=5&page=1&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&search=software&pop_start_date_gte=2024-01-01&expiring_lte=2025-12-31&fiscal_year=2024&cursor=WyIyMDI0LTA5LTMwIiwgImY3OWM0ZGJmLTM4ZTQtNWRiNi04MTU4LTMxNjdhNTk1YjgzZCJd","previous":null,"cursor":"WyIyMDI0LTA5LTMwIiwgImY3OWM0ZGJmLTM4ZTQtNWRiNi04MTU4LTMxNjdhNTk1YjgzZCJd","previous_cursor":null,"results":[{"key":"CONT_AWD_47QSSC24FFY0X_4732_GS02FW0003_4730","piid":"47QSSC24FFY0X","award_date":"2024-09-30","description":"MOUSE, diff --git a/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[asc-] b/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[asc-] index 4724bdb..3dbb3bb 100644 --- a/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[asc-] +++ b/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[asc-] @@ -83,4 +83,85 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&ordering=award_date + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&ordering=award_date&cursor=WyIxOTc4LTEyLTE1IiwgIjNlNjY5YmJkLTQxMWUtNTllZS04MmFlLWNhNGJiYzI5MDExOSJd","previous":null,"cursor":"WyIxOTc4LTEyLTE1IiwgIjNlNjY5YmJkLTQxMWUtNTllZS04MmFlLWNhNGJiYzI5MDExOSJd","previous_cursor":null,"results":[{"award_date":"1967-01-01","description":null,"key":"CONT_AWD_N6871167C0149_9700_-NONE-_-NONE-","piid":"N6871167C0149","recipient":{"display_name":"NV + ENERGY INC"},"total_contract_value":35397.0},{"award_date":"1970-06-07","description":null,"key":"CONT_AWD_N6871170C1205_9700_-NONE-_-NONE-","piid":"N6871170C1205","recipient":{"display_name":"IMPERIAL + IRRIGATION DISTRICT"},"total_contract_value":1644571.58},{"award_date":"1977-06-01","description":null,"key":"CONT_AWD_N6871177F7668_9700_-NONE-_-NONE-","piid":"N6871177F7668","recipient":{"display_name":"SOUTHWEST + GAS CORPORATION"},"total_contract_value":62000.0},{"award_date":"1978-10-15","description":null,"key":"CONT_AWD_00001197810D1416000179004_142F_-NONE-_-NONE-","piid":"00001197810D1416000179004","recipient":{"display_name":"NELSON + & SONS INC"},"total_contract_value":0.0},{"award_date":"1978-12-15","description":null,"key":"CONT_AWD_00006197812D1416000679007_142F_-NONE-_-NONE-","piid":"00006197812D1416000679007","recipient":{"display_name":"625 + ORLEANS PLACE"},"total_contract_value":0.0}]}' + headers: + CF-RAY: + - a02d53d07d0da21e-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:21 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=BmkIxjySUBgN4OzWZ29%2BuHdgkAYZOIvReMp6iLsk%2BjUw4XNc%2FSI%2F1sFL3LEH7DxapK21ireXd4qPa6x0Bf9bOAW80IORLI6rXtj1tkrXGKviXGG1NNFDYjP%2BcnFqPk9%2FuaP18Z9DMVpLVsX7%2FjBT"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1466' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.039s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '985' + x-ratelimit-burst-reset: + - '16' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999917' + x-ratelimit-daily-reset: + - '40778' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '985' + x-ratelimit-reset: + - '16' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[desc--] b/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[desc--] index 91cb41d..69c80f5 100644 --- a/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[desc--] +++ b/tests/cassettes/TestContractsIntegration.test_sort_and_order_mapped_to_ordering[desc--] @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&ordering=-award_date + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&ordering=-award_date&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d53d1c9fe510e-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:22 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=cql0jomgRUftTx3FFdFXQA4S3MOA7oJYPe%2BMOKSTKKl45Ic%2Be8tcR69deziypFE2nVAFSkNQ%2FL%2FRfhQ0BZBnK%2BQuZ6SbFnbu6kEU%2BQ%2BeKGi2uLiU1gIySqTHBshnfW3jCa7Irh3AWl0ijej1FSrp"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1814' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.031s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '984' + x-ratelimit-burst-reset: + - '15' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999916' + x-ratelimit-daily-reset: + - '40777' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '984' + x-ratelimit-reset: + - '15' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_contracts b/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_contracts index 8531930..68d5678 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_contracts +++ b/tests/cassettes/TestEdgeCasesIntegration.test_api_schema_stability_detection_contracts @@ -83,4 +83,90 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside&cursor=WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","base_and_exercised_options_value":13450.82,"fiscal_year":2026,"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","naics_code":811210,"piid":"36C26126P0571","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"R8CPTNLLAJJ7","display_name":"CARDIOQUIP, + LLC"},"set_aside":null,"total_contract_value":26901.64},{"award_date":"2026-05-26","base_and_exercised_options_value":369600.0,"fiscal_year":2026,"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","naics_code":541370,"piid":"693JJ326P000012","place_of_performance":{"country_code":"USA","state_code":"IN"},"recipient":{"uei":"ZR6EPV2TYJS1","display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":369600.0},{"award_date":"2026-05-26","base_and_exercised_options_value":27500.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","naics_code":561210,"piid":"47PE5226F0113","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"ZVX7ZJ5WZ576","display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"set_aside":null,"total_contract_value":27500.0},{"award_date":"2026-05-26","base_and_exercised_options_value":83384.92,"fiscal_year":2026,"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","naics_code":541519,"piid":"89503026FWA401176","place_of_performance":{"country_code":"USA","state_code":"CO"},"recipient":{"uei":"CGE8ABMZLZN9","display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"set_aside":"SBA","total_contract_value":83384.92},{"award_date":"2026-05-26","base_and_exercised_options_value":68000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C24126P0441","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"MR4FCKSNGRC1","display_name":"Edwards + Lifesciences LLC"},"set_aside":null,"total_contract_value":68000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":96427.99,"fiscal_year":2026,"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","naics_code":541519,"piid":"89603026F0034","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"FBRMCGPMN963","display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"set_aside":null,"total_contract_value":96427.99},{"award_date":"2026-05-26","base_and_exercised_options_value":105000.9,"fiscal_year":2026,"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","naics_code":561210,"piid":"47PC5226F0297","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"X6E8D5J5BZF7","display_name":"DAE + SUNG LLC"},"set_aside":null,"total_contract_value":105000.9},{"award_date":"2026-05-26","base_and_exercised_options_value":49851.72,"fiscal_year":2026,"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","naics_code":541519,"piid":"1331L526FNB160100","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"R98MW4ZKUUK3","display_name":"GOVERNMENT + ACQUISITIONS INC"},"set_aside":"SBA","total_contract_value":49851.72},{"award_date":"2026-05-26","base_and_exercised_options_value":35000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","naics_code":221320,"piid":"36C24626P0712","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"KT5TXCYQQ4U5","display_name":"Kokowski + Plumbing LLC"},"set_aside":null,"total_contract_value":35000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":45058.8,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","naics_code":541519,"piid":"80NSSC26FA425","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"HQAJMSZDK666","display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":45058.8}]}' + headers: + CF-RAY: + - a02d546df957a22a-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:47 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Dg2WqehWaC3yr%2BCS9sJlbHMaGztztkXAfzV%2BidWK89V%2BgRLi8aorsijEX7YNK9a%2BwA7AF%2BG9hprcC04CEr4qsao5Ty9W111cp9p0QsXBAYKNxj5c4UJjQk21wH2eTZpCwqy7KZEnJPMxrGmeRM4%2B"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '4322' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.056s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '979' + x-ratelimit-burst-reset: + - '12' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999905' + x-ratelimit-daily-reset: + - '40752' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '979' + x-ratelimit-reset: + - '12' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_date_field_parsing_edge_cases b/tests/cassettes/TestEdgeCasesIntegration.test_date_field_parsing_edge_cases index 3d8b904..bdd27ff 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_date_field_parsing_edge_cases +++ b/tests/cassettes/TestEdgeCasesIntegration.test_date_field_parsing_edge_cases @@ -128,4 +128,141 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=25&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=25&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImYxMDE2N2E1LTkzMTItNTc5OS1hNDU1LTUyOTU5Yzg2MTY0MyJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImYxMDE2N2E1LTkzMTItNTc5OS1hNDU1LTUyOTU5Yzg2MTY0MyJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","fiscal_year":2026,"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","fiscal_year":2026,"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","fiscal_year":2026,"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","fiscal_year":2026,"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","fiscal_year":2026,"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0},{"award_date":"2026-05-26","description":"TENEBALE + SOFTWARE","fiscal_year":2026,"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","description":"TSFB + SOFT PRESSURE WASH LOCATED IN RALEIGH, NC AT THE TERRY SANFORD FEDERAL BUILDING","fiscal_year":2026,"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","piid":"47PC5226F0297","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"award_date":"2026-05-26","description":"UIPATH","fiscal_year":2026,"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","piid":"1331L526FNB160100","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"award_date":"2026-05-26","description":"EMERGENCY + SEWER REPAIR","fiscal_year":2026,"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","piid":"36C24626P0712","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"award_date":"2026-05-26","description":"HBG-21171-C--G-LIHT + PROCUREMENT","fiscal_year":2026,"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","piid":"80NSSC26FA425","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8},{"award_date":"2026-05-26","description":"MANLIFT + RENTAL","fiscal_year":2026,"key":"CONT_AWD_70Z08026PMECP0119_7008_-NONE-_-NONE-","piid":"70Z08026PMECP0119","recipient":{"display_name":"BSE + PERFORMANCE, LLC"},"total_contract_value":3864.0},{"award_date":"2026-05-26","description":"MEDICAL + AIR LIFT TRANSPORTATION SERVICES FOR INMATE MOORE, KOREY 29390-009 TO THE + FMC BUTNER.","fiscal_year":2026,"key":"CONT_AWD_15B31526F00000067_1540_47QMCB23D0009_4732","piid":"15B31526F00000067","recipient":{"display_name":"INFLIGHT + MEDICAL SERVICES INTERNATIONAL, INC."},"total_contract_value":33963.0},{"award_date":"2026-05-26","description":"BACKFLOW + PREVENTION REPAIR AND INSPECTION SERVICE.","fiscal_year":2026,"key":"CONT_AWD_70Z03126PALAM0064_7008_-NONE-_-NONE-","piid":"70Z03126PALAM0064","recipient":{"display_name":"BACKFLOW + PREVENTION SPECIALISTS, INC."},"total_contract_value":3647.52},{"award_date":"2026-05-26","description":"MOTORIZED + WHEELCHAIR","fiscal_year":2026,"key":"CONT_AWD_36C24426F0298_3600_36F79718D0437_3600","piid":"36C24426F0298","recipient":{"display_name":"PERMOBIL + INC"},"total_contract_value":15359.45},{"award_date":"2026-05-26","description":"JULY + MONTHLY MEDICATIONS","fiscal_year":2026,"key":"CONT_AWD_15B51926F00000118_1540_36W79720D0001_3600","piid":"15B51926F00000118","recipient":{"display_name":"MCKESSON + CORPORATION"},"total_contract_value":500000.0},{"award_date":"2026-05-26","description":"THIS + PROJECT IS TO INSULATE THE CHILLED WATER PIPES IN THE AGRICULTURE TUNNEL LOCATED + AT THE HOTD DC0296ZZ WASHINGTON, DC.","fiscal_year":2026,"key":"CONT_AWD_47PE5326F0160_4740_47PM0024D0007_4740","piid":"47PE5326F0160","recipient":{"display_name":"CAPITAL + BRAND GROUP LLC"},"total_contract_value":6640.0},{"award_date":"2026-05-26","description":"STAB/PUNCTURE + RESISTANT VESTS MULTIPLE INSTITUTIONS.","fiscal_year":2026,"key":"CONT_AWD_15B10626F00000129_1540_15BNAS23A00000008_1540","piid":"15B10626F00000129","recipient":{"display_name":"ASPETTO + INC"},"total_contract_value":47563.4},{"award_date":"2026-05-26","description":"REPLACE + THE LEGACY LOAN PROCESSING SYSTEM AND REPLACE THE LEGACY FINANCIAL SYSTEMS + FUNCTIONALITIES WITH THE DEPARTMENT''S FINANCIAL MANAGEMENT MODERNIZATION + INITIATIVE (FMMI) PLATFORM.","fiscal_year":2026,"key":"CONT_AWD_12314426F0181_1205_12314426A0007_1205","piid":"12314426F0181","recipient":{"display_name":"SUMMIT + TECHNOLOGY CONSULTING GROUP, LLC"},"total_contract_value":4895725.15},{"award_date":"2026-05-26","description":"HAZARDOUS + MATERIALS DISPOSAL","fiscal_year":2026,"key":"CONT_AWD_15F06726P0000490_1549_-NONE-_-NONE-","piid":"15F06726P0000490","recipient":{"display_name":"ENVIRONMENTAL + MANAGEMENT INC"},"total_contract_value":29521.6},{"award_date":"2026-05-26","description":"BPA + CALL FOR EYEWEAR - FCI SCHUYLKILL - QUOTE #20226848","fiscal_year":2026,"key":"CONT_AWD_15B21326F00000048_1540_15BFA025A00000039_1540","piid":"15B21326F00000048","recipient":{"display_name":"Federal + Prison Industries, Inc"},"total_contract_value":526.0},{"award_date":"2026-05-26","description":"PROJECT + TN ERFO FS CHRKE804 2020-2(3):\n\nTHIS PROJECT CONSISTS OF REPAIRING STORM + AND FLOOD DAMAGE ON PEAVINE SHEEDS CREEK ROAD (FS 221). PROJECT WORK INCLUDES + GRADING, ROADWAY RESURFACING, DRAIN DIP CONSTRUCTION, REPLACEMENT OF DRAINAGE + CULVERTS, S","fiscal_year":2026,"key":"CONT_AWD_693C7326C000010_6925_-NONE-_-NONE-","piid":"693C7326C000010","recipient":{"display_name":"APEX + CONSTRUCTION GROUP, LLC"},"total_contract_value":7278652.0},{"award_date":"2026-05-26","description":"C201714- + LUBE OIL BANK BATTERY REPLACEMENT FOR COGEN OPERATION POWER BACKUP SYSTEM","fiscal_year":2026,"key":"CONT_AWD_75N98026F00004_7529_75N99024D00016_7529","piid":"75N98026F00004","recipient":{"display_name":"TREON + SUPPORT SERVICES JV, LLC"},"total_contract_value":71018.58},{"award_date":"2026-05-26","description":"PCS + AND ACCESSORIES ORDER","fiscal_year":2026,"key":"CONT_AWD_1331L526F0143_1301_1331L523A13ES0062_1301","piid":"1331L526F0143","recipient":{"display_name":"CSP + ENTERPRISES, LLC"},"total_contract_value":30143.74},{"award_date":"2026-05-26","description":"REPLACE + BROKEN WINDOWS AT RICHARD SHEPPARD ARNOLD ANNEX 600 W CAPITOL AVE, LITTLE + ROCK, AR 72201 LITTLE ROCK FEDERAL BUILDING 700 W CAPITOL AVE, LITTLE ROCK, + AR 72201, AND RICHARD SHEPPARD ARNOLD ANNEX 600 W CAPITOL AVE, LITTLE ROCK, + AR 72201","fiscal_year":2026,"key":"CONT_AWD_47PD5326F0188_4740_47PH0224A0004_4740","piid":"47PD5326F0188","recipient":{"display_name":"SOUTH + DADE AIR CONDITIONING & REFRIGERATION INC"},"total_contract_value":19588.45},{"award_date":"2026-05-26","description":"INSPIRED + FLIGHT DRONES PURCHASE","fiscal_year":2026,"key":"CONT_AWD_80NSSC26P0699_8000_-NONE-_-NONE-","piid":"80NSSC26P0699","recipient":{"display_name":"B + & H FOTO & ELECTRONICS CORP."},"total_contract_value":50000.0}]}' + headers: + CF-RAY: + - a02d5474191ead20-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:48 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=io%2BbhtW3WQk%2BmtqDKqoB%2F593KeOl1JcrWrrr%2FzIhrnt8QULV2X%2FQCzo2uyoZIvo7QGgQiRbcQVKwuS98Ai7urLyuTPHsOlKC2Ao0Qfjyki250LswuzCa1%2FeR0JUmO6meHwbYRKciGgsL7%2Bfuzlpv"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '8036' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.080s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '976' + x-ratelimit-burst-reset: + - '11' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999902' + x-ratelimit-daily-reset: + - '40751' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '976' + x-ratelimit-reset: + - '11' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_decimal_field_parsing_edge_cases b/tests/cassettes/TestEdgeCasesIntegration.test_decimal_field_parsing_edge_cases index 49dd9c0..22efd45 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_decimal_field_parsing_edge_cases +++ b/tests/cassettes/TestEdgeCasesIntegration.test_decimal_field_parsing_edge_cases @@ -123,4 +123,130 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=50&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=50&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside&cursor=WyIyMDI2LTA1LTI2IiwgImU3MGUzOTY5LTdmNDQtNTg0Mi05MDljLWNhOGQ4YzAzOWIxMSJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImU3MGUzOTY5LTdmNDQtNTg0Mi05MDljLWNhOGQ4YzAzOWIxMSJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","base_and_exercised_options_value":13450.82,"fiscal_year":2026,"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","naics_code":811210,"piid":"36C26126P0571","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"R8CPTNLLAJJ7","display_name":"CARDIOQUIP, + LLC"},"set_aside":null,"total_contract_value":26901.64},{"award_date":"2026-05-26","base_and_exercised_options_value":369600.0,"fiscal_year":2026,"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","naics_code":541370,"piid":"693JJ326P000012","place_of_performance":{"country_code":"USA","state_code":"IN"},"recipient":{"uei":"ZR6EPV2TYJS1","display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":369600.0},{"award_date":"2026-05-26","base_and_exercised_options_value":27500.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","naics_code":561210,"piid":"47PE5226F0113","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"ZVX7ZJ5WZ576","display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"set_aside":null,"total_contract_value":27500.0},{"award_date":"2026-05-26","base_and_exercised_options_value":83384.92,"fiscal_year":2026,"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","naics_code":541519,"piid":"89503026FWA401176","place_of_performance":{"country_code":"USA","state_code":"CO"},"recipient":{"uei":"CGE8ABMZLZN9","display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"set_aside":"SBA","total_contract_value":83384.92},{"award_date":"2026-05-26","base_and_exercised_options_value":68000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C24126P0441","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"MR4FCKSNGRC1","display_name":"Edwards + Lifesciences LLC"},"set_aside":null,"total_contract_value":68000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":96427.99,"fiscal_year":2026,"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","naics_code":541519,"piid":"89603026F0034","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"FBRMCGPMN963","display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"set_aside":null,"total_contract_value":96427.99},{"award_date":"2026-05-26","base_and_exercised_options_value":105000.9,"fiscal_year":2026,"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","naics_code":561210,"piid":"47PC5226F0297","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"X6E8D5J5BZF7","display_name":"DAE + SUNG LLC"},"set_aside":null,"total_contract_value":105000.9},{"award_date":"2026-05-26","base_and_exercised_options_value":49851.72,"fiscal_year":2026,"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","naics_code":541519,"piid":"1331L526FNB160100","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"R98MW4ZKUUK3","display_name":"GOVERNMENT + ACQUISITIONS INC"},"set_aside":"SBA","total_contract_value":49851.72},{"award_date":"2026-05-26","base_and_exercised_options_value":35000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","naics_code":221320,"piid":"36C24626P0712","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"KT5TXCYQQ4U5","display_name":"Kokowski + Plumbing LLC"},"set_aside":null,"total_contract_value":35000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":45058.8,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","naics_code":541519,"piid":"80NSSC26FA425","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"HQAJMSZDK666","display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":45058.8},{"award_date":"2026-05-26","base_and_exercised_options_value":3864.0,"fiscal_year":2026,"key":"CONT_AWD_70Z08026PMECP0119_7008_-NONE-_-NONE-","naics_code":532412,"piid":"70Z08026PMECP0119","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"P575L8A9E5K5","display_name":"BSE + PERFORMANCE, LLC"},"set_aside":"SBA","total_contract_value":3864.0},{"award_date":"2026-05-26","base_and_exercised_options_value":33963.0,"fiscal_year":2026,"key":"CONT_AWD_15B31526F00000067_1540_47QMCB23D0009_4732","naics_code":481211,"piid":"15B31526F00000067","place_of_performance":{"country_code":"USA","state_code":"MA"},"recipient":{"uei":"XL81U4AJ31K9","display_name":"INFLIGHT + MEDICAL SERVICES INTERNATIONAL, INC."},"set_aside":null,"total_contract_value":33963.0},{"award_date":"2026-05-26","base_and_exercised_options_value":3647.52,"fiscal_year":2026,"key":"CONT_AWD_70Z03126PALAM0064_7008_-NONE-_-NONE-","naics_code":238220,"piid":"70Z03126PALAM0064","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"CMT2GLZ74JL9","display_name":"BACKFLOW + PREVENTION SPECIALISTS, INC."},"set_aside":null,"total_contract_value":3647.52},{"award_date":"2026-05-26","base_and_exercised_options_value":15359.45,"fiscal_year":2026,"key":"CONT_AWD_36C24426F0298_3600_36F79718D0437_3600","naics_code":339113,"piid":"36C24426F0298","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"RM9SQAVLTVH7","display_name":"PERMOBIL + INC"},"set_aside":null,"total_contract_value":15359.45},{"award_date":"2026-05-26","base_and_exercised_options_value":500000.0,"fiscal_year":2026,"key":"CONT_AWD_15B51926F00000118_1540_36W79720D0001_3600","naics_code":325412,"piid":"15B51926F00000118","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"S1RUKWWRYFL6","display_name":"MCKESSON + CORPORATION"},"set_aside":null,"total_contract_value":500000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":6640.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5326F0160_4740_47PM0024D0007_4740","naics_code":561210,"piid":"47PE5326F0160","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"DV9FJK9Y3MD3","display_name":"CAPITAL + BRAND GROUP LLC"},"set_aside":null,"total_contract_value":6640.0},{"award_date":"2026-05-26","base_and_exercised_options_value":47563.4,"fiscal_year":2026,"key":"CONT_AWD_15B10626F00000129_1540_15BNAS23A00000008_1540","naics_code":315990,"piid":"15B10626F00000129","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"Y7QYC9NNFMW8","display_name":"ASPETTO + INC"},"set_aside":"SBA","total_contract_value":47563.4},{"award_date":"2026-05-26","base_and_exercised_options_value":3565725.15,"fiscal_year":2026,"key":"CONT_AWD_12314426F0181_1205_12314426A0007_1205","naics_code":541512,"piid":"12314426F0181","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"FP3PDFFLNRV9","display_name":"SUMMIT + TECHNOLOGY CONSULTING GROUP, LLC"},"set_aside":null,"total_contract_value":4895725.15},{"award_date":"2026-05-26","base_and_exercised_options_value":29521.6,"fiscal_year":2026,"key":"CONT_AWD_15F06726P0000490_1549_-NONE-_-NONE-","naics_code":562211,"piid":"15F06726P0000490","place_of_performance":{"country_code":"USA","state_code":"OK"},"recipient":{"uei":"J3JKTMT67DW7","display_name":"ENVIRONMENTAL + MANAGEMENT INC"},"set_aside":null,"total_contract_value":29521.6},{"award_date":"2026-05-26","base_and_exercised_options_value":526.0,"fiscal_year":2026,"key":"CONT_AWD_15B21326F00000048_1540_15BFA025A00000039_1540","naics_code":315990,"piid":"15B21326F00000048","place_of_performance":{"country_code":"USA","state_code":"KY"},"recipient":{"uei":"KHFLCLB4BW91","display_name":"Federal + Prison Industries, Inc"},"set_aside":null,"total_contract_value":526.0},{"award_date":"2026-05-26","base_and_exercised_options_value":7278652.0,"fiscal_year":2026,"key":"CONT_AWD_693C7326C000010_6925_-NONE-_-NONE-","naics_code":237310,"piid":"693C7326C000010","place_of_performance":{"country_code":"USA","state_code":"TN"},"recipient":{"uei":"U9NJK8C75BA7","display_name":"APEX + CONSTRUCTION GROUP, LLC"},"set_aside":"HZC","total_contract_value":7278652.0},{"award_date":"2026-05-26","base_and_exercised_options_value":71018.58,"fiscal_year":2026,"key":"CONT_AWD_75N98026F00004_7529_75N99024D00016_7529","naics_code":236220,"piid":"75N98026F00004","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"N1WNB741L7M5","display_name":"TREON + SUPPORT SERVICES JV, LLC"},"set_aside":null,"total_contract_value":71018.58},{"award_date":"2026-05-26","base_and_exercised_options_value":30143.74,"fiscal_year":2026,"key":"CONT_AWD_1331L526F0143_1301_1331L523A13ES0062_1301","naics_code":541519,"piid":"1331L526F0143","place_of_performance":{"country_code":"USA","state_code":"OK"},"recipient":{"uei":"GJJRGECWBFK9","display_name":"CSP + ENTERPRISES, LLC"},"set_aside":"SBA","total_contract_value":30143.74},{"award_date":"2026-05-26","base_and_exercised_options_value":19588.45,"fiscal_year":2026,"key":"CONT_AWD_47PD5326F0188_4740_47PH0224A0004_4740","naics_code":561210,"piid":"47PD5326F0188","place_of_performance":{"country_code":"USA","state_code":"AR"},"recipient":{"uei":"ZJMTAL6MZLU4","display_name":"SOUTH + DADE AIR CONDITIONING & REFRIGERATION INC"},"set_aside":null,"total_contract_value":19588.45},{"award_date":"2026-05-26","base_and_exercised_options_value":50000.0,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26P0699_8000_-NONE-_-NONE-","naics_code":334111,"piid":"80NSSC26P0699","place_of_performance":{"country_code":"USA","state_code":"NY"},"recipient":{"uei":"DXUNWV7UH817","display_name":"B + & H FOTO & ELECTRONICS CORP."},"set_aside":null,"total_contract_value":50000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":61818.8,"fiscal_year":2026,"key":"CONT_AWD_36C10B26F0145_3600_36C10B26D0007_3600","naics_code":561990,"piid":"36C10B26F0145","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"CNBJU7PDKK91","display_name":"CENSIS + TECHNOLOGIES, INC."},"set_aside":null,"total_contract_value":61818.8},{"award_date":"2026-05-26","base_and_exercised_options_value":26995.0,"fiscal_year":2026,"key":"CONT_AWD_36C26326P0483_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26326P0483","place_of_performance":{"country_code":"USA","state_code":"MN"},"recipient":{"uei":"QJXNRJHJLCM5","display_name":"WMK, + LLC"},"set_aside":null,"total_contract_value":26995.0},{"award_date":"2026-05-26","base_and_exercised_options_value":50000.0,"fiscal_year":2026,"key":"CONT_AWD_140P8326F0006_1443_140P8326D0001_1443","naics_code":562991,"piid":"140P8326F0006","place_of_performance":{"country_code":"USA","state_code":"WA"},"recipient":{"uei":"HH6DMXHMD459","display_name":"GLEAMING + SERVICES LLC"},"set_aside":null,"total_contract_value":50000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":54790.32,"fiscal_year":2026,"key":"CONT_AWD_15B21326P00000079_1540_-NONE-_-NONE-","naics_code":532210,"piid":"15B21326P00000079","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"GE5DM4P2EMK9","display_name":"CLEVELAND + BROTHERS EQUIPMENT CO INC"},"set_aside":null,"total_contract_value":54790.32},{"award_date":"2026-05-26","base_and_exercised_options_value":149953.0,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26C0057_8000_-NONE-_-NONE-","naics_code":541715,"piid":"80NSSC26C0057","place_of_performance":{"country_code":"USA","state_code":"IL"},"recipient":{"uei":"JMFVWEY5KLN6","display_name":"QUESTEK + INNOVATIONS LLC"},"set_aside":"SBA","total_contract_value":149953.0},{"award_date":"2026-05-26","base_and_exercised_options_value":1679757.84,"fiscal_year":2026,"key":"CONT_AWD_75F40126F19002_7524_75F40125D00028_7524","naics_code":923120,"piid":"75F40126F19002","place_of_performance":{"country_code":"USA","state_code":"MI"},"recipient":{"uei":"C2AQVDYYUAS7","display_name":"MICHIGAN + DEPARTMENT OF HEALTH AND HUMAN SERVICES"},"set_aside":null,"total_contract_value":1679757.84},{"award_date":"2026-05-26","base_and_exercised_options_value":6798.0,"fiscal_year":2026,"key":"CONT_AWD_15B50326F00000091_1540_NNG15SD28B_8000","naics_code":541519,"piid":"15B50326F00000091","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"YRWSNBVVBK25","display_name":"AlphaSix, + LLC."},"set_aside":null,"total_contract_value":6798.0},{"award_date":"2026-05-26","base_and_exercised_options_value":95100.0,"fiscal_year":2026,"key":"CONT_AWD_1305M426P0010_1330_-NONE-_-NONE-","naics_code":813920,"piid":"1305M426P0010","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"G1J6Q288C5L6","display_name":"NATIONAL + CONTRACT MANAGEMENT ASSOCIATION"},"set_aside":null,"total_contract_value":95100.0},{"award_date":"2026-05-26","base_and_exercised_options_value":300.05,"fiscal_year":2026,"key":"CONT_AWD_88310326F00109_8800_88310323D00002_8800","naics_code":322211,"piid":"88310326F00109","place_of_performance":{"country_code":"USA","state_code":"IA"},"recipient":{"uei":"CJ7JYMXEJZK9","display_name":"TELE-MEDIA + SFP LLC"},"set_aside":null,"total_contract_value":300.05},{"award_date":"2026-05-26","base_and_exercised_options_value":21779.36,"fiscal_year":2026,"key":"CONT_AWD_6973GH26F00884_6920_6973GH22D00010_6920","naics_code":238210,"piid":"6973GH26F00884","place_of_performance":{"country_code":"USA","state_code":"KY"},"recipient":{"uei":"E2W6TRUP2FA8","display_name":"CUSA + CONSULTING LLC"},"set_aside":null,"total_contract_value":21779.36},{"award_date":"2026-05-26","base_and_exercised_options_value":316002.4,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26P0691_8000_-NONE-_-NONE-","naics_code":541519,"piid":"80NSSC26P0691","place_of_performance":{"country_code":"USA","state_code":"MS"},"recipient":{"uei":"SYK6S2JU4NY9","display_name":"CRAWFORD + ELECTRIC SUPPLY COMPANY, LLC"},"set_aside":null,"total_contract_value":316002.4},{"award_date":"2026-05-26","base_and_exercised_options_value":7200.0,"fiscal_year":2026,"key":"CONT_AWD_15JA9426P00000006_1501_-NONE-_-NONE-","naics_code":561499,"piid":"15JA9426P00000006","place_of_performance":{"country_code":"USA","state_code":"VI"},"recipient":{"uei":"J1A7E3HJCMN4","display_name":"CAPITAL + RECORDS MANAGEMENT INC"},"set_aside":null,"total_contract_value":7200.0},{"award_date":"2026-05-26","base_and_exercised_options_value":20161.16,"fiscal_year":2026,"key":"CONT_AWD_47PE5526F0305_4740_47PE0720A0001_4740","naics_code":561210,"piid":"47PE5526F0305","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"J8EZJJDGSGK1","display_name":"SATELLITE + SERVICES INC"},"set_aside":null,"total_contract_value":20161.16},{"award_date":"2026-05-26","base_and_exercised_options_value":49000.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5526F0315_4740_47PN0424A0002_4740","naics_code":561210,"piid":"47PE5526F0315","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"RJ7MF1XTJN88","display_name":"JONES + LANG LASALLE AMERICAS, INC."},"set_aside":null,"total_contract_value":49000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":26195.89,"fiscal_year":2026,"key":"CONT_AWD_12639526F0577_12K3_12639521D0055_12K3","naics_code":541330,"piid":"12639526F0577","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"JJZUXGNQC515","display_name":"Stanley + Consultants, Inc."},"set_aside":null,"total_contract_value":26195.89},{"award_date":"2026-05-26","base_and_exercised_options_value":85631.41,"fiscal_year":2026,"key":"CONT_AWD_89503426PWA002283_8900_-NONE-_-NONE-","naics_code":333120,"piid":"89503426PWA002283","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"DKRAJNL462K6","display_name":"Earle + Kinlaw & Associates, Inc."},"set_aside":"SBA","total_contract_value":85631.41},{"award_date":"2026-05-26","base_and_exercised_options_value":143542.9,"fiscal_year":2026,"key":"CONT_AWD_697DCK26F00496_6920_697DCK22D00002_6920","naics_code":541512,"piid":"697DCK26F00496","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"CL69E7KATK59","display_name":"MICROTECHNOLOGIES + LLC"},"set_aside":null,"total_contract_value":143542.9},{"award_date":"2026-05-26","base_and_exercised_options_value":702065.66,"fiscal_year":2026,"key":"CONT_AWD_70RTAC26FR0000024_7001_NNG15SD04B_8000","naics_code":541519,"piid":"70RTAC26FR0000024","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"ZF2JKBE7K285","display_name":"WESTWIND + COMPUTER PRODUCTS, INC."},"set_aside":null,"total_contract_value":1829931.66},{"award_date":"2026-05-26","base_and_exercised_options_value":91396.03,"fiscal_year":2026,"key":"CONT_AWD_6973GH26F00890_6920_6973GH18D00082_6920","naics_code":335999,"piid":"6973GH26F00890","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"NP3NSFVMNUM3","display_name":"EATON + CORPORATION"},"set_aside":null,"total_contract_value":91396.03},{"award_date":"2026-05-26","base_and_exercised_options_value":68616.0,"fiscal_year":2026,"key":"CONT_AWD_36C26026P0518_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26026P0518","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"QM9SN4VFRF58","display_name":"HANGER, + INC."},"set_aside":null,"total_contract_value":68616.0},{"award_date":"2026-05-26","base_and_exercised_options_value":10338.9,"fiscal_year":2026,"key":"CONT_AWD_70LGLY26PGLB00189_7015_-NONE-_-NONE-","naics_code":721110,"piid":"70LGLY26PGLB00189","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"C7MAWRJDAC16","display_name":"HALL + BRIAN"},"set_aside":"SBA","total_contract_value":10338.9},{"award_date":"2026-05-26","base_and_exercised_options_value":51000.25,"fiscal_year":2026,"key":"CONT_AWD_36C10B26F0158_3600_NNG15SD38B_8000","naics_code":541519,"piid":"36C10B26F0158","place_of_performance":{"country_code":"USA","state_code":"NJ"},"recipient":{"uei":"QGAAEMCMJXQ7","display_name":"REDHAWK + IT SOLUTIONS, LLC"},"set_aside":"SDVOSBC","total_contract_value":172095.24},{"award_date":"2026-05-26","base_and_exercised_options_value":30025.6,"fiscal_year":2026,"key":"CONT_AWD_47PE5626F0285_4740_47PF0022A0006_4740","naics_code":561210,"piid":"47PE5626F0285","place_of_performance":{"country_code":"USA","state_code":"OH"},"recipient":{"uei":"JT38L2GHNN23","display_name":"J''S + ASSOCIATES, LLC"},"set_aside":null,"total_contract_value":30025.6},{"award_date":"2026-05-26","base_and_exercised_options_value":110000.0,"fiscal_year":2026,"key":"CONT_AWD_75N98026P00592_7529_-NONE-_-NONE-","naics_code":325412,"piid":"75N98026P00592","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"MUABDCZXMLG4","display_name":"QUVA + PHARMA, INC."},"set_aside":null,"total_contract_value":110000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":46852.4,"fiscal_year":2026,"key":"CONT_AWD_36C26226P1023_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26226P1023","place_of_performance":{"country_code":"USA","state_code":"MI"},"recipient":{"uei":"GW9FLBWB5625","display_name":"Trillamed + LLC"},"set_aside":null,"total_contract_value":46852.4}]}' + headers: + CF-RAY: + - a02d54711d27acd2-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:47 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=0JPuS9%2B4AssW%2FwjZHBYljJUa2ELVIHhppfvcis5qQ8IJ3IVIsqj8RHZWcFxaP7cWksqhw%2B5wkZvA%2F8j3xDtKFHrDL3wtMKWsPLqq8ClIC%2FyicN%2BsGFsJawvE2Er8QX%2BpNpz07rs6Th0P4bxcoOdo"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '19558' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.206s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '977' + x-ratelimit-burst-reset: + - '12' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999903' + x-ratelimit-daily-reset: + - '40752' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '977' + x-ratelimit-reset: + - '12' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_empty_list_responses b/tests/cassettes/TestEdgeCasesIntegration.test_empty_list_responses index d6165e2..0cd4444 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_empty_list_responses +++ b/tests/cassettes/TestEdgeCasesIntegration.test_empty_list_responses @@ -73,4 +73,80 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&award_date_gte=2099-01-01 + response: + body: + string: '{"count":0,"next":null,"previous":null,"cursor":null,"previous_cursor":null,"results":[]}' + headers: + CF-RAY: + - a02d5475a916a1d1-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:48 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=MoSF3zCIGTD%2BcLBGNG1E2dyeZPfMt1FpdzfSRbMLDEK6UNHKpISGtrEzlMJVbyAFYaIHVnU43jaClBHK0IporOwmuLzN67QGtGGgl%2B7aYhXoE3tLFlg4JHhpdOAQ2LD7gjFaixbaQh%2F17Sm0GPb3"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '89' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.022s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '975' + x-ratelimit-burst-reset: + - '11' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999901' + x-ratelimit-daily-reset: + - '40751' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '975' + x-ratelimit-reset: + - '11' + x-results-counttype: + - exact + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_flattened_responses_with_flat_lists b/tests/cassettes/TestEdgeCasesIntegration.test_flattened_responses_with_flat_lists index 3b1959e..940db58 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_flattened_responses_with_flat_lists +++ b/tests/cassettes/TestEdgeCasesIntegration.test_flattened_responses_with_flat_lists @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&flat=true&flat_lists=true + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&flat=true&flat_lists=true&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient.display_name":"CARDIOQUIP, + LLC","total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient.display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC","total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient.display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC.","total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient.display_name":"ADVANCED + COMPUTER CONCEPTS, INC.","total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient.display_name":"Edwards + Lifesciences LLC","total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d546c3932a215-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:46 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=3f38%2BYesPwdbvj9AOaXEBfY9PQuTuR0dNTp%2Fq8%2BAmuQFPRxJqSV6UdMXvQAJf3sIyWtBG4cB%2FrZDC1V9KAY1xDmxavWeP%2B6GtXzhrDJ%2FloiaIUZX%2BdVeGCmm%2B1jyn7bnQSUq3gP4VBbHgOm5cvB8"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1799' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.032s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '980' + x-ratelimit-burst-reset: + - '13' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999906' + x-ratelimit-daily-reset: + - '40753' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '980' + x-ratelimit-reset: + - '13' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_nested_objects_with_missing_data b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_nested_objects_with_missing_data index 3776075..36bd2c5 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_nested_objects_with_missing_data +++ b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_nested_objects_with_missing_data @@ -221,4 +221,262 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=25&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value%2Cawarding_office%28%2A%29%2Cfunding_office%28%2A%29 + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=25&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value%2Cawarding_office%28%2A%29%2Cfunding_office%28%2A%29&cursor=WyIyMDI2LTA1LTI2IiwgImYxMDE2N2E1LTkzMTItNTc5OS1hNDU1LTUyOTU5Yzg2MTY0MyJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImYxMDE2N2E1LTkzMTItNTc5OS1hNDU1LTUyOTU5Yzg2MTY0MyJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","awarding_office":{"organization_id":"2c45fd53-3590-5589-a188-1f34917b3de5","office_code":"36C261","office_name":"261-NETWORK + CONTRACT OFFICE 21 (36C261)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"description":"CARDIOQUIP SERVICES","funding_office":{"organization_id":"2c45fd53-3590-5589-a188-1f34917b3de5","office_code":"00261","office_name":"261-NETWORK + CONTRACT OFFICE 21 (36C261)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","awarding_office":{"organization_id":"bb941157-db91-59e5-9a2b-bd50ebf75b2b","office_code":"693JJ3","office_name":"693JJ3 + ACQUISITION AND GRANTS MGT","agency_code":"6925","agency_name":"FEDERAL HIGHWAY + ADMINISTRATION","department_code":"069","department_name":"TRANSPORTATION, + DEPARTMENT OF"},"description":"NON-PERSONAL SERVICES TO DEFINE A PRODUCT SPECIFICATION + AND CREATE A CONCEPTUAL MODEL OF THE NATIONAL ROAD NETWORK (NRN).","funding_office":{"organization_id":"c62185c4-7e9a-523a-bb84-18bd8fd6c9ba","office_code":"693JH8","office_name":"FHWA + OF OF POLICY GOVERNMENTAL AF","agency_code":"6925","agency_name":"FEDERAL + HIGHWAY ADMINISTRATION","department_code":"069","department_name":"TRANSPORTATION, + DEPARTMENT OF"},"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"828b5738-4ca2-5644-bbd4-6b0acae5746a","office_code":"47PE52","office_name":"PBS + PROJECT DELIVERY CENTRAL - BRANCH B","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"description":"URGENT REPLACE RECESSED LED PULSATING LIGHTING, + U.S. SECRET SERVICES (USSS) HEADQUARTERS BUILDING, 950 H STREET, NW, WASHINGTON, + DC 20223.","funding_office":{"organization_id":"828b5738-4ca2-5644-bbd4-6b0acae5746a","office_code":"47PE52","office_name":"PBS + PROJECT DELIVERY CENTRAL - BRANCH B","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"430af738-027d-5243-9d57-7c1ee23abe15","office_code":"895030","office_name":"WESTERN-CORPORATE + SERVICES OFFICE","agency_code":"8900","agency_name":"ENERGY, DEPARTMENT OF","department_code":"089","department_name":"ENERGY, + DEPARTMENT OF"},"description":"ESRI ARCGIS MAINTENANCE","funding_office":{"organization_id":"d0c9cdc6-65c0-5a07-aa60-8b2ad68618d3","office_code":"895005","office_name":"WESTERN + AREA POWER ADMINISTRATION","agency_code":"8900","agency_name":"ENERGY, DEPARTMENT + OF","department_code":"089","department_name":"ENERGY, DEPARTMENT OF"},"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","awarding_office":{"organization_id":"41755914-5162-5f81-bc5e-ceafc6c3beae","office_code":"36C241","office_name":"241-NETWORK + CONTRACT OFFICE 01 (36C241)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"description":"SURGICAL IMPLANT - HEART TAVR","funding_office":{"organization_id":"2c55b1eb-31c7-5a0d-a1af-7df16d769c15","office_code":"00689","office_name":"689-WEST + HAVEN (00689)(36C689)","agency_code":"3600","agency_name":"VETERANS AFFAIRS, + DEPARTMENT OF","department_code":"036","department_name":"VETERANS AFFAIRS, + DEPARTMENT OF"},"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"c207a43b-ebd0-59cf-bb47-75d28c3b0269","office_code":"896030","office_name":"FEDERAL + ENERGY REGULATORY COMM","agency_code":"8960","agency_name":"FEDERAL ENERGY + REGULATORY COMMISSION","department_code":"089","department_name":"ENERGY, + DEPARTMENT OF"},"description":"TENEBALE SOFTWARE","funding_office":{"organization_id":"c207a43b-ebd0-59cf-bb47-75d28c3b0269","office_code":"FERC1","office_name":"FEDERAL + ENERGY REGULATORY COMM","agency_code":"8960","agency_name":"FEDERAL ENERGY + REGULATORY COMMISSION","department_code":"089","department_name":"ENERGY, + DEPARTMENT OF"},"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"award_date":"2026-05-26","awarding_office":{"organization_id":"8882f3fc-9e82-51b8-b100-b67598ecb718","office_code":"47PC52","office_name":"PBS + PROJECT DELIVERY EAST - BRANCH B","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"description":"TSFB SOFT PRESSURE WASH LOCATED IN RALEIGH, + NC AT THE TERRY SANFORD FEDERAL BUILDING","funding_office":{"organization_id":"e3bdc84a-67c4-597a-99fc-ab8eac96cbcf","office_code":"CX000","office_name":"PBS + R4 AMD BLUE RIDGE EAST BRANCH","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","piid":"47PC5226F0297","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"award_date":"2026-05-26","awarding_office":{"organization_id":"fe5594f3-1af8-590c-b79f-574de586b7f5","office_code":"1331L5","office_name":"DEPT + OF COMMERCE SSPO","agency_code":"1301","agency_name":"OFFICE OF THE SECRETARY","department_code":"013","department_name":"COMMERCE, + DEPARTMENT OF"},"description":"UIPATH","funding_office":{"organization_id":"a650f112-9017-51dc-9f3d-d317e7e08ecd","office_code":"000SB","office_name":"DEPT + OF COMMERCE NIST","agency_code":"1341","agency_name":"NATIONAL INSTITUTE OF + STANDARDS AND TECHNOLOGY","department_code":"013","department_name":"COMMERCE, + DEPARTMENT OF"},"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","piid":"1331L526FNB160100","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"award_date":"2026-05-26","awarding_office":{"organization_id":"8121825a-560d-58d4-a1e0-9834701e8c4d","office_code":"36C246","office_name":"246-NETWORK + CONTRACTING OFFICE 6 (36C246)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"description":"EMERGENCY SEWER REPAIR","funding_office":{"organization_id":"8121825a-560d-58d4-a1e0-9834701e8c4d","office_code":"00246","office_name":"246-NETWORK + CONTRACTING OFFICE 6 (36C246)","agency_code":"3600","agency_name":"VETERANS + AFFAIRS, DEPARTMENT OF","department_code":"036","department_name":"VETERANS + AFFAIRS, DEPARTMENT OF"},"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","piid":"36C24626P0712","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"a96cb76d-64bf-58f9-b239-80819ee43691","office_code":"80NSSC","office_name":"NASA + SHARED SERVICES CENTER","agency_code":"8000","agency_name":"NATIONAL AERONAUTICS + AND SPACE ADMINISTRATION","department_code":"080","department_name":"NATIONAL + AERONAUTICS AND SPACE ADMINISTRATION"},"description":"HBG-21171-C--G-LIHT + PROCUREMENT","funding_office":{"organization_id":"a96cb76d-64bf-58f9-b239-80819ee43691","office_code":"NSSC0","office_name":"NASA + SHARED SERVICES CENTER","agency_code":"8000","agency_name":"NATIONAL AERONAUTICS + AND SPACE ADMINISTRATION","department_code":"080","department_name":"NATIONAL + AERONAUTICS AND SPACE ADMINISTRATION"},"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","piid":"80NSSC26FA425","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8},{"award_date":"2026-05-26","awarding_office":{"organization_id":"f999f429-24fb-597b-8e39-02606718f27e","office_code":"70Z080","office_name":"SFLC + PROCUREMENT BRANCH 1(00080)","agency_code":"7008","agency_name":"US COAST + GUARD","department_code":"070","department_name":"HOMELAND SECURITY, DEPARTMENT + OF"},"description":"MANLIFT RENTAL","funding_office":{"organization_id":"5be81e88-58fc-50b7-b1fb-fa7251cf9668","office_code":"70Z00F","office_name":"USCG + FINANCE CENTER","agency_code":"7008","agency_name":"US COAST GUARD","department_code":"070","department_name":"HOMELAND + SECURITY, DEPARTMENT OF"},"key":"CONT_AWD_70Z08026PMECP0119_7008_-NONE-_-NONE-","piid":"70Z08026PMECP0119","recipient":{"display_name":"BSE + PERFORMANCE, LLC"},"total_contract_value":3864.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"5fc480a9-bad4-5b58-818f-ba9b9cc5d779","office_code":"15B315","office_name":"FCC + YAZOO CITY","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"description":"MEDICAL AIR LIFT TRANSPORTATION SERVICES FOR INMATE MOORE, + KOREY 29390-009 TO THE FMC BUTNER.","funding_office":{"organization_id":"5fc480a9-bad4-5b58-818f-ba9b9cc5d779","office_code":"15B315","office_name":"FCC + YAZOO CITY","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"key":"CONT_AWD_15B31526F00000067_1540_47QMCB23D0009_4732","piid":"15B31526F00000067","recipient":{"display_name":"INFLIGHT + MEDICAL SERVICES INTERNATIONAL, INC."},"total_contract_value":33963.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"3d027f57-c8f9-54eb-9d9e-87530aecbd9c","office_code":"70Z031","office_name":"BASE + ALAMEDA(00031)","agency_code":"7008","agency_name":"US COAST GUARD","department_code":"070","department_name":"HOMELAND + SECURITY, DEPARTMENT OF"},"description":"BACKFLOW PREVENTION REPAIR AND INSPECTION + SERVICE.","funding_office":{"organization_id":"b36ab5f3-bf63-5f8d-aa95-026a7262dd6e","office_code":"70Z00L","office_name":"11TH + COAST GUARD DISTRICT OFFICE","agency_code":"7008","agency_name":"US COAST + GUARD","department_code":"070","department_name":"HOMELAND SECURITY, DEPARTMENT + OF"},"key":"CONT_AWD_70Z03126PALAM0064_7008_-NONE-_-NONE-","piid":"70Z03126PALAM0064","recipient":{"display_name":"BACKFLOW + PREVENTION SPECIALISTS, INC."},"total_contract_value":3647.52},{"award_date":"2026-05-26","awarding_office":{"organization_id":"ca386d2c-b2f2-52ad-88bf-28590d787224","office_code":"36C244","office_name":"244-NETWORK + CONTRACT OFFICE 4 (36C244)","agency_code":"3600","agency_name":"VETERANS AFFAIRS, + DEPARTMENT OF","department_code":"036","department_name":"VETERANS AFFAIRS, + DEPARTMENT OF"},"description":"MOTORIZED WHEELCHAIR","funding_office":{"organization_id":"3b2b9eb1-42dc-5bcc-a07c-aeaf9f9e283e","office_code":"00646","office_name":"646-PITTSBURGH + (00646)(36C646)","agency_code":"3600","agency_name":"VETERANS AFFAIRS, DEPARTMENT + OF","department_code":"036","department_name":"VETERANS AFFAIRS, DEPARTMENT + OF"},"key":"CONT_AWD_36C24426F0298_3600_36F79718D0437_3600","piid":"36C24426F0298","recipient":{"display_name":"PERMOBIL + INC"},"total_contract_value":15359.45},{"award_date":"2026-05-26","awarding_office":{"organization_id":"9244ae61-79ff-5a30-bdec-5d31af97f8e9","office_code":"15B519","office_name":"FCC + POLLOCK","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"description":"JULY MONTHLY MEDICATIONS","funding_office":{"organization_id":"9244ae61-79ff-5a30-bdec-5d31af97f8e9","office_code":"51911","office_name":"FCC + POLLOCK","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"key":"CONT_AWD_15B51926F00000118_1540_36W79720D0001_3600","piid":"15B51926F00000118","recipient":{"display_name":"MCKESSON + CORPORATION"},"total_contract_value":500000.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"3de70e4f-abca-5379-b19b-80843beba710","office_code":"47PE53","office_name":"PBS + PROJECT DELIVERY CENTRAL - BRANCH C","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"description":"THIS PROJECT IS TO INSULATE THE CHILLED WATER + PIPES IN THE AGRICULTURE TUNNEL LOCATED AT THE HOTD DC0296ZZ WASHINGTON, DC.","funding_office":{"organization_id":"3de70e4f-abca-5379-b19b-80843beba710","office_code":"47PE53","office_name":"PBS + PROJECT DELIVERY CENTRAL - BRANCH C","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"key":"CONT_AWD_47PE5326F0160_4740_47PM0024D0007_4740","piid":"47PE5326F0160","recipient":{"display_name":"CAPITAL + BRAND GROUP LLC"},"total_contract_value":6640.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"aa27a03c-1028-5c13-85e8-980b1691495d","office_code":"15B106","office_name":"FMC + BUTNER","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"description":"STAB/PUNCTURE RESISTANT VESTS MULTIPLE INSTITUTIONS.","funding_office":{"organization_id":"aa27a03c-1028-5c13-85e8-980b1691495d","office_code":"10502","office_name":"FMC + BUTNER","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"key":"CONT_AWD_15B10626F00000129_1540_15BNAS23A00000008_1540","piid":"15B10626F00000129","recipient":{"display_name":"ASPETTO + INC"},"total_contract_value":47563.4},{"award_date":"2026-05-26","awarding_office":{"organization_id":"9913639c-be79-53e5-9dc6-68ee8bc1bb9b","office_code":"123144","office_name":"USDA, + OCP-POD-ACQ-MGMT-BRANCH-FTC","agency_code":"1205","agency_name":"USDA, DEPARTMENTAL + ADMINISTRATION","department_code":"012","department_name":"AGRICULTURE, DEPARTMENT + OF"},"description":"REPLACE THE LEGACY LOAN PROCESSING SYSTEM AND REPLACE + THE LEGACY FINANCIAL SYSTEMS FUNCTIONALITIES WITH THE DEPARTMENT''S FINANCIAL + MANAGEMENT MODERNIZATION INITIATIVE (FMMI) PLATFORM.","funding_office":{},"key":"CONT_AWD_12314426F0181_1205_12314426A0007_1205","piid":"12314426F0181","recipient":{"display_name":"SUMMIT + TECHNOLOGY CONSULTING GROUP, LLC"},"total_contract_value":4895725.15},{"award_date":"2026-05-26","awarding_office":{"organization_id":"ea1c7a92-5838-5641-99ba-1527f4524306","office_code":"15F067","office_name":"FBI-JEH","agency_code":"1549","agency_name":"FEDERAL + BUREAU OF INVESTIGATION","department_code":"015","department_name":"JUSTICE, + DEPARTMENT OF"},"description":"HAZARDOUS MATERIALS DISPOSAL","funding_office":{"organization_id":"59501cd3-cf6c-5445-a7e0-ea22719cc766","office_code":"15F040","office_name":"OKLAHOMA + CITY FIELD OFFICE","agency_code":"1549","agency_name":"FEDERAL BUREAU OF INVESTIGATION","department_code":"015","department_name":"JUSTICE, + DEPARTMENT OF"},"key":"CONT_AWD_15F06726P0000490_1549_-NONE-_-NONE-","piid":"15F06726P0000490","recipient":{"display_name":"ENVIRONMENTAL + MANAGEMENT INC"},"total_contract_value":29521.6},{"award_date":"2026-05-26","awarding_office":{"organization_id":"833645a6-93ba-50ef-b885-80f5ef62d820","office_code":"15B213","office_name":"FCI + SCHUYLKILL","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"description":"BPA CALL FOR EYEWEAR - FCI SCHUYLKILL - QUOTE #20226848","funding_office":{"organization_id":"833645a6-93ba-50ef-b885-80f5ef62d820","office_code":"21303","office_name":"FCI + SCHUYLKILL","agency_code":"1540","agency_name":"FEDERAL PRISON SYSTEM / BUREAU + OF PRISONS","department_code":"015","department_name":"JUSTICE, DEPARTMENT + OF"},"key":"CONT_AWD_15B21326F00000048_1540_15BFA025A00000039_1540","piid":"15B21326F00000048","recipient":{"display_name":"Federal + Prison Industries, Inc"},"total_contract_value":526.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"54f7d5b5-db76-58ea-a9bc-c0caeba97600","office_code":"693C73","office_name":"693C73 + EASTERN FED LANDS DIVISION","agency_code":"6925","agency_name":"FEDERAL HIGHWAY + ADMINISTRATION","department_code":"069","department_name":"TRANSPORTATION, + DEPARTMENT OF"},"description":"PROJECT TN ERFO FS CHRKE804 2020-2(3):\n\nTHIS + PROJECT CONSISTS OF REPAIRING STORM AND FLOOD DAMAGE ON PEAVINE SHEEDS CREEK + ROAD (FS 221). PROJECT WORK INCLUDES GRADING, ROADWAY RESURFACING, DRAIN DIP + CONSTRUCTION, REPLACEMENT OF DRAINAGE CULVERTS, S","funding_office":{"organization_id":"1bf67b18-3c9e-5856-aefd-41609adfdc0a","office_code":"00071","office_name":"FHWA + - EASTERN FEDERAL LANDS DIVISI","agency_code":"6925","agency_name":"FEDERAL + HIGHWAY ADMINISTRATION","department_code":"069","department_name":"TRANSPORTATION, + DEPARTMENT OF"},"key":"CONT_AWD_693C7326C000010_6925_-NONE-_-NONE-","piid":"693C7326C000010","recipient":{"display_name":"APEX + CONSTRUCTION GROUP, LLC"},"total_contract_value":7278652.0},{"award_date":"2026-05-26","awarding_office":{"organization_id":"201820a2-ac25-5873-a0e0-cdb8bb8f3c46","office_code":"75N980","office_name":"NATIONAL + INSTITUTES OF HEALTH OLAO","agency_code":"7529","agency_name":"NATIONAL INSTITUTES + OF HEALTH","department_code":"075","department_name":"HEALTH AND HUMAN SERVICES, + DEPARTMENT OF"},"description":"C201714- LUBE OIL BANK BATTERY REPLACEMENT + FOR COGEN OPERATION POWER BACKUP SYSTEM","funding_office":{"organization_id":"201820a2-ac25-5873-a0e0-cdb8bb8f3c46","office_code":"75N980","office_name":"NATIONAL + INSTITUTES OF HEALTH OLAO","agency_code":"7529","agency_name":"NATIONAL INSTITUTES + OF HEALTH","department_code":"075","department_name":"HEALTH AND HUMAN SERVICES, + DEPARTMENT OF"},"key":"CONT_AWD_75N98026F00004_7529_75N99024D00016_7529","piid":"75N98026F00004","recipient":{"display_name":"TREON + SUPPORT SERVICES JV, LLC"},"total_contract_value":71018.58},{"award_date":"2026-05-26","awarding_office":{"organization_id":"fe5594f3-1af8-590c-b79f-574de586b7f5","office_code":"1331L5","office_name":"DEPT + OF COMMERCE SSPO","agency_code":"1301","agency_name":"OFFICE OF THE SECRETARY","department_code":"013","department_name":"COMMERCE, + DEPARTMENT OF"},"description":"PCS AND ACCESSORIES ORDER","funding_office":{"organization_id":"b9e73bed-4a0b-501b-a1e1-e35ed0e59526","office_code":"NW","office_name":"NATIONAL + WEATHER SERVICE","agency_code":"1330","agency_name":"NATIONAL OCEANIC AND + ATMOSPHERIC ADMINISTRATION","department_code":"013","department_name":"COMMERCE, + DEPARTMENT OF"},"key":"CONT_AWD_1331L526F0143_1301_1331L523A13ES0062_1301","piid":"1331L526F0143","recipient":{"display_name":"CSP + ENTERPRISES, LLC"},"total_contract_value":30143.74},{"award_date":"2026-05-26","awarding_office":{"organization_id":"f968a1d8-6dbf-5e67-b5a6-0dda38aec933","office_code":"47PD53","office_name":"PBS + PROJECT DELIVERY WEST - BRANCH C","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"description":"REPLACE BROKEN WINDOWS AT RICHARD SHEPPARD + ARNOLD ANNEX 600 W CAPITOL AVE, LITTLE ROCK, AR 72201 LITTLE ROCK FEDERAL + BUILDING 700 W CAPITOL AVE, LITTLE ROCK, AR 72201, AND RICHARD SHEPPARD ARNOLD + ANNEX 600 W CAPITOL AVE, LITTLE ROCK, AR 72201","funding_office":{"organization_id":"fe54d20d-6c1c-52ff-9a85-8829c21b97cc","office_code":"47PF00","office_name":"PBS + R5 ACQUISITION MANAGEMENT DIVISION","agency_code":"4740","agency_name":"PUBLIC + BUILDINGS SERVICE","department_code":"047","department_name":"GENERAL SERVICES + ADMINISTRATION"},"key":"CONT_AWD_47PD5326F0188_4740_47PH0224A0004_4740","piid":"47PD5326F0188","recipient":{"display_name":"SOUTH + DADE AIR CONDITIONING & REFRIGERATION INC"},"total_contract_value":19588.45},{"award_date":"2026-05-26","awarding_office":{"organization_id":"a96cb76d-64bf-58f9-b239-80819ee43691","office_code":"80NSSC","office_name":"NASA + SHARED SERVICES CENTER","agency_code":"8000","agency_name":"NATIONAL AERONAUTICS + AND SPACE ADMINISTRATION","department_code":"080","department_name":"NATIONAL + AERONAUTICS AND SPACE ADMINISTRATION"},"description":"INSPIRED FLIGHT DRONES + PURCHASE","funding_office":{"organization_id":"a96cb76d-64bf-58f9-b239-80819ee43691","office_code":"NSSC0","office_name":"NASA + SHARED SERVICES CENTER","agency_code":"8000","agency_name":"NATIONAL AERONAUTICS + AND SPACE ADMINISTRATION","department_code":"080","department_name":"NATIONAL + AERONAUTICS AND SPACE ADMINISTRATION"},"key":"CONT_AWD_80NSSC26P0699_8000_-NONE-_-NONE-","piid":"80NSSC26P0699","recipient":{"display_name":"B + & H FOTO & ELECTRONICS CORP."},"total_contract_value":50000.0}]}' + headers: + CF-RAY: + - a02d546a7e0ead0c-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:46 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=fGuk2mL36EtvsSdn9mnQLIcSSGwCj3WzDlXd%2BsCtVpCmTsae1O3%2F7YlDA5%2BWAdSsHQA8bEG2KF0p7aiDApkNmAGl6S2l4BhHWDb4ArJl9bqj0TMCxD2kNIfSlZIDWM%2FLVikGf9N4pqlCbfFhLfNN"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '21717' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.103s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '981' + x-ratelimit-burst-reset: + - '13' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999907' + x-ratelimit-daily-reset: + - '40753' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '981' + x-ratelimit-reset: + - '13' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_null_missing_fields_in_contracts b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_null_missing_fields_in_contracts index e68136d..51c3189 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_null_missing_fields_in_contracts +++ b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_null_missing_fields_in_contracts @@ -123,4 +123,130 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=50&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=50&shape=key%2Cpiid%2Caward_date%2Cfiscal_year%2Crecipient%28display_name%2Cuei%29%2Ctotal_contract_value%2Cbase_and_exercised_options_value%2Cplace_of_performance%28state_code%2Ccountry_code%29%2Cnaics_code%2Cset_aside&cursor=WyIyMDI2LTA1LTI2IiwgImU3MGUzOTY5LTdmNDQtNTg0Mi05MDljLWNhOGQ4YzAzOWIxMSJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImU3MGUzOTY5LTdmNDQtNTg0Mi05MDljLWNhOGQ4YzAzOWIxMSJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","base_and_exercised_options_value":13450.82,"fiscal_year":2026,"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","naics_code":811210,"piid":"36C26126P0571","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"R8CPTNLLAJJ7","display_name":"CARDIOQUIP, + LLC"},"set_aside":null,"total_contract_value":26901.64},{"award_date":"2026-05-26","base_and_exercised_options_value":369600.0,"fiscal_year":2026,"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","naics_code":541370,"piid":"693JJ326P000012","place_of_performance":{"country_code":"USA","state_code":"IN"},"recipient":{"uei":"ZR6EPV2TYJS1","display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":369600.0},{"award_date":"2026-05-26","base_and_exercised_options_value":27500.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","naics_code":561210,"piid":"47PE5226F0113","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"ZVX7ZJ5WZ576","display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"set_aside":null,"total_contract_value":27500.0},{"award_date":"2026-05-26","base_and_exercised_options_value":83384.92,"fiscal_year":2026,"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","naics_code":541519,"piid":"89503026FWA401176","place_of_performance":{"country_code":"USA","state_code":"CO"},"recipient":{"uei":"CGE8ABMZLZN9","display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"set_aside":"SBA","total_contract_value":83384.92},{"award_date":"2026-05-26","base_and_exercised_options_value":68000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C24126P0441","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"MR4FCKSNGRC1","display_name":"Edwards + Lifesciences LLC"},"set_aside":null,"total_contract_value":68000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":96427.99,"fiscal_year":2026,"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","naics_code":541519,"piid":"89603026F0034","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"FBRMCGPMN963","display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"set_aside":null,"total_contract_value":96427.99},{"award_date":"2026-05-26","base_and_exercised_options_value":105000.9,"fiscal_year":2026,"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","naics_code":561210,"piid":"47PC5226F0297","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"X6E8D5J5BZF7","display_name":"DAE + SUNG LLC"},"set_aside":null,"total_contract_value":105000.9},{"award_date":"2026-05-26","base_and_exercised_options_value":49851.72,"fiscal_year":2026,"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","naics_code":541519,"piid":"1331L526FNB160100","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"R98MW4ZKUUK3","display_name":"GOVERNMENT + ACQUISITIONS INC"},"set_aside":"SBA","total_contract_value":49851.72},{"award_date":"2026-05-26","base_and_exercised_options_value":35000.0,"fiscal_year":2026,"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","naics_code":221320,"piid":"36C24626P0712","place_of_performance":{"country_code":"USA","state_code":"NC"},"recipient":{"uei":"KT5TXCYQQ4U5","display_name":"Kokowski + Plumbing LLC"},"set_aside":null,"total_contract_value":35000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":45058.8,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","naics_code":541519,"piid":"80NSSC26FA425","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"HQAJMSZDK666","display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"set_aside":"SBA","total_contract_value":45058.8},{"award_date":"2026-05-26","base_and_exercised_options_value":3864.0,"fiscal_year":2026,"key":"CONT_AWD_70Z08026PMECP0119_7008_-NONE-_-NONE-","naics_code":532412,"piid":"70Z08026PMECP0119","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"P575L8A9E5K5","display_name":"BSE + PERFORMANCE, LLC"},"set_aside":"SBA","total_contract_value":3864.0},{"award_date":"2026-05-26","base_and_exercised_options_value":33963.0,"fiscal_year":2026,"key":"CONT_AWD_15B31526F00000067_1540_47QMCB23D0009_4732","naics_code":481211,"piid":"15B31526F00000067","place_of_performance":{"country_code":"USA","state_code":"MA"},"recipient":{"uei":"XL81U4AJ31K9","display_name":"INFLIGHT + MEDICAL SERVICES INTERNATIONAL, INC."},"set_aside":null,"total_contract_value":33963.0},{"award_date":"2026-05-26","base_and_exercised_options_value":3647.52,"fiscal_year":2026,"key":"CONT_AWD_70Z03126PALAM0064_7008_-NONE-_-NONE-","naics_code":238220,"piid":"70Z03126PALAM0064","place_of_performance":{"country_code":"USA","state_code":"CA"},"recipient":{"uei":"CMT2GLZ74JL9","display_name":"BACKFLOW + PREVENTION SPECIALISTS, INC."},"set_aside":null,"total_contract_value":3647.52},{"award_date":"2026-05-26","base_and_exercised_options_value":15359.45,"fiscal_year":2026,"key":"CONT_AWD_36C24426F0298_3600_36F79718D0437_3600","naics_code":339113,"piid":"36C24426F0298","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"RM9SQAVLTVH7","display_name":"PERMOBIL + INC"},"set_aside":null,"total_contract_value":15359.45},{"award_date":"2026-05-26","base_and_exercised_options_value":500000.0,"fiscal_year":2026,"key":"CONT_AWD_15B51926F00000118_1540_36W79720D0001_3600","naics_code":325412,"piid":"15B51926F00000118","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"S1RUKWWRYFL6","display_name":"MCKESSON + CORPORATION"},"set_aside":null,"total_contract_value":500000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":6640.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5326F0160_4740_47PM0024D0007_4740","naics_code":561210,"piid":"47PE5326F0160","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"DV9FJK9Y3MD3","display_name":"CAPITAL + BRAND GROUP LLC"},"set_aside":null,"total_contract_value":6640.0},{"award_date":"2026-05-26","base_and_exercised_options_value":47563.4,"fiscal_year":2026,"key":"CONT_AWD_15B10626F00000129_1540_15BNAS23A00000008_1540","naics_code":315990,"piid":"15B10626F00000129","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"Y7QYC9NNFMW8","display_name":"ASPETTO + INC"},"set_aside":"SBA","total_contract_value":47563.4},{"award_date":"2026-05-26","base_and_exercised_options_value":3565725.15,"fiscal_year":2026,"key":"CONT_AWD_12314426F0181_1205_12314426A0007_1205","naics_code":541512,"piid":"12314426F0181","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"FP3PDFFLNRV9","display_name":"SUMMIT + TECHNOLOGY CONSULTING GROUP, LLC"},"set_aside":null,"total_contract_value":4895725.15},{"award_date":"2026-05-26","base_and_exercised_options_value":29521.6,"fiscal_year":2026,"key":"CONT_AWD_15F06726P0000490_1549_-NONE-_-NONE-","naics_code":562211,"piid":"15F06726P0000490","place_of_performance":{"country_code":"USA","state_code":"OK"},"recipient":{"uei":"J3JKTMT67DW7","display_name":"ENVIRONMENTAL + MANAGEMENT INC"},"set_aside":null,"total_contract_value":29521.6},{"award_date":"2026-05-26","base_and_exercised_options_value":526.0,"fiscal_year":2026,"key":"CONT_AWD_15B21326F00000048_1540_15BFA025A00000039_1540","naics_code":315990,"piid":"15B21326F00000048","place_of_performance":{"country_code":"USA","state_code":"KY"},"recipient":{"uei":"KHFLCLB4BW91","display_name":"Federal + Prison Industries, Inc"},"set_aside":null,"total_contract_value":526.0},{"award_date":"2026-05-26","base_and_exercised_options_value":7278652.0,"fiscal_year":2026,"key":"CONT_AWD_693C7326C000010_6925_-NONE-_-NONE-","naics_code":237310,"piid":"693C7326C000010","place_of_performance":{"country_code":"USA","state_code":"TN"},"recipient":{"uei":"U9NJK8C75BA7","display_name":"APEX + CONSTRUCTION GROUP, LLC"},"set_aside":"HZC","total_contract_value":7278652.0},{"award_date":"2026-05-26","base_and_exercised_options_value":71018.58,"fiscal_year":2026,"key":"CONT_AWD_75N98026F00004_7529_75N99024D00016_7529","naics_code":236220,"piid":"75N98026F00004","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"N1WNB741L7M5","display_name":"TREON + SUPPORT SERVICES JV, LLC"},"set_aside":null,"total_contract_value":71018.58},{"award_date":"2026-05-26","base_and_exercised_options_value":30143.74,"fiscal_year":2026,"key":"CONT_AWD_1331L526F0143_1301_1331L523A13ES0062_1301","naics_code":541519,"piid":"1331L526F0143","place_of_performance":{"country_code":"USA","state_code":"OK"},"recipient":{"uei":"GJJRGECWBFK9","display_name":"CSP + ENTERPRISES, LLC"},"set_aside":"SBA","total_contract_value":30143.74},{"award_date":"2026-05-26","base_and_exercised_options_value":19588.45,"fiscal_year":2026,"key":"CONT_AWD_47PD5326F0188_4740_47PH0224A0004_4740","naics_code":561210,"piid":"47PD5326F0188","place_of_performance":{"country_code":"USA","state_code":"AR"},"recipient":{"uei":"ZJMTAL6MZLU4","display_name":"SOUTH + DADE AIR CONDITIONING & REFRIGERATION INC"},"set_aside":null,"total_contract_value":19588.45},{"award_date":"2026-05-26","base_and_exercised_options_value":50000.0,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26P0699_8000_-NONE-_-NONE-","naics_code":334111,"piid":"80NSSC26P0699","place_of_performance":{"country_code":"USA","state_code":"NY"},"recipient":{"uei":"DXUNWV7UH817","display_name":"B + & H FOTO & ELECTRONICS CORP."},"set_aside":null,"total_contract_value":50000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":61818.8,"fiscal_year":2026,"key":"CONT_AWD_36C10B26F0145_3600_36C10B26D0007_3600","naics_code":561990,"piid":"36C10B26F0145","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"CNBJU7PDKK91","display_name":"CENSIS + TECHNOLOGIES, INC."},"set_aside":null,"total_contract_value":61818.8},{"award_date":"2026-05-26","base_and_exercised_options_value":26995.0,"fiscal_year":2026,"key":"CONT_AWD_36C26326P0483_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26326P0483","place_of_performance":{"country_code":"USA","state_code":"MN"},"recipient":{"uei":"QJXNRJHJLCM5","display_name":"WMK, + LLC"},"set_aside":null,"total_contract_value":26995.0},{"award_date":"2026-05-26","base_and_exercised_options_value":50000.0,"fiscal_year":2026,"key":"CONT_AWD_140P8326F0006_1443_140P8326D0001_1443","naics_code":562991,"piid":"140P8326F0006","place_of_performance":{"country_code":"USA","state_code":"WA"},"recipient":{"uei":"HH6DMXHMD459","display_name":"GLEAMING + SERVICES LLC"},"set_aside":null,"total_contract_value":50000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":54790.32,"fiscal_year":2026,"key":"CONT_AWD_15B21326P00000079_1540_-NONE-_-NONE-","naics_code":532210,"piid":"15B21326P00000079","place_of_performance":{"country_code":"USA","state_code":"PA"},"recipient":{"uei":"GE5DM4P2EMK9","display_name":"CLEVELAND + BROTHERS EQUIPMENT CO INC"},"set_aside":null,"total_contract_value":54790.32},{"award_date":"2026-05-26","base_and_exercised_options_value":149953.0,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26C0057_8000_-NONE-_-NONE-","naics_code":541715,"piid":"80NSSC26C0057","place_of_performance":{"country_code":"USA","state_code":"IL"},"recipient":{"uei":"JMFVWEY5KLN6","display_name":"QUESTEK + INNOVATIONS LLC"},"set_aside":"SBA","total_contract_value":149953.0},{"award_date":"2026-05-26","base_and_exercised_options_value":1679757.84,"fiscal_year":2026,"key":"CONT_AWD_75F40126F19002_7524_75F40125D00028_7524","naics_code":923120,"piid":"75F40126F19002","place_of_performance":{"country_code":"USA","state_code":"MI"},"recipient":{"uei":"C2AQVDYYUAS7","display_name":"MICHIGAN + DEPARTMENT OF HEALTH AND HUMAN SERVICES"},"set_aside":null,"total_contract_value":1679757.84},{"award_date":"2026-05-26","base_and_exercised_options_value":6798.0,"fiscal_year":2026,"key":"CONT_AWD_15B50326F00000091_1540_NNG15SD28B_8000","naics_code":541519,"piid":"15B50326F00000091","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"YRWSNBVVBK25","display_name":"AlphaSix, + LLC."},"set_aside":null,"total_contract_value":6798.0},{"award_date":"2026-05-26","base_and_exercised_options_value":95100.0,"fiscal_year":2026,"key":"CONT_AWD_1305M426P0010_1330_-NONE-_-NONE-","naics_code":813920,"piid":"1305M426P0010","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"G1J6Q288C5L6","display_name":"NATIONAL + CONTRACT MANAGEMENT ASSOCIATION"},"set_aside":null,"total_contract_value":95100.0},{"award_date":"2026-05-26","base_and_exercised_options_value":300.05,"fiscal_year":2026,"key":"CONT_AWD_88310326F00109_8800_88310323D00002_8800","naics_code":322211,"piid":"88310326F00109","place_of_performance":{"country_code":"USA","state_code":"IA"},"recipient":{"uei":"CJ7JYMXEJZK9","display_name":"TELE-MEDIA + SFP LLC"},"set_aside":null,"total_contract_value":300.05},{"award_date":"2026-05-26","base_and_exercised_options_value":21779.36,"fiscal_year":2026,"key":"CONT_AWD_6973GH26F00884_6920_6973GH22D00010_6920","naics_code":238210,"piid":"6973GH26F00884","place_of_performance":{"country_code":"USA","state_code":"KY"},"recipient":{"uei":"E2W6TRUP2FA8","display_name":"CUSA + CONSULTING LLC"},"set_aside":null,"total_contract_value":21779.36},{"award_date":"2026-05-26","base_and_exercised_options_value":316002.4,"fiscal_year":2026,"key":"CONT_AWD_80NSSC26P0691_8000_-NONE-_-NONE-","naics_code":541519,"piid":"80NSSC26P0691","place_of_performance":{"country_code":"USA","state_code":"MS"},"recipient":{"uei":"SYK6S2JU4NY9","display_name":"CRAWFORD + ELECTRIC SUPPLY COMPANY, LLC"},"set_aside":null,"total_contract_value":316002.4},{"award_date":"2026-05-26","base_and_exercised_options_value":7200.0,"fiscal_year":2026,"key":"CONT_AWD_15JA9426P00000006_1501_-NONE-_-NONE-","naics_code":561499,"piid":"15JA9426P00000006","place_of_performance":{"country_code":"USA","state_code":"VI"},"recipient":{"uei":"J1A7E3HJCMN4","display_name":"CAPITAL + RECORDS MANAGEMENT INC"},"set_aside":null,"total_contract_value":7200.0},{"award_date":"2026-05-26","base_and_exercised_options_value":20161.16,"fiscal_year":2026,"key":"CONT_AWD_47PE5526F0305_4740_47PE0720A0001_4740","naics_code":561210,"piid":"47PE5526F0305","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"J8EZJJDGSGK1","display_name":"SATELLITE + SERVICES INC"},"set_aside":null,"total_contract_value":20161.16},{"award_date":"2026-05-26","base_and_exercised_options_value":49000.0,"fiscal_year":2026,"key":"CONT_AWD_47PE5526F0315_4740_47PN0424A0002_4740","naics_code":561210,"piid":"47PE5526F0315","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"RJ7MF1XTJN88","display_name":"JONES + LANG LASALLE AMERICAS, INC."},"set_aside":null,"total_contract_value":49000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":26195.89,"fiscal_year":2026,"key":"CONT_AWD_12639526F0577_12K3_12639521D0055_12K3","naics_code":541330,"piid":"12639526F0577","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"JJZUXGNQC515","display_name":"Stanley + Consultants, Inc."},"set_aside":null,"total_contract_value":26195.89},{"award_date":"2026-05-26","base_and_exercised_options_value":85631.41,"fiscal_year":2026,"key":"CONT_AWD_89503426PWA002283_8900_-NONE-_-NONE-","naics_code":333120,"piid":"89503426PWA002283","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"DKRAJNL462K6","display_name":"Earle + Kinlaw & Associates, Inc."},"set_aside":"SBA","total_contract_value":85631.41},{"award_date":"2026-05-26","base_and_exercised_options_value":143542.9,"fiscal_year":2026,"key":"CONT_AWD_697DCK26F00496_6920_697DCK22D00002_6920","naics_code":541512,"piid":"697DCK26F00496","place_of_performance":{"country_code":"USA","state_code":"DC"},"recipient":{"uei":"CL69E7KATK59","display_name":"MICROTECHNOLOGIES + LLC"},"set_aside":null,"total_contract_value":143542.9},{"award_date":"2026-05-26","base_and_exercised_options_value":702065.66,"fiscal_year":2026,"key":"CONT_AWD_70RTAC26FR0000024_7001_NNG15SD04B_8000","naics_code":541519,"piid":"70RTAC26FR0000024","place_of_performance":{"country_code":"USA","state_code":"VA"},"recipient":{"uei":"ZF2JKBE7K285","display_name":"WESTWIND + COMPUTER PRODUCTS, INC."},"set_aside":null,"total_contract_value":1829931.66},{"award_date":"2026-05-26","base_and_exercised_options_value":91396.03,"fiscal_year":2026,"key":"CONT_AWD_6973GH26F00890_6920_6973GH18D00082_6920","naics_code":335999,"piid":"6973GH26F00890","place_of_performance":{"country_code":"USA","state_code":"FL"},"recipient":{"uei":"NP3NSFVMNUM3","display_name":"EATON + CORPORATION"},"set_aside":null,"total_contract_value":91396.03},{"award_date":"2026-05-26","base_and_exercised_options_value":68616.0,"fiscal_year":2026,"key":"CONT_AWD_36C26026P0518_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26026P0518","place_of_performance":{"country_code":"USA","state_code":"TX"},"recipient":{"uei":"QM9SN4VFRF58","display_name":"HANGER, + INC."},"set_aside":null,"total_contract_value":68616.0},{"award_date":"2026-05-26","base_and_exercised_options_value":10338.9,"fiscal_year":2026,"key":"CONT_AWD_70LGLY26PGLB00189_7015_-NONE-_-NONE-","naics_code":721110,"piid":"70LGLY26PGLB00189","place_of_performance":{"country_code":"USA","state_code":"GA"},"recipient":{"uei":"C7MAWRJDAC16","display_name":"HALL + BRIAN"},"set_aside":"SBA","total_contract_value":10338.9},{"award_date":"2026-05-26","base_and_exercised_options_value":51000.25,"fiscal_year":2026,"key":"CONT_AWD_36C10B26F0158_3600_NNG15SD38B_8000","naics_code":541519,"piid":"36C10B26F0158","place_of_performance":{"country_code":"USA","state_code":"NJ"},"recipient":{"uei":"QGAAEMCMJXQ7","display_name":"REDHAWK + IT SOLUTIONS, LLC"},"set_aside":"SDVOSBC","total_contract_value":172095.24},{"award_date":"2026-05-26","base_and_exercised_options_value":30025.6,"fiscal_year":2026,"key":"CONT_AWD_47PE5626F0285_4740_47PF0022A0006_4740","naics_code":561210,"piid":"47PE5626F0285","place_of_performance":{"country_code":"USA","state_code":"OH"},"recipient":{"uei":"JT38L2GHNN23","display_name":"J''S + ASSOCIATES, LLC"},"set_aside":null,"total_contract_value":30025.6},{"award_date":"2026-05-26","base_and_exercised_options_value":110000.0,"fiscal_year":2026,"key":"CONT_AWD_75N98026P00592_7529_-NONE-_-NONE-","naics_code":325412,"piid":"75N98026P00592","place_of_performance":{"country_code":"USA","state_code":"MD"},"recipient":{"uei":"MUABDCZXMLG4","display_name":"QUVA + PHARMA, INC."},"set_aside":null,"total_contract_value":110000.0},{"award_date":"2026-05-26","base_and_exercised_options_value":46852.4,"fiscal_year":2026,"key":"CONT_AWD_36C26226P1023_3600_-NONE-_-NONE-","naics_code":339113,"piid":"36C26226P1023","place_of_performance":{"country_code":"USA","state_code":"MI"},"recipient":{"uei":"GW9FLBWB5625","display_name":"Trillamed + LLC"},"set_aside":null,"total_contract_value":46852.4}]}' + headers: + CF-RAY: + - a02d5466f832a1cf-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:46 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=puIOWs40YxDbCq%2BhE47dpyWJ793CL4n20afHQLfb%2BefJUFbKm3KF0rutGoY1WBb6e8gKxhA3x268rFxlj5vPYpRg%2FOuJbgDi%2F%2FOg%2FGa19LVJZ%2BBjyGaqbNpTSlHkpFLyo5Q%2FYdT28Zjf%2BlZImbFq"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '19558' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.228s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '982' + x-ratelimit-burst-reset: + - '13' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999908' + x-ratelimit-daily-reset: + - '40753' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '982' + x-ratelimit-reset: + - '13' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_with_minimal_shape_sparse_data b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_with_minimal_shape_sparse_data index 918d165..9b2ea0e 100644 --- a/tests/cassettes/TestEdgeCasesIntegration.test_parsing_with_minimal_shape_sparse_data +++ b/tests/cassettes/TestEdgeCasesIntegration.test_parsing_with_minimal_shape_sparse_data @@ -83,4 +83,90 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=10&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImY5ZDc4OTJmLTI1MGItNTcxYy04ZjI2LTlhMjYwMDBhYTk1NCJd","previous_cursor":null,"results":[{"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0},{"key":"CONT_AWD_89603026F0034_8960_NNG15SD76B_8000","piid":"89603026F0034","recipient":{"display_name":"ENTERPRISE + TECHNOLOGY SOLUTIONS, INC."},"total_contract_value":96427.99},{"key":"CONT_AWD_47PC5226F0297_4740_47PN0423A0004_4740","piid":"47PC5226F0297","recipient":{"display_name":"DAE + SUNG LLC"},"total_contract_value":105000.9},{"key":"CONT_AWD_1331L526FNB160100_1341_1331L521A13ES0015_1301","piid":"1331L526FNB160100","recipient":{"display_name":"GOVERNMENT + ACQUISITIONS INC"},"total_contract_value":49851.72},{"key":"CONT_AWD_36C24626P0712_3600_-NONE-_-NONE-","piid":"36C24626P0712","recipient":{"display_name":"Kokowski + Plumbing LLC"},"total_contract_value":35000.0},{"key":"CONT_AWD_80NSSC26FA425_8000_NNG15SD42B_8000","piid":"80NSSC26FA425","recipient":{"display_name":"ARCHITECHTURE + SOLUTIONS LLC"},"total_contract_value":45058.8}]}' + headers: + CF-RAY: + - a02d546f5e041425-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:47 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=yYj7OM8AFSswtppC0pDXswKj3r34MP11u8jDFCIsHDH2a9g3ZkQny%2BwUXTNXkBTs0wY1dn4M5Q5M%2FIE5AnqAIyPPkxPgbJWl%2FyDCF6dgBReBmsFbxJPYoAl0jTcvrT6QHcadwAmSUTKeWSHopl6x"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '2065' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.045s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '978' + x-ratelimit-burst-reset: + - '12' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999904' + x-ratelimit-daily-reset: + - '40752' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '978' + x-ratelimit-reset: + - '12' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[custom-key,piid,description] b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[custom-key,piid,description] index 80fec4b..b961370 100644 --- a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[custom-key,piid,description] +++ b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[custom-key,piid,description] @@ -78,4 +78,87 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Cdescription + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Cdescription&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571"},{"description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012"},{"description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113"},{"description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176"},{"description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441"}]}' + headers: + CF-RAY: + - a02d5478cfc36abb-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:48 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=uEggDyORxsbHZ7k4eMFwwghVM8QhLnMM0djoxU6KXc%2FmDtHHKq%2FBJ9YJyNl3JYKCoSfkK8wAlRUq7mSYTfMJyFhIo6LEm27C9wfflvYOWKxVexSAhE3%2Fblby1TZpbCU0u60YFjqfKqAXsdFEA7zu"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1131' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.020s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '973' + x-ratelimit-burst-reset: + - '11' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999899' + x-ratelimit-daily-reset: + - '40751' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '973' + x-ratelimit-reset: + - '11' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] index a813e67..8ac79bb 100644 --- a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] +++ b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[minimal-key,piid,award_date,recipient(display_name),description,total_contract_value] @@ -83,4 +83,92 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Caward_date%2Crecipient%28display_name%29%2Cdescription%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"award_date":"2026-05-26","description":"CARDIOQUIP + SERVICES","key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"award_date":"2026-05-26","description":"NON-PERSONAL + SERVICES TO DEFINE A PRODUCT SPECIFICATION AND CREATE A CONCEPTUAL MODEL OF + THE NATIONAL ROAD NETWORK (NRN).","key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"award_date":"2026-05-26","description":"URGENT + REPLACE RECESSED LED PULSATING LIGHTING, U.S. SECRET SERVICES (USSS) HEADQUARTERS + BUILDING, 950 H STREET, NW, WASHINGTON, DC 20223.","key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"award_date":"2026-05-26","description":"ESRI + ARCGIS MAINTENANCE","key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"award_date":"2026-05-26","description":"SURGICAL + IMPLANT - HEART TAVR","key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d54775db9a206-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:48 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=2J3PF%2BTuqRcFizzz8rsBH2AjX6ni5TdhNswAbrfUMpIqnnRutNIQHTzKkq8SN1Dvlwgx7oUoeXckqJW9BQ6z191PPrl2IprVtFDfSD0GbtJARIquyNV4mzfkrHszo4S9EDJGPfVWnyimyoaj7MVF"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1793' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.040s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '974' + x-ratelimit-burst-reset: + - '11' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999900' + x-ratelimit-daily-reset: + - '40751' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '974' + x-ratelimit-reset: + - '11' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[ultra_minimal-key,piid,recipient(display_name),total_contract_value] b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[ultra_minimal-key,piid,recipient(display_name),total_contract_value] index 018d6bd..d48b809 100644 --- a/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[ultra_minimal-key,piid,recipient(display_name),total_contract_value] +++ b/tests/cassettes/TestTypeHintsIntegration.test_contracts_dict_access[ultra_minimal-key,piid,recipient(display_name),total_contract_value] @@ -78,4 +78,85 @@ interactions: status: code: 200 message: OK +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - tango.makegov.com + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value + response: + body: + string: '{"count":84625240,"next":"https://tango.makegov.com/api/contracts/?limit=5&shape=key%2Cpiid%2Crecipient%28display_name%29%2Ctotal_contract_value&cursor=WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous":null,"cursor":"WyIyMDI2LTA1LTI2IiwgImZkNGYxMzA4LTY0NzUtNWViOS05ZTQzLTFmZDNiYTA5ZGYzNiJd","previous_cursor":null,"results":[{"key":"CONT_AWD_36C26126P0571_3600_-NONE-_-NONE-","piid":"36C26126P0571","recipient":{"display_name":"CARDIOQUIP, + LLC"},"total_contract_value":26901.64},{"key":"CONT_AWD_693JJ326P000012_6925_-NONE-_-NONE-","piid":"693JJ326P000012","recipient":{"display_name":"CULTIVATE + GEOSPATIAL SOLUTIONS LLC"},"total_contract_value":369600.0},{"key":"CONT_AWD_47PE5226F0113_4740_47PF5126D0008_4740","piid":"47PE5226F0113","recipient":{"display_name":"MELWOOD + HORTICULTURAL TRAINING CENTER, INC."},"total_contract_value":27500.0},{"key":"CONT_AWD_89503026FWA401176_8900_NNG15SD60B_8000","piid":"89503026FWA401176","recipient":{"display_name":"ADVANCED + COMPUTER CONCEPTS, INC."},"total_contract_value":83384.92},{"key":"CONT_AWD_36C24126P0441_3600_-NONE-_-NONE-","piid":"36C24126P0441","recipient":{"display_name":"Edwards + Lifesciences LLC"},"total_contract_value":68000.0}]}' + headers: + CF-RAY: + - a02d5479fe1dff48-MSP + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Thu, 28 May 2026 12:40:49 GMT + Nel: + - '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}' + Report-To: + - '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=bPty6KR8rRHmyjc7uogA7Q0N7N0GuYzuDUoHhycZ%2FBaPNs2rYwqpy%2B4knZpegPGyP5qdFIWN1yVQPTqBOElMmg2PNBxAtegVdG7sIbnzTCP%2FuYqSpZW1xyQf5wBo3o9Tg4nZ07WMVo1bn1L%2BOvEV"}]}' + Server: + - cloudflare + Transfer-Encoding: + - chunked + allow: + - GET, HEAD, OPTIONS + cf-cache-status: + - DYNAMIC + content-length: + - '1221' + cross-origin-opener-policy: + - same-origin + referrer-policy: + - same-origin + vary: + - Accept, Cookie + x-content-type-options: + - nosniff + x-execution-time: + - 0.036s + x-frame-options: + - DENY + x-ratelimit-burst-limit: + - '1000' + x-ratelimit-burst-remaining: + - '972' + x-ratelimit-burst-reset: + - '10' + x-ratelimit-daily-limit: + - '2000000' + x-ratelimit-daily-remaining: + - '1999898' + x-ratelimit-daily-reset: + - '40750' + x-ratelimit-limit: + - '1000' + x-ratelimit-remaining: + - '972' + x-ratelimit-reset: + - '10' + x-results-counttype: + - approximate + status: + code: 200 + message: OK version: 1 From 01e1e79079c465e2f949d94d30881efdec7daf36 Mon Sep 17 00:00:00 2001 From: "V. David Zvenyach" Date: Thu, 28 May 2026 08:17:12 -0500 Subject: [PATCH 3/5] fix(shapes): register ContractOrIDVCompetition nested schema alias CONTRACT_SCHEMA/IDV_SCHEMA reference the competition leaf as "ContractOrIDVCompetition" but only "Competition" was registered in EXPLICIT_SCHEMAS, so competition(extent_competed,...) nested selections on contract/IDV shapes raised ShapeValidationError. Register the name as an alias of COMPETITION_SCHEMA. Fixes tango-python#29 item 1. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 4 ++++ tango/shapes/explicit_schemas.py | 4 ++++ tests/test_shapes.py | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a177771..aee04b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `list_contracts`: no longer sends `page=1` to the cursor-only `/api/contracts/` endpoint. When no cursor is supplied, neither `page` nor `cursor` is sent and the API returns the first page by default. +- Shape validation: registered the `ContractOrIDVCompetition` nested schema + (alias of `Competition`) so nested selections like + `competition(extent_competed,number_of_offers_received)` on contract / IDV + shapes validate instead of raising `ShapeValidationError`. ### Added - Budget accounts surface (tango v4.6.8): `list_budget_accounts`, diff --git a/tango/shapes/explicit_schemas.py b/tango/shapes/explicit_schemas.py index 9960e38..ae58128 100644 --- a/tango/shapes/explicit_schemas.py +++ b/tango/shapes/explicit_schemas.py @@ -1487,6 +1487,10 @@ "Location": LOCATION_SCHEMA, "PlaceOfPerformance": PLACE_OF_PERFORMANCE_SCHEMA, "Competition": COMPETITION_SCHEMA, + # Alias: CONTRACT_SCHEMA/IDV_SCHEMA reference the competition leaf as + # "ContractOrIDVCompetition" (the models.py dataclass name); it is the same + # field set as Competition. Register both so nested shape selection resolves. + "ContractOrIDVCompetition": COMPETITION_SCHEMA, "ParentAward": PARENT_AWARD_SCHEMA, "LegislativeMandates": LEGISLATIVE_MANDATES_SCHEMA, "SubawardsSummary": SUBAWARDS_SUMMARY_SCHEMA, diff --git a/tests/test_shapes.py b/tests/test_shapes.py index 8faa42f..3208651 100644 --- a/tests/test_shapes.py +++ b/tests/test_shapes.py @@ -926,6 +926,25 @@ def test_validate_field_suggestions(self): assert "nam" in error_msg assert "Did you mean" in error_msg or "name" in error_msg + def test_competition_nested_shape_on_contract(self): + """Regression (tango-python#29 item 1): CONTRACT_SCHEMA/IDV_SCHEMA + reference the competition leaf as ``ContractOrIDVCompetition``, which + must be registered in EXPLICIT_SCHEMAS so nested field selection like + ``competition(extent_competed,...)`` validates instead of raising + ShapeValidationError.""" + from tango.shapes.explicit_schemas import EXPLICIT_SCHEMAS + + assert "ContractOrIDVCompetition" in EXPLICIT_SCHEMAS + assert "extent_competed" in EXPLICIT_SCHEMAS["ContractOrIDVCompetition"] + + parser = ShapeParser() + spec = parser.parse( + "key,piid,competition(extent_competed,number_of_offers_received)" + ) + # Must not raise — resolves the competition leaf via the alias. + parser.validate(spec, "Contract") + parser.validate(spec, "IDV") + class TestBuiltinModelsRegistration: """Test registration of built-in Tango models""" From b7bb841d5d224d828d8b57c346db1a2fd29609c3 Mon Sep 17 00:00:00 2001 From: "V. David Zvenyach" Date: Thu, 28 May 2026 08:44:57 -0500 Subject: [PATCH 4/5] ci(lint): make mypy advisory and conformance skip without token Re-enabling lint.yml surfaced two pre-existing blockers unrelated to the API sync: ~28 mypy errors that predate CI enforcement, and a conformance job that fails because the private makegov/tango checkout needs an unconfigured TANGO_API_REPO_ACCESS_TOKEN secret. Keep ruff format + ruff check as hard gates (clean today). Make mypy advisory (continue-on-error) pending a debt burn-down. Gate the conformance steps on the token being present so the job skips cleanly (green) instead of failing red, and becomes a real gate automatically once the secret exists. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/lint.yml | 45 ++++++++++++++++++++++++++++---------- CHANGELOG.md | 9 +++++--- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ca84965..d480987 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,16 @@ name: Linting -# Lint gate (ruff format + ruff check + mypy) runs on every PR and push to main. +# Lint gate runs on every PR and push to main. # -# The SDK filter/shape conformance check needs the canonical manifest from the -# private makegov/tango repo. That checkout requires a token the public CI does -# not have, so the conformance step is kept separate and non-blocking -# (continue-on-error) until a TANGO_API_REPO_ACCESS_TOKEN secret is wired up. -# The lint gate below is fully self-contained and blocks the PR on failure. +# - ruff format + ruff check are HARD gates (block the PR). +# - mypy is ADVISORY for now (continue-on-error): the package carries ~28 +# pre-existing type errors that predate CI enforcement. Tracked for burn-down +# in makegov/tango-python; flip `continue-on-error` off once that's clear. +# - The SDK filter/shape conformance check needs the canonical manifest from the +# private makegov/tango repo, which requires a TANGO_API_REPO_ACCESS_TOKEN +# secret the public CI does not have. The conformance job SKIPS cleanly when +# the token is absent (rather than failing red) and becomes a real gate the +# moment the secret is configured. on: workflow_dispatch: push: @@ -38,20 +42,35 @@ jobs: - name: Lint with ruff run: uv run ruff check tango/ - - name: Type check with mypy + - name: Type check with mypy (advisory) + continue-on-error: true run: uv run mypy tango/ conformance: - # Non-blocking: requires checkout of the private makegov/tango repo for the - # canonical filter_shape manifest. Wire a TANGO_API_REPO_ACCESS_TOKEN secret - # and flip continue-on-error to make this a hard gate. + # Requires the canonical filter_shape manifest from the private makegov/tango + # repo. When TANGO_API_REPO_ACCESS_TOKEN is not configured, every real step + # is skipped and the job passes (rather than failing on an empty token). + # Configure the secret to turn this into a hard gate automatically. runs-on: ubuntu-latest - continue-on-error: true steps: + - name: Determine token availability + id: gate + env: + TANGO_API_REPO_ACCESS_TOKEN: ${{ secrets.TANGO_API_REPO_ACCESS_TOKEN }} + run: | + if [ -n "$TANGO_API_REPO_ACCESS_TOKEN" ]; then + echo "ready=true" >> "$GITHUB_OUTPUT" + else + echo "ready=false" >> "$GITHUB_OUTPUT" + echo "::notice::Skipping SDK conformance check — TANGO_API_REPO_ACCESS_TOKEN not configured." + fi + - uses: actions/checkout@v4 + if: steps.gate.outputs.ready == 'true' - name: Checkout tango API repo (manifest source) + if: steps.gate.outputs.ready == 'true' uses: actions/checkout@v4 with: repository: makegov/tango @@ -59,15 +78,19 @@ jobs: token: ${{ secrets.TANGO_API_REPO_ACCESS_TOKEN }} - name: Install uv + if: steps.gate.outputs.ready == 'true' uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python + if: steps.gate.outputs.ready == 'true' run: uv python install 3.12 - name: Install dependencies + if: steps.gate.outputs.ready == 'true' run: uv sync --all-extras - name: Check SDK filter/shape conformance + if: steps.gate.outputs.ready == 'true' run: uv run python scripts/check_filter_shape_conformance.py --manifest tango-api/contracts/filter_shape_contract.json diff --git a/CHANGELOG.md b/CHANGELOG.md index aee04b7..f2206c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,9 +40,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `grant_id` filter kwarg on `list_grants` (supports multi-value OR via `|`). ### CI -- Re-enabled `lint.yml` as a PR + push-to-main gate (ruff format, ruff check, - mypy). The filter/shape conformance check is split into a separate - non-blocking job pending a token for the private manifest repo. +- Re-enabled `lint.yml` as a PR + push-to-main gate. `ruff format` and + `ruff check` are hard gates; `mypy` runs advisory (continue-on-error) pending + burn-down of ~28 pre-existing type errors. The filter/shape conformance check + is a separate job that skips cleanly until a `TANGO_API_REPO_ACCESS_TOKEN` + secret for the private manifest repo is configured, at which point it becomes + a hard gate. ## [1.0.0] - 2026-05-13 From 78a3f0b524ab37fe92332822fa6b0f57ae1e7748 Mon Sep 17 00:00:00 2001 From: "V. David Zvenyach" Date: Fri, 29 May 2026 09:19:04 -0500 Subject: [PATCH 5/5] fix(types): align webhook alert parser with WebhookAlert contract Clears the 4 mypy errors the v1.1.0 branch introduced over main's baseline. _parse_webhook_alert now emits str/dict/Literal values matching the model's declared types (sparse payloads hydrate "" / {} instead of None); cli sample payload cast to dict for assignment. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 5 +++++ tango/client.py | 8 ++++---- tango/webhooks/cli.py | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2206c3..51ce969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed +- `_parse_webhook_alert`: aligned the parser output with the `WebhookAlert` + type contract. Sparse server payloads now hydrate `query_type` and `filters` + as `""` / `{}` (matching their declared non-null types) rather than `None`, + and `status` is typed as the `Literal["active", "paused"]` the model promises. + Clears the four type-check errors this introduced; no change for full payloads. - `Contract` model: removed dead fields (`id`, `award_id`, `recipient_name`, `award_amount`, `awarding_agency`, `funding_agency`) and added the real API fields (`key`, `piid`, `obligated`, `total_contract_value`, diff --git a/tango/client.py b/tango/client.py index 710a7b0..1d6426b 100644 --- a/tango/client.py +++ b/tango/client.py @@ -4,7 +4,7 @@ import warnings from datetime import date, datetime from decimal import Decimal -from typing import Any +from typing import Any, Literal, cast from urllib.parse import urljoin import httpx @@ -3059,13 +3059,13 @@ def _parse_webhook_alert(data: dict[str, Any]) -> WebhookAlert: return WebhookAlert( alert_id=str(data.get("alert_id") or data.get("id") or ""), name=str(data.get("name") or data.get("subscription_name") or ""), - query_type=(str(data["query_type"]) if data.get("query_type") is not None else None), - filters=data.get("filters") or data.get("filter_definition"), + query_type=str(data.get("query_type") or ""), + filters=data.get("filters") or data.get("filter_definition") or {}, frequency=str(data.get("frequency", "realtime")), cron_expression=( str(data["cron_expression"]) if data.get("cron_expression") is not None else None ), - status=str(data.get("status", "active")), + status=cast("Literal['active', 'paused']", data.get("status", "active")), created_at=str(data.get("created_at", "")), last_checked_at=( str(data["last_checked_at"]) if data.get("last_checked_at") is not None else None diff --git a/tango/webhooks/cli.py b/tango/webhooks/cli.py index 04243e0..6d5802a 100644 --- a/tango/webhooks/cli.py +++ b/tango/webhooks/cli.py @@ -12,7 +12,7 @@ import sys import threading from pathlib import Path -from typing import Any +from typing import Any, cast try: import click @@ -197,7 +197,7 @@ def simulate_cmd( from tango import TangoClient client = TangoClient(api_key=api_key, base_url=base_url) - payload = client.get_webhook_sample_payload(event_type=event_type) + payload = cast("dict[str, Any]", client.get_webhook_sample_payload(event_type=event_type)) else: payload = {"events": [{"event_type": "tango.cli.simulated"}]}