fix: conformance – explicit filter params and gsa_elibrary_contracts#13
Merged
fix: conformance – explicit filter params and gsa_elibrary_contracts#13
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Part A – Explicit filter parameters: Replaced
**kwargs/**filterswith 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). Keptfilters: SearchFilters | dictfor 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_contractsresource:GsaElibraryContractmodel andShapeConfig.GSA_ELIBRARY_CONTRACTS_MINIMAL.explicit_schemas.py(including nestedidvandrecipient).list_gsa_elibrary_contracts()andget_gsa_elibrary_contract()in the client with filter params: contract_number, key, piid, schedule, search, sin, uei.gsa_elibrary_contracts→list_gsa_elibrary_contractsandGSA_ELIBRARY_CONTRACTS_MINIMALto shape config entries.Conformance script: Added
protests: NonetoRESOURCE_TO_METHODfor completeness (assistance/offices/protests left out of scope).Why
**kwargs), and expectsgsa_elibrary_contractsto have an SDK method.list_contracts(filters=...)continue to work.Testing
uv run ruff format tango/ && uv run ruff check tango/– pass ontango/.uv run pytest tests/ -m "not integration"– 237 passed, 1 skipped.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).