Skip to content

chore: 🐝 Update SDK - Generate #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b5fa338-9106-4734-abf0-e30d67044a90
management:
docChecksum: 2cabb51a37782b691a9f16fbbf8df52b
docVersion: 1.0.33
speakeasyVersion: 1.300.1
generationVersion: 2.339.1
releaseVersion: 0.23.3
configChecksum: 91a382013e2cda44b21c580620de3424
docChecksum: 5365c99c52e23b044ef9916ecf51b1a9
docVersion: 1.0.35
speakeasyVersion: 1.308.1
generationVersion: 2.342.6
releaseVersion: 0.23.4
configChecksum: 2f71ba62e42129740d3fe7343a6e3d57
repoURL: https://github.com/Unstructured-IO/unstructured-python-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-python-client.git
Expand All @@ -15,7 +15,7 @@ features:
python:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.3
core: 4.6.9
core: 4.6.11
examples: 2.81.3
globalSecurity: 2.83.5
globalSecurityCallbacks: 0.1.0
Expand All @@ -28,13 +28,14 @@ features:
retries: 2.82.2
sdkHooks: 0.1.0
serverIDs: 2.81.1
unions: 2.82.7
unions: 2.82.8
generatedFiles:
- src/unstructured_client/sdkconfiguration.py
- src/unstructured_client/general.py
- src/unstructured_client/sdk.py
- py.typed
- pylintrc
- scripts/publish.sh
- setup.py
- src/unstructured_client/__init__.py
- src/unstructured_client/utils/__init__.py
Expand All @@ -44,6 +45,7 @@ generatedFiles:
- src/unstructured_client/models/errors/sdkerror.py
- src/unstructured_client/models/operations/partition.py
- src/unstructured_client/models/errors/httpvalidationerror.py
- src/unstructured_client/models/errors/servererror.py
- src/unstructured_client/models/shared/validationerror.py
- src/unstructured_client/models/shared/partition_parameters.py
- src/unstructured_client/models/shared/security.py
Expand All @@ -53,7 +55,9 @@ generatedFiles:
- src/unstructured_client/models/shared/__init__.py
- docs/models/operations/partitionrequest.md
- docs/models/operations/partitionresponse.md
- docs/models/errors/detail.md
- docs/models/errors/httpvalidationerror.md
- docs/models/errors/servererror.md
- docs/models/shared/loc.md
- docs/models/shared/validationerror.md
- docs/models/shared/chunkingstrategy.md
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.300.1
speakeasyVersion: 1.308.1
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:a621cbff6995a7d971a973cc7abe784ebf6f6cd5da0c305c06cc1759674cf95a
sourceBlobDigest: sha256:c4508c75038ffde557290925e80d31c169551a1f1ef948833ff7779d63c6881a
sourceRevisionDigest: sha256:2afe2b4cc03c9cec18d5b1b183a58d9d215c4741446a4deac25700bdb98a7aeb
sourceBlobDigest: sha256:5f8888fc7a7d4dd77922a6607261d2b76bb51c2aeda36e98a33d4c3cbdf40f5e
tags:
- latest
- main
targets:
unstructured-python:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:a621cbff6995a7d971a973cc7abe784ebf6f6cd5da0c305c06cc1759674cf95a
sourceBlobDigest: sha256:c4508c75038ffde557290925e80d31c169551a1f1ef948833ff7779d63c6881a
sourceRevisionDigest: sha256:2afe2b4cc03c9cec18d5b1b183a58d9d215c4741446a4deac25700bdb98a7aeb
sourceBlobDigest: sha256:5f8888fc7a7d4dd77922a6607261d2b76bb51c2aeda36e98a33d4c3cbdf40f5e
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,4 +514,14 @@ Based on:
### Generated
- [python v0.23.3] .
### Releases
- [PyPI v0.23.3] https://pypi.org/project/unstructured-client/0.23.3 - .
- [PyPI v0.23.3] https://pypi.org/project/unstructured-client/0.23.3 - .

## 2024-06-15 00:20:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.308.1 (2.342.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.23.4] .
### Releases
- [PyPI v0.23.4] https://pypi.org/project/unstructured-client/0.23.4 - .
15 changes: 11 additions & 4 deletions _test_unstructured_client/integration/test_integration_freemium.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import asyncio
import json
import os
from pathlib import Path

import pytest
from unstructured_client import UnstructuredClient
from unstructured_client.models import shared
from unstructured_client.models.errors.sdkerror import SDKError
from unstructured_client.models.errors import SDKError, ServerError, HTTPValidationError
from unstructured_client.utils.retries import BackoffStrategy, RetryConfig


Expand Down Expand Up @@ -52,14 +53,20 @@ def event_loop():


@pytest.mark.parametrize("split_pdf", [True, False])
@pytest.mark.parametrize("error_code", [500, 403])
def test_partition_handling_server_error(error_code, split_pdf, monkeypatch, doc_path, event_loop):
@pytest.mark.parametrize("error", [(500, ServerError), (403, SDKError), (422, HTTPValidationError)])
def test_partition_handling_server_error(error, split_pdf, monkeypatch, doc_path, event_loop):
filename = "layout-parser-paper-fast.pdf"
import httpx
from unstructured_client.sdkconfiguration import requests_http

error_code, sdk_raises = error

response = requests_http.Response()
response.status_code = error_code
response.headers = {'Content-Type': 'application/json'}
json_data = {"detail": "An error occurred"}
response._content = bytes(json.dumps(json_data), 'utf-8')

monkeypatch.setattr(requests_http.Session, "send", lambda *args, **kwargs: response)
monkeypatch.setattr(httpx.AsyncClient, "send", lambda *args, **kwargs: response)

Expand All @@ -82,5 +89,5 @@ def test_partition_handling_server_error(error_code, split_pdf, monkeypatch, doc
split_pdf_page=split_pdf,
)

with pytest.raises(SDKError, match=f"API error occurred: Status {error_code}"):
with pytest.raises(sdk_raises):
response = client.general.partition(req)
17 changes: 17 additions & 0 deletions docs/models/errors/detail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Detail


## Supported Types

###

```python
detail: List[shared.ValidationError] = /* values here */
```

###

```python
detail: str = /* values here */
```

6 changes: 3 additions & 3 deletions docs/models/errors/httpvalidationerror.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `detail` | List[[shared.ValidationError](../../models/shared/validationerror.md)] | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `detail` | [Optional[errors.Detail]](../../models/errors/detail.md) | :heavy_minus_sign: | N/A |
8 changes: 8 additions & 0 deletions docs/models/errors/servererror.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ServerError


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `detail` | *Optional[str]* | :heavy_minus_sign: | N/A |
Loading
Loading