Skip to content

Commit 7526908

Browse files
feat(api): update via SDK Studio
1 parent 17f87ee commit 7526908

File tree

9 files changed

+59
-20
lines changed

9 files changed

+59
-20
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'parallel-web/parallel-sdk-python'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: stainless-api/trigger-release-please@v1
19+
id: release
20+
with:
21+
repo: ${{ github.event.repository.full_name }}
22+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
23+
24+
- name: Install Rye
25+
if: ${{ steps.release.outputs.releases_created }}
26+
run: |
27+
curl -sSf https://rye.astral.sh/get | bash
28+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
29+
env:
30+
RYE_VERSION: '0.44.0'
31+
RYE_INSTALL_OPTION: '--yes'
32+
33+
- name: Publish to PyPI
34+
if: ${{ steps.release.outputs.releases_created }}
35+
run: |
36+
bash ./bin/publish-pypi
37+
env:
38+
PYPI_TOKEN: ${{ secrets.PARALLEL_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# This workflow is triggered when a GitHub release is created.
2-
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
3-
# You can run this workflow by navigating to https://www.github.com/shapleyai/parallel-sdk-python/actions/workflows/publish-pypi.yml
1+
# workflow for re-running publishing to PyPI in case it fails for some reason
2+
# you can run this workflow by navigating to https://www.github.com/parallel-web/parallel-sdk-python/actions/workflows/publish-pypi.yml
43
name: Publish PyPI
54
on:
65
workflow_dispatch:
76

8-
release:
9-
types: [published]
10-
117
jobs:
128
publish:
139
name: publish

.github/workflows/release-doctor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
release_doctor:
1010
name: release doctor
1111
runs-on: ubuntu-latest
12-
if: github.repository == 'shapleyai/parallel-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
12+
if: github.repository == 'parallel-web/parallel-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -18,4 +18,5 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21+
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
2122
PYPI_TOKEN: ${{ secrets.PARALLEL_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 3
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-ff0d5939e135b67b3448abf72d8bb0f9a574194337c7c7192453781347a9601d.yml
33
openapi_spec_hash: f3ce85349af6273a671d3d2781c4c877
4-
config_hash: a9e0641049af0c4f45f0a21d26abad6e
4+
config_hash: 95578fd0fb46916a9ee6b87857ee6683

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g
6262
To install via git:
6363

6464
```sh
65-
$ pip install git+ssh://git@github.com/shapleyai/parallel-sdk-python.git
65+
$ pip install git+ssh://git@github.com/parallel-web/parallel-sdk-python.git
6666
```
6767

6868
Alternatively, you can build from source and install the wheel file:
@@ -120,7 +120,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
120120

121121
### Publish with a GitHub workflow
122122

123-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/shapleyai/parallel-sdk-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
123+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/parallel-web/parallel-sdk-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
124124

125125
### Publish manually
126126

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ task_run = response.parse() # get the object that `task_run.execute()` would ha
385385
print(task_run.output)
386386
```
387387

388-
These methods return an [`APIResponse`](https://github.com/shapleyai/parallel-sdk-python/tree/main/src/parallel/_response.py) object.
388+
These methods return an [`APIResponse`](https://github.com/parallel-web/parallel-sdk-python/tree/main/src/parallel/_response.py) object.
389389

390-
The async client returns an [`AsyncAPIResponse`](https://github.com/shapleyai/parallel-sdk-python/tree/main/src/parallel/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
390+
The async client returns an [`AsyncAPIResponse`](https://github.com/parallel-web/parallel-sdk-python/tree/main/src/parallel/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
391391

392392
#### `.with_streaming_response`
393393

@@ -495,7 +495,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
495495

496496
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
497497

498-
We are keen for your feedback; please open an [issue](https://www.github.com/shapleyai/parallel-sdk-python/issues) with questions, bugs, or suggestions.
498+
We are keen for your feedback; please open an [issue](https://www.github.com/parallel-web/parallel-sdk-python/issues) with questions, bugs, or suggestions.
499499

500500
### Determining the installed version
501501

bin/check-release-environment

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
errors=()
44

5+
if [ -z "${STAINLESS_API_KEY}" ]; then
6+
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
7+
fi
8+
59
if [ -z "${PYPI_TOKEN}" ]; then
610
errors+=("The PARALLEL_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
711
fi

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ classifiers = [
3434
]
3535

3636
[project.urls]
37-
Homepage = "https://github.com/shapleyai/parallel-sdk-python"
38-
Repository = "https://github.com/shapleyai/parallel-sdk-python"
37+
Homepage = "https://github.com/parallel-web/parallel-sdk-python"
38+
Repository = "https://github.com/parallel-web/parallel-sdk-python"
3939

4040

4141
[tool.rye]
@@ -122,7 +122,7 @@ path = "README.md"
122122
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
123123
# replace relative links with absolute links
124124
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
125-
replacement = '[\1](https://github.com/shapleyai/parallel-sdk-python/tree/main/\g<2>)'
125+
replacement = '[\1](https://github.com/parallel-web/parallel-sdk-python/tree/main/\g<2>)'
126126

127127
[tool.pytest.ini_options]
128128
testpaths = ["tests"]

src/parallel/resources/task_run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def with_raw_response(self) -> TaskRunResourceWithRawResponse:
4242
This property can be used as a prefix for any HTTP method call to return
4343
the raw response object instead of the parsed content.
4444
45-
For more information, see https://www.github.com/shapleyai/parallel-sdk-python#accessing-raw-response-data-eg-headers
45+
For more information, see https://www.github.com/parallel-web/parallel-sdk-python#accessing-raw-response-data-eg-headers
4646
"""
4747
return TaskRunResourceWithRawResponse(self)
4848

@@ -51,7 +51,7 @@ def with_streaming_response(self) -> TaskRunResourceWithStreamingResponse:
5151
"""
5252
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
5353
54-
For more information, see https://www.github.com/shapleyai/parallel-sdk-python#with_streaming_response
54+
For more information, see https://www.github.com/parallel-web/parallel-sdk-python#with_streaming_response
5555
"""
5656
return TaskRunResourceWithStreamingResponse(self)
5757

@@ -317,7 +317,7 @@ def with_raw_response(self) -> AsyncTaskRunResourceWithRawResponse:
317317
This property can be used as a prefix for any HTTP method call to return
318318
the raw response object instead of the parsed content.
319319
320-
For more information, see https://www.github.com/shapleyai/parallel-sdk-python#accessing-raw-response-data-eg-headers
320+
For more information, see https://www.github.com/parallel-web/parallel-sdk-python#accessing-raw-response-data-eg-headers
321321
"""
322322
return AsyncTaskRunResourceWithRawResponse(self)
323323

@@ -326,7 +326,7 @@ def with_streaming_response(self) -> AsyncTaskRunResourceWithStreamingResponse:
326326
"""
327327
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
328328
329-
For more information, see https://www.github.com/shapleyai/parallel-sdk-python#with_streaming_response
329+
For more information, see https://www.github.com/parallel-web/parallel-sdk-python#with_streaming_response
330330
"""
331331
return AsyncTaskRunResourceWithStreamingResponse(self)
332332

0 commit comments

Comments
 (0)