Skip to content

Commit

Permalink
chore/enable publishing for python client 🎉 (#102)
Browse files Browse the repository at this point in the history
Changes:
* Bring the publish step back to the speakeasy workflow, regenerate the
github action with `speakeasy configure publishing`
* Remove incorrect readme note about parent_id being disabled
* Knock the package version back down to 0.23.0 for continuity with PyPI
versions
  • Loading branch information
awalker4 committed Jun 4, 2024
1 parent 224f9ad commit 0f61907
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 118 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/speakeasy_sdk_publish.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Publish
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
push:
branches:
- main
paths:
- RELEASES.md
push:
branches:
- main
paths:
- RELEASES.md
- '*/RELEASES.md'
jobs:
publish:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
publish:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
3 changes: 3 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ targets:
unstructured-python:
target: python
source: my-source
publish:
pypi:
token: $PYPI_TOKEN
codeSamples:
output: codeSamples.yaml
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
</div>

<h2 align="center">
<p>Python SDK for the Unstructured API</p>
</h2>

This is a Python client for the [Unstructured API](https://unstructured-io.github.io/unstructured/api.html).

<div align="center">

<a
Expand All @@ -24,6 +18,13 @@ This is a Python client for the [Unstructured API](https://unstructured-io.githu

</div>


<h2 align="center">
<p>Python SDK for the Unstructured API</p>
</h2>

This is a Python client for the [Unstructured API](https://unstructured-io.github.io/unstructured/api.html).

<!-- Start SDK Installation [installation] -->
## SDK Installation

Expand Down Expand Up @@ -108,9 +109,6 @@ See the [general partition](/docs/models/shared/partitionparameters.md) page for

In order to speed up processing of long PDF files, `split_pdf_page` can be set to `True` (defaults to `False`). It will cause the PDF to be split at client side, before sending to API, and combining individual responses as single result. This parameter will affect only PDF files, no need to disable it for other filetypes.

Warning: this feature causes the `parent_id` metadata generation in elements to be disabled, as that
requires having context of multiple pages.

The amount of workers utilized for splitting PDFs is dictated by the `split_pdf_concurrency_level` parameter, with a default of 5 and a maximum of 15 to keep resource usage and costs in check. The splitting process leverages `asyncio` to manage concurrency effectively.
The size of each batch of pages (ranging from 2 to 20) is internally determined based on the concurrency level and the total number of pages in the document. Because the splitting process uses `asyncio` the client can encouter event loop issues if it is nested in another async runner, like running in a `gevent` spawned task. Instead, this is safe to run in multiprocessing workers (e.g., using `multiprocessing.Pool` with `fork` context).

Expand Down
98 changes: 1 addition & 97 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,100 +474,4 @@ Based on:
### Generated
- [python v0.22.0] .
### Releases
- [PyPI v0.22.0] https://pypi.org/project/unstructured-client/0.22.0 - .

## 2024-04-04 00:19:30
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.235.2 (2.298.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.23.0] .

## 2024-04-06 00:18:10
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.241.0 (2.300.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.23.1] .

## 2024-05-02 00:19:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.24.0] .

## 2024-05-03 00:19:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.24.1] .

## 2024-05-07 00:19:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.280.1 (2.322.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.24.2] .

## 2024-05-09 00:19:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.285.1 (2.326.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.25.0] .

## 2024-05-10 00:19:28
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.285.3 (2.326.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.25.1] .

## 2024-05-10 14:48:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.285.4 (2.326.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.25.2] .

## 2024-05-18 00:19:44
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.293.1 (2.333.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.25.3] .

## 2024-05-23 00:19:36
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.26.5] .

## 2024-06-03 00:52:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.4 (2.338.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.27.0] .

## 2024-06-04 02:44:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.27.1] .
- [PyPI v0.22.0] https://pypi.org/project/unstructured-client/0.22.0 - .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
python:
version: 0.27.1
version: 0.23.0
additionalDependencies:
dependencies:
deepdiff: '>=6.0'
Expand Down

0 comments on commit 0f61907

Please sign in to comment.