Skip to content

Commit

Permalink
update to http handling using new Hishel features
Browse files Browse the repository at this point in the history
  • Loading branch information
parkerhancock committed Dec 5, 2023
1 parent bbeabd4 commit 6348843
Show file tree
Hide file tree
Showing 226 changed files with 37,185 additions and 294,199 deletions.
50,778 changes: 25,588 additions & 25,190 deletions cassettes/README.md.yaml

Large diffs are not rendered by default.

411 changes: 302 additions & 109 deletions docs/cassettes/getting_started.md.yaml

Large diffs are not rendered by default.

514 changes: 23 additions & 491 deletions docs/developer/cassettes/overview.md.yaml

Large diffs are not rendered by default.

6,321 changes: 3,162 additions & 3,159 deletions docs/user_guide/cassettes/assignments.md.yaml

Large diffs are not rendered by default.

526 changes: 258 additions & 268 deletions docs/user_guide/cassettes/epo.md.yaml

Large diffs are not rendered by default.

216 changes: 108 additions & 108 deletions docs/user_guide/cassettes/fulltext.md.yaml

Large diffs are not rendered by default.

162 changes: 129 additions & 33 deletions docs/user_guide/cassettes/global_dossier.md.yaml

Large diffs are not rendered by default.

4,360 changes: 4,044 additions & 316 deletions docs/user_guide/cassettes/us_application.md.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion patent_client/epo/ops/family/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ class FamilyAsyncApi:
async def get_family(cls, number, doc_type="publication", format="docdb"):
url = f"http://ops.epo.org/3.2/rest-services/family/{doc_type}/{format}/{number}"
response = await asession.get(url)

return Family.model_validate(response.text)
108 changes: 95 additions & 13 deletions patent_client/epo/ops/family/cassettes/test_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ interactions:
- request:
body: ''
headers:
Authorization:
- REDACTED
accept:
- '*/*'
accept-encoding:
Expand All @@ -11,7 +13,89 @@ interactions:
host:
- ops.epo.org
user-agent:
- Mozilla/5.0 Python Patent Clientbot/3.2.10 ([email protected])
- Mozilla/5.0 Python Patent Clientbot/4.1.3 ([email protected])
method: GET
uri: http://ops.epo.org/3.2/rest-services/family/publication/docdb/EP1000000A1
response:
content: "<error><code>400</code><message>invalid_access_token</message><description>Access
token is invalid</description>\n\t\t\t\t</error>\n\t\t\t"
headers:
Access-Control-Allow-Headers:
- Authorization
Access-Control-Allow-Methods:
- POST
Access-Control-Allow-Origin:
- '*'
Connection:
- keep-alive
Content-Length:
- '129'
Content-Type:
- application/xml
Date:
- Tue, 05 Dec 2023 03:56:29 GMT
WWW-Authenticate:
- 'Bearer realm="null",error="invalid_token",error_description="oauth.v2.InvalidAccessToken:
Invalid access token"'
http_version: HTTP/1.1
status_code: 400
- request:
body: grant_type=client_credentials
headers:
Authorization:
- REDACTED
content-length:
- '29'
content-type:
- application/x-www-form-urlencoded
host:
- ops.epo.org
method: POST
uri: https://ops.epo.org/3.2/auth/accesstoken
response:
content: "{\n \"refresh_token_expires_in\": \"0\",\n \"api_product_list\": \"[ops-prod]\",\n
\ \"api_product_list_json\": [\n \"ops-prod\"\n ],\n \"organization_name\":
\"epo\",\n \"developer.email\": \"[email protected]\",\n \"token_type\":
\"BearerToken\",\n \"issued_at\": \"1701748590165\",\n \"client_id\": \"wVi6ni5GUZZ3BJqAfLGJb4KPGcYxRktw\",\n
\ \"access_token\": \"Z7ke5OJubey8yUOS4AjznW0SPthF\",\n \"application_name\":
\"8654da0d-5e44-4ea3-addc-e555eff4aee6\",\n \"scope\": \"core\",\n \"expires_in\":
\"1199\",\n \"refresh_count\": \"0\",\n \"status\": \"approved\"\n}"
headers:
Access-Control-Allow-Headers:
- Authorization
Access-Control-Allow-Methods:
- POST
Access-Control-Allow-Origin:
- '*'
Connection:
- keep-alive
Content-Length:
- '523'
Content-Type:
- application/json
Date:
- Tue, 05 Dec 2023 03:56:30 GMT
X-EPO-Client-IP:
- 104.54.160.230
X-EPO-Forwarded:
- '[104.54.160.230]'
http_version: HTTP/1.1
status_code: 200
- request:
body: ''
headers:
Authorization:
- REDACTED
accept:
- '*/*'
accept-encoding:
- gzip, deflate
connection:
- keep-alive
host:
- ops.epo.org
user-agent:
- Mozilla/5.0 Python Patent Clientbot/4.1.3 ([email protected])
method: GET
uri: http://ops.epo.org/3.2/rest-services/family/publication/docdb/EP1000000A1
response:
Expand Down Expand Up @@ -123,10 +207,12 @@ interactions:
- no-cache
Connection:
- keep-alive
Content-Length:
- '8857'
Content-Type:
- application/xml;charset=utf-8
Date:
- Wed, 08 Nov 2023 16:03:45 GMT
- Tue, 05 Dec 2023 03:56:30 GMT
ETag:
- '"042c8b4f48cc4e69d9f34356eb9b71d8e"'
Pragma:
Expand All @@ -139,23 +225,19 @@ interactions:
- Accept
X-API:
- ops-v3.2
X-AnonymousQuotaPerDay-Used:
- '0'
X-AnonymousQuotaPerMinute-Used:
- '3'
X-EPO-Client-IP:
- 38.104.255.66
- 104.54.160.230
X-EPO-Forwarded:
- '[38.104.255.66]'
- '[104.54.160.230]'
X-Elapsed-Time:
- '15'
X-IndividualQuotaPerHour-Used:
- '0'
X-IndividualQuotaPerHour-Used:
- '232993'
X-RegisteredQuotaPerWeek-Used:
- '425156'
- '681862'
X-Throttling-Control:
- overloaded (images=green:50, inpadoc=green:30, other=green:1000, retrieval=green:50,
search=green:5)
- idle (images=green:200, inpadoc=green:60, other=green:1000, retrieval=green:200,
search=green:30)
http_version: HTTP/1.1
status_code: 200
version: 1
18 changes: 8 additions & 10 deletions patent_client/epo/ops/family/cassettes/test_async_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
host:
- ops.epo.org
user-agent:
- Mozilla/5.0 Python Patent Clientbot/3.2.10 ([email protected])
- Mozilla/5.0 Python Patent Clientbot/4.1.3 ([email protected])
method: GET
uri: http://ops.epo.org/3.2/rest-services/family/publication/docdb/EP1000000A1
response:
Expand Down Expand Up @@ -123,10 +123,12 @@ interactions:
- no-cache
Connection:
- keep-alive
Content-Length:
- '8857'
Content-Type:
- application/xml;charset=utf-8
Date:
- Wed, 08 Nov 2023 16:03:46 GMT
- Tue, 05 Dec 2023 03:56:30 GMT
ETag:
- '"042c8b4f48cc4e69d9f34356eb9b71d8e"'
Pragma:
Expand All @@ -139,20 +141,16 @@ interactions:
- Accept
X-API:
- ops-v3.2
X-AnonymousQuotaPerDay-Used:
- '0'
X-AnonymousQuotaPerMinute-Used:
- '5'
X-EPO-Client-IP:
- 38.104.255.66
- 104.54.160.230
X-EPO-Forwarded:
- '[38.104.255.66]'
- '[104.54.160.230]'
X-Elapsed-Time:
- '0'
X-IndividualQuotaPerHour-Used:
- '0'
- '250707'
X-RegisteredQuotaPerWeek-Used:
- '425156'
- '699576'
X-Throttling-Control:
- overloaded (images=green:50, inpadoc=green:30, other=green:1000, retrieval=green:50,
search=green:5)
Expand Down
18 changes: 8 additions & 10 deletions patent_client/epo/ops/family/cassettes/test_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
host:
- ops.epo.org
user-agent:
- Mozilla/5.0 Python Patent Clientbot/3.2.10 ([email protected])
- Mozilla/5.0 Python Patent Clientbot/4.1.3 ([email protected])
method: GET
uri: http://ops.epo.org/3.2/rest-services/family/publication/docdb/EP1000000A1
response:
Expand Down Expand Up @@ -123,10 +123,12 @@ interactions:
- no-cache
Connection:
- keep-alive
Content-Length:
- '8857'
Content-Type:
- application/xml;charset=utf-8
Date:
- Wed, 08 Nov 2023 16:03:45 GMT
- Tue, 05 Dec 2023 03:56:30 GMT
ETag:
- '"042c8b4f48cc4e69d9f34356eb9b71d8e"'
Pragma:
Expand All @@ -139,20 +141,16 @@ interactions:
- Accept
X-API:
- ops-v3.2
X-AnonymousQuotaPerDay-Used:
- '0'
X-AnonymousQuotaPerMinute-Used:
- '4'
X-EPO-Client-IP:
- 38.104.255.66
- 104.54.160.230
X-EPO-Forwarded:
- '[38.104.255.66]'
- '[104.54.160.230]'
X-Elapsed-Time:
- '0'
X-IndividualQuotaPerHour-Used:
- '0'
- '241850'
X-RegisteredQuotaPerWeek-Used:
- '425156'
- '690719'
X-Throttling-Control:
- overloaded (images=green:50, inpadoc=green:30, other=green:1000, retrieval=green:50,
search=green:5)
Expand Down
20 changes: 9 additions & 11 deletions patent_client/epo/ops/legal/cassettes/test_async_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ interactions:
- request:
body: ''
headers:
Authorization:
- REDACTED
accept:
- '*/*'
accept-encoding:
Expand All @@ -13,7 +11,7 @@ interactions:
host:
- ops.epo.org
user-agent:
- Mozilla/5.0 Python Patent Clientbot/3.2.10 ([email protected])
- Mozilla/5.0 Python Patent Clientbot/4.1.3 ([email protected])
method: GET
uri: http://ops.epo.org/3.2/rest-services/legal/publication/docdb/EP1000000A1
response:
Expand Down Expand Up @@ -1006,7 +1004,7 @@ interactions:
Content-Type:
- application/xml;charset=utf-8
Date:
- Tue, 07 Nov 2023 20:07:21 GMT
- Tue, 05 Dec 2023 03:56:31 GMT
ETag:
- '"08854d63fe552f6ebf630d701df47f60f"'
Pragma:
Expand All @@ -1020,18 +1018,18 @@ interactions:
X-API:
- ops-v3.2
X-EPO-Client-IP:
- 37.19.196.132
- 104.54.160.230
X-EPO-Forwarded:
- '[37.19.196.132]'
- '[104.54.160.230]'
X-Elapsed-Time:
- '613'
- '122'
X-IndividualQuotaPerHour-Used:
- '137248'
- '329058'
X-RegisteredQuotaPerWeek-Used:
- '100243'
- '777927'
X-Throttling-Control:
- busy (images=green:100, inpadoc=green:45, other=green:1000, retrieval=green:100,
search=green:15)
- idle (images=green:200, inpadoc=green:60, other=green:1000, retrieval=green:200,
search=green:30)
http_version: HTTP/1.1
status_code: 200
version: 1
Loading

0 comments on commit 6348843

Please sign in to comment.