Skip to content

fix: conformance – explicit filter params and gsa_elibrary_contracts#13

Merged
vdavez merged 2 commits intomainfrom
fix/conformance-warnings
Mar 3, 2026
Merged

fix: conformance – explicit filter params and gsa_elibrary_contracts#13
vdavez merged 2 commits intomainfrom
fix/conformance-warnings

Conversation

@vdavez
Copy link
Contributor

@vdavez vdavez commented Mar 3, 2026

Changes

  • Part A – Explicit filter parameters: Replaced **kwargs / **filters with explicit named parameters on seven list methods so the conformance checker no longer reports "relies on **kwargs for filters":

    • list_contracts – explicit params for award_date, fiscal_year, agencies, ordering, piid, pop dates, solicitation_identifier, plus aliases (keyword, naics_code, psc_code, recipient_name, recipient_uei, set_aside_type, sort, order). Kept filters: SearchFilters | dict for backward compatibility.
    • list_idvs – explicit params for all manifest filter_params (award_date, agencies, idv_type, naics, ordering, piid, psc, recipient, search, set_aside, uei, etc.).
    • list_entities – explicit params (cage_code, naics, name, psc, purpose_of_registration_code, socioeconomic, state, total_awards_obligated_*, uei, zip_code).
    • list_forecasts – explicit params (agency, award_date_, fiscal_year_, modified_*, naics_code, naics_starts_with, search, source_system, status).
    • list_grants – explicit params (agency, applicant_types, cfda_number, funding_, opportunity_number, posted_date_, response_date_*, search, status).
    • list_notices – explicit params (active, agency, naics, notice_type, posted_date_, psc, response_deadline_, search, set_aside, solicitation_number).
    • list_opportunities – explicit params (active, agency, first/last_notice_date_, naics, notice_type, place_of_performance, psc, response_deadline_, search, set_aside, solicitation_number).
  • Part B – GSA eLibrary contracts: Implemented the missing gsa_elibrary_contracts resource:

    • New GsaElibraryContract model and ShapeConfig.GSA_ELIBRARY_CONTRACTS_MINIMAL.
    • Explicit schema in explicit_schemas.py (including nested idv and recipient).
    • list_gsa_elibrary_contracts() and get_gsa_elibrary_contract() in the client with filter params: contract_number, key, piid, schedule, search, sin, uei.
    • Conformance script: added gsa_elibrary_contractslist_gsa_elibrary_contracts and GSA_ELIBRARY_CONTRACTS_MINIMAL to shape config entries.
  • Conformance script: Added protests: None to RESOURCE_TO_METHOD for completeness (assistance/offices/protests left out of scope).

Why

  • Satisfy filter/shape conformance: the checker expects list methods to expose manifest filter params as explicit arguments (no **kwargs), and expects gsa_elibrary_contracts to have an SDK method.
  • Improves IDE autocomplete and type safety for filter parameters.
  • Backward compatible: existing call sites using the same keyword names or list_contracts(filters=...) continue to work.

Testing

  • uv run ruff format tango/ && uv run ruff check tango/ – pass on tango/.
  • uv run pytest tests/ -m "not integration" – 237 passed, 1 skipped.
  • Conformance: uv run python scripts/check_filter_shape_conformance.py --manifest …/tango/contracts/filter_shape_contract.json – 0 errors; only remaining warnings are out-of-scope resources (assistance, offices, protests).

vdavez added 2 commits March 3, 2026 04:43
- Replace **kwargs/**filters with explicit filter parameters on
  list_contracts, list_idvs, list_entities, list_forecasts,
  list_grants, list_notices, list_opportunities
- Add list_gsa_elibrary_contracts and get_gsa_elibrary_contract
- Add GsaElibraryContract model, schema, ShapeConfig constant
- Update conformance script RESOURCE_TO_METHOD and shape entries
- Backward compat: list_contracts(filters=SearchFilters(...)) kept

Made-with: Cursor
Made-with: Cursor
@vdavez vdavez merged commit c44ab9a into main Mar 3, 2026
7 of 8 checks passed
@vdavez vdavez deleted the fix/conformance-warnings branch March 3, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant