Skip to content

Commit 7caf6c9

Browse files
committed
Entities: federal_obligations as expansion; edge-case test fixes; CHANGELOG
- ENTITIES_COMPREHENSIVE uses federal_obligations(*) expansion (API change) - SHAPES.md: document federal_obligations(*) as expansion - test_parsing_nested_objects_with_missing_data: accept office_code/agency_code and empty nested objects - CHANGELOG: unreleased changes - Cassette updates (incl. comprehensive entities shape) Made-with: Cursor
1 parent 412eac2 commit 7caf6c9

114 files changed

Lines changed: 3982 additions & 9734 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Changed
1616
- Lint CI workflow disabled for push/PR (runs only on manual trigger) until the private `makegov/tango` repo is accessible to the workflow.
1717
- Updated documents to reflect changes since v0.4.0
18+
- Entities: `ENTITIES_COMPREHENSIVE` now uses `federal_obligations(*)` expansion; the API treats federal obligations as an expansion rather than a plain shape field.
19+
- Docs: `SHAPES.md` documents `federal_obligations(*)` as an expansion for entity shaping.
20+
- Integration tests: `test_parsing_nested_objects_with_missing_data` accepts award office fields (`office_code`, `agency_code`, `department_code`) and empty nested objects when the API returns partial data.
1821

1922
## [0.4.1] - 2026-03-03
2023

docs/SHAPES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ contracts = client.list_contracts(shape=DASHBOARD_SHAPE, limit=50)
371371
- `mailing_address(...)` - Mailing address
372372

373373
**Financial:**
374-
- `federal_obligations` - Total federal obligations
374+
- `federal_obligations(*)` - Expansion for total/active federal obligations
375375

376376
## Performance Comparison
377377

tango/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class ShapeConfig:
602602
"business_types,primary_naics,naics_codes,psc_codes,"
603603
"email_address,entity_url,description,capabilities,keywords,"
604604
"physical_address,mailing_address,"
605-
"federal_obligations,congressional_district"
605+
"federal_obligations(*),congressional_district"
606606
)
607607

608608
# Default for list_forecasts()

tests/cassettes/TestAgenciesIntegration.test_get_agency

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,69 +16,61 @@ interactions:
1616
uri: https://tango.makegov.com/api/agencies/4700/
1717
response:
1818
body:
19-
string: '{"code":"4700","name":"General Services Administration","abbreviation":"GSA","department":{"name":"General
20-
Services Administration","code":47}}'
19+
string: '{"code":"4700","name":"General Services Administration","abbreviation":"GSA","department":{"code":47,"name":"General
20+
Services Administration"}}'
2121
headers:
22-
Age:
23-
- '962'
2422
CF-RAY:
25-
- 99f88c10fadea1c5-MSP
26-
Cache-Control:
27-
- max-age=86400
23+
- 9d71a552ba805108-MSP
2824
Connection:
2925
- keep-alive
3026
Content-Type:
3127
- application/json
3228
Date:
33-
- Sun, 16 Nov 2025 17:00:53 GMT
29+
- Wed, 04 Mar 2026 14:42:08 GMT
3430
Nel:
3531
- '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
3632
Report-To:
37-
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=mO7vhOOg6oeZRYvsMT7JOAtLlc23jY0g%2Fv8r9f581zD7bWlvQObVkPrKUh8r8hmkVrtXtudyMLwe0u%2BLO4dG9PBdOfT1nlVgCodcUAuoyj21xGBKaZRH93jY2g%3D%3D"}]}'
33+
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=ll0O3siCO5da%2BBb4BrJq0tr%2BL%2FWVg2%2BcmVFoij0a7qBl2Nb1%2FD5dkRDUDBFjqoIgBwXn7ob3ra7UkW5XpoGNvYi74p0RSxBcC%2B4X8AyjmaqRapK%2FtEapFRgO"}]}'
3834
Server:
3935
- cloudflare
4036
Transfer-Encoding:
4137
- chunked
4238
allow:
4339
- GET, HEAD, OPTIONS
44-
alt-svc:
45-
- h3=":443"; ma=86400
4640
cf-cache-status:
4741
- DYNAMIC
4842
content-length:
4943
- '143'
5044
cross-origin-opener-policy:
5145
- same-origin
52-
expires:
53-
- Mon, 17 Nov 2025 16:44:51 GMT
5446
referrer-policy:
5547
- same-origin
5648
vary:
5749
- Accept, Cookie
5850
x-content-type-options:
5951
- nosniff
6052
x-execution-time:
61-
- 0.009s
53+
- 0.022s
6254
x-frame-options:
6355
- DENY
6456
x-ratelimit-burst-limit:
65-
- '10'
57+
- '1000'
6658
x-ratelimit-burst-remaining:
67-
- '10'
59+
- '966'
6860
x-ratelimit-burst-reset:
69-
- '0'
61+
- '6'
7062
x-ratelimit-daily-limit:
71-
- '100'
63+
- '2000000'
7264
x-ratelimit-daily-remaining:
73-
- '86'
65+
- '1999778'
7466
x-ratelimit-daily-reset:
75-
- '73237'
67+
- '85060'
7668
x-ratelimit-limit:
77-
- '10'
69+
- '1000'
7870
x-ratelimit-remaining:
79-
- '10'
71+
- '966'
8072
x-ratelimit-reset:
81-
- '0'
73+
- '6'
8274
status:
8375
code: 200
8476
message: OK

tests/cassettes/TestAgenciesIntegration.test_list_agencies

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,82 +16,73 @@ interactions:
1616
uri: https://tango.makegov.com/api/agencies/?page=1&limit=10
1717
response:
1818
body:
19-
string: '{"count":1496,"next":"http://tango.makegov.com/api/agencies/?limit=10&page=2","previous":null,"results":[{"code":"21EB","name":"1st
20-
Personnel Command","abbreviation":"","department":{"name":"Department of Defense","code":97}},{"code":"21E2","name":"21st
21-
Theater Army Area Command","abbreviation":"","department":{"name":"Department
22-
of Defense","code":97}},{"code":"21EO","name":"59th Ordnance Brigade","abbreviation":"","department":{"name":"Department
23-
of Defense","code":97}},{"code":"21EN","name":"7th Army Training Command","abbreviation":"","department":{"name":"Department
24-
of Defense","code":97}},{"code":"21P8","name":"8th U.S. Army","abbreviation":"","department":{"name":"Department
25-
of Defense","code":97}},{"code":"0938","name":"Abraham Lincoln Bicentennial
26-
Commission","abbreviation":"ALBC","department":{"name":"Abraham Lincoln Bicentennial
27-
Commission","code":289}},{"code":"9147","name":"Academic Improvement and Teacher
28-
Quality Programs","abbreviation":"AITQ","department":{"name":"Department of
29-
Education","code":91}},{"code":"9532","name":"Access Board","abbreviation":"USAB","department":{"name":"Access
30-
Board","code":310}},{"code":"21AE","name":"Acquisition Executive Support Command
31-
Agency","abbreviation":"","department":{"name":"Department of Defense","code":97}},{"code":"3621","name":"Actuarial
32-
Analysis and Data Development Service","abbreviation":"","department":{"name":"Department
33-
of Veterans Affairs","code":36}}]}'
19+
string: '{"count":1496,"next":"https://tango.makegov.com/api/agencies/?limit=10&page=2","previous":null,"results":[{"code":"21EB","name":"1st
20+
Personnel Command","abbreviation":"","department":{"code":97,"name":"Department
21+
of Defense"}},{"code":"21E2","name":"21st Theater Army Area Command","abbreviation":"","department":{"code":97,"name":"Department
22+
of Defense"}},{"code":"21EO","name":"59th Ordnance Brigade","abbreviation":"","department":{"code":97,"name":"Department
23+
of Defense"}},{"code":"21EN","name":"7th Army Training Command","abbreviation":"","department":{"code":97,"name":"Department
24+
of Defense"}},{"code":"21P8","name":"8th U.S. Army","abbreviation":"","department":{"code":97,"name":"Department
25+
of Defense"}},{"code":"0938","name":"Abraham Lincoln Bicentennial Commission","abbreviation":"ALBC","department":{"code":289,"name":"Abraham
26+
Lincoln Bicentennial Commission"}},{"code":"9147","name":"Academic Improvement
27+
and Teacher Quality Programs","abbreviation":"AITQ","department":{"code":91,"name":"Department
28+
of Education"}},{"code":"9532","name":"Access Board","abbreviation":"USAB","department":{"code":310,"name":"Access
29+
Board"}},{"code":"21AE","name":"Acquisition Executive Support Command Agency","abbreviation":"","department":{"code":97,"name":"Department
30+
of Defense"}},{"code":"3621","name":"Actuarial Analysis and Data Development
31+
Service","abbreviation":"","department":{"code":36,"name":"Department of Veterans
32+
Affairs"}}]}'
3433
headers:
35-
Age:
36-
- '962'
3734
CF-RAY:
38-
- 99f88c0fd8a4a22a-MSP
39-
Cache-Control:
40-
- max-age=86400
35+
- 9d71a5518ca3a225-MSP
4136
Connection:
4237
- keep-alive
4338
Content-Type:
4439
- application/json
4540
Date:
46-
- Sun, 16 Nov 2025 17:00:53 GMT
41+
- Wed, 04 Mar 2026 14:42:08 GMT
4742
Nel:
4843
- '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
4944
Report-To:
50-
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=29%2FzmYVGPWUoxUAiX9%2BwP7Lab2WSYHUIyl8XgOF%2BdxdxldrCYATc9I9k9yko%2Bm5MDHkpoS6OMYDeGkezCurBAMCGQl8XjM4HXyC%2Fv6WYtQc5pSXM%2FFqLxRLGBQ%3D%3D"}]}'
45+
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=dnKLRpygVGBZTkoknxVFAZbvTEAI%2B%2FYRjjRIc1UARxTZ8epk1G4iwniTL58ilXKuA3y7zqmFgVn%2FdCVxia6ZPFRD7u5HBifLxQ1M1sKPDmsmA3mSQrxejWNR"}]}'
5146
Server:
5247
- cloudflare
5348
Transfer-Encoding:
5449
- chunked
5550
allow:
5651
- GET, HEAD, OPTIONS
57-
alt-svc:
58-
- h3=":443"; ma=86400
5952
cf-cache-status:
6053
- DYNAMIC
6154
content-length:
62-
- '1441'
55+
- '1442'
6356
cross-origin-opener-policy:
6457
- same-origin
65-
expires:
66-
- Mon, 17 Nov 2025 16:44:51 GMT
6758
referrer-policy:
6859
- same-origin
6960
vary:
7061
- Accept, Cookie
7162
x-content-type-options:
7263
- nosniff
7364
x-execution-time:
74-
- 0.009s
65+
- 0.015s
7566
x-frame-options:
7667
- DENY
7768
x-ratelimit-burst-limit:
78-
- '10'
69+
- '1000'
7970
x-ratelimit-burst-remaining:
80-
- '10'
71+
- '967'
8172
x-ratelimit-burst-reset:
82-
- '0'
73+
- '6'
8374
x-ratelimit-daily-limit:
84-
- '100'
75+
- '2000000'
8576
x-ratelimit-daily-remaining:
86-
- '86'
77+
- '1999779'
8778
x-ratelimit-daily-reset:
88-
- '73237'
79+
- '85060'
8980
x-ratelimit-limit:
90-
- '10'
81+
- '1000'
9182
x-ratelimit-remaining:
92-
- '10'
83+
- '967'
9384
x-ratelimit-reset:
94-
- '0'
85+
- '6'
9586
status:
9687
code: 200
9788
message: OK

0 commit comments

Comments
 (0)