Skip to content

Commit 1afeaee

Browse files
authored
Merge branch 'main' into speakeasy-sdk-regen-1726859579
2 parents a1f0bca + 643ed88 commit 1afeaee

File tree

4 files changed

+10
-37
lines changed

4 files changed

+10
-37
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ install:
1414
python scripts/prepare-readme.py
1515
poetry install
1616

17+
## install-speakeasy-cli: download the speakeasy cli tool
18+
.PHONY: install-speakeasy-cli
19+
install-speakeasy-cli:
20+
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
21+
1722
#################
1823
# Test and Lint #
1924
#################
@@ -48,24 +53,21 @@ lint:
4853
# Speakeasy #
4954
#############
5055

56+
## client-generate: Pull the openapi spec from the free hosted API and generate the SDK
5157
.PHONY: client-generate
5258
client-generate:
5359
wget -nv -q -O openapi.json https://api.unstructured.io/general/openapi.json
5460
speakeasy overlay validate -o ./overlay_client.yaml
5561
speakeasy overlay apply -s ./openapi.json -o ./overlay_client.yaml > ./openapi_client.json
5662
speakeasy generate sdk -s ./openapi_client.json -o ./ -l python
5763

64+
## client-generate-local: Generate the SDK using a local copy of openapi.json
5865
.PHONY: client-generate-local
5966
client-generate-local:
60-
wget -nv -q -O openapi.json http://localhost:5000/general/openapi.json
6167
speakeasy overlay validate -o ./overlay_client.yaml
6268
speakeasy overlay apply -s ./openapi.json -o ./overlay_client.yaml > ./openapi_client.json
6369
speakeasy generate sdk -s ./openapi_client.json -o ./ -l python
6470

65-
.PHONY: patch-custom-code
66-
patch-custom-code:
67-
git apply _custom_code.patch
68-
6971
.PHONY: publish
7072
publish:
7173
./scripts/publish.sh

_custom_code.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

_test_unstructured_client/integration/test_decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ async def mock_send(_, request: httpx.Request, **kwargs):
356356
)
357357

358358
req = operations.PartitionRequest(
359-
shared.PartitionParameters(
359+
partition_parameters=shared.PartitionParameters(
360360
files=files,
361361
split_pdf_page=True,
362362
split_pdf_allow_failed=False,

_test_unstructured_client/unit/test_custom_hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ def mock_post(request):
122122
files = shared.Files(content=f.read(), file_name=filename)
123123

124124
req = operations.PartitionRequest(
125-
shared.PartitionParameters(files=files)
125+
partition_parameters=shared.PartitionParameters(files=files)
126126
)
127127

128128
with pytest.raises(Exception, match=f"Status {status_code}"):
129-
session.general.partition(req, retries=retries)
129+
session.general.partition(request=req, retries=retries)
130130

131131
if expect_retry:
132132
assert number_of_requests[0] > 1

0 commit comments

Comments
 (0)