Skip to content

Commit c33920a

Browse files
feat(api): update via SDK Studio
1 parent 359c8d8 commit c33920a

29 files changed

+139
-100
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 == 'digitalocean/gradientai-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.GRADIENT_AI_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/digitalocean/genai-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/digitalocean/gradientai-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 == 'digitalocean/genai-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
12+
if: github.repository == 'digitalocean/gradientai-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.GRADIENT_AI_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: 58
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradientai-e40feaac59c85aace6aa42d2749b20e0955dbbae58b06c3a650bc03adafcd7b5.yml
33
openapi_spec_hash: 825c1a4816938e9f594b7a8c06692667
4-
config_hash: 48e21c88c078b1d478257b2da0c840b2
4+
config_hash: bae6be3845572f2dadf83c0aad336142

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/digitalocean/genai-python.git
65+
$ pip install git+ssh://git@github.com/digitalocean/gradientai-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/digitalocean/genai-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/digitalocean/gradientai-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
@@ -271,9 +271,9 @@ version = response.parse() # get the object that `agents.versions.list()` would
271271
print(version.agent_versions)
272272
```
273273

274-
These methods return an [`APIResponse`](https://github.com/digitalocean/genai-python/tree/main/src/gradientai/_response.py) object.
274+
These methods return an [`APIResponse`](https://github.com/digitalocean/gradientai-python/tree/main/src/gradientai/_response.py) object.
275275

276-
The async client returns an [`AsyncAPIResponse`](https://github.com/digitalocean/genai-python/tree/main/src/gradientai/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
276+
The async client returns an [`AsyncAPIResponse`](https://github.com/digitalocean/gradientai-python/tree/main/src/gradientai/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
277277

278278
#### `.with_streaming_response`
279279

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

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

382-
We are keen for your feedback; please open an [issue](https://www.github.com/digitalocean/genai-python/issues) with questions, bugs, or suggestions.
382+
We are keen for your feedback; please open an [issue](https://www.github.com/digitalocean/gradientai-python/issues) with questions, bugs, or suggestions.
383383

384384
### Determining the installed version
385385

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 GRADIENT_AI_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/digitalocean/genai-python"
38-
Repository = "https://github.com/digitalocean/genai-python"
37+
Homepage = "https://github.com/digitalocean/gradientai-python"
38+
Repository = "https://github.com/digitalocean/gradientai-python"
3939

4040
[project.optional-dependencies]
4141
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
@@ -124,7 +124,7 @@ path = "README.md"
124124
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
125125
# replace relative links with absolute links
126126
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
127-
replacement = '[\1](https://github.com/digitalocean/genai-python/tree/main/\g<2>)'
127+
replacement = '[\1](https://github.com/digitalocean/gradientai-python/tree/main/\g<2>)'
128128

129129
[tool.pytest.ini_options]
130130
testpaths = ["tests"]

src/gradientai/resources/agents/agents.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def with_raw_response(self) -> AgentsResourceWithRawResponse:
104104
This property can be used as a prefix for any HTTP method call to return
105105
the raw response object instead of the parsed content.
106106
107-
For more information, see https://www.github.com/digitalocean/genai-python#accessing-raw-response-data-eg-headers
107+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
108108
"""
109109
return AgentsResourceWithRawResponse(self)
110110

@@ -113,7 +113,7 @@ def with_streaming_response(self) -> AgentsResourceWithStreamingResponse:
113113
"""
114114
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
115115
116-
For more information, see https://www.github.com/digitalocean/genai-python#with_streaming_response
116+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
117117
"""
118118
return AgentsResourceWithStreamingResponse(self)
119119

@@ -472,7 +472,7 @@ def with_raw_response(self) -> AsyncAgentsResourceWithRawResponse:
472472
This property can be used as a prefix for any HTTP method call to return
473473
the raw response object instead of the parsed content.
474474
475-
For more information, see https://www.github.com/digitalocean/genai-python#accessing-raw-response-data-eg-headers
475+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
476476
"""
477477
return AsyncAgentsResourceWithRawResponse(self)
478478

@@ -481,7 +481,7 @@ def with_streaming_response(self) -> AsyncAgentsResourceWithStreamingResponse:
481481
"""
482482
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
483483
484-
For more information, see https://www.github.com/digitalocean/genai-python#with_streaming_response
484+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
485485
"""
486486
return AsyncAgentsResourceWithStreamingResponse(self)
487487

src/gradientai/resources/agents/api_keys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def with_raw_response(self) -> APIKeysResourceWithRawResponse:
3232
This property can be used as a prefix for any HTTP method call to return
3333
the raw response object instead of the parsed content.
3434
35-
For more information, see https://www.github.com/digitalocean/genai-python#accessing-raw-response-data-eg-headers
35+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
3636
"""
3737
return APIKeysResourceWithRawResponse(self)
3838

@@ -41,7 +41,7 @@ def with_streaming_response(self) -> APIKeysResourceWithStreamingResponse:
4141
"""
4242
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4343
44-
For more information, see https://www.github.com/digitalocean/genai-python#with_streaming_response
44+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
4545
"""
4646
return APIKeysResourceWithStreamingResponse(self)
4747

@@ -278,7 +278,7 @@ def with_raw_response(self) -> AsyncAPIKeysResourceWithRawResponse:
278278
This property can be used as a prefix for any HTTP method call to return
279279
the raw response object instead of the parsed content.
280280
281-
For more information, see https://www.github.com/digitalocean/genai-python#accessing-raw-response-data-eg-headers
281+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
282282
"""
283283
return AsyncAPIKeysResourceWithRawResponse(self)
284284

@@ -287,7 +287,7 @@ def with_streaming_response(self) -> AsyncAPIKeysResourceWithStreamingResponse:
287287
"""
288288
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
289289
290-
For more information, see https://www.github.com/digitalocean/genai-python#with_streaming_response
290+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
291291
"""
292292
return AsyncAPIKeysResourceWithStreamingResponse(self)
293293

0 commit comments

Comments
 (0)