Skip to content

Commit f61eb32

Browse files
chore: update SDK settings (#1)
1 parent aedee98 commit f61eb32

17 files changed

+185
-43
lines changed

Diff for: .github/workflows/publish-pypi.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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/browserbase/sdk-python/actions/workflows/publish-pypi.yml
4+
name: Publish PyPI
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rye
20+
run: |
21+
curl -sSf https://rye.astral.sh/get | bash
22+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23+
env:
24+
RYE_VERSION: '0.35.0'
25+
RYE_INSTALL_OPTION: '--yes'
26+
27+
- name: Publish to PyPI
28+
run: |
29+
bash ./bin/publish-pypi
30+
env:
31+
PYPI_TOKEN: ${{ secrets.BROWSERBASE_PYPI_TOKEN || secrets.PYPI_TOKEN }}

Diff for: .github/workflows/release-doctor.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'browserbase/sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
PYPI_TOKEN: ${{ secrets.BROWSERBASE_PYPI_TOKEN || secrets.PYPI_TOKEN }}

Diff for: .release-please-manifest.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1-alpha.0"
3+
}

Diff for: CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ If you’d like to use the repository from source, you can either install from g
6363
To install via git:
6464

6565
```sh
66-
$ pip install git+ssh://[email protected]/stainless-sdks/browserbase-python.git
66+
$ pip install git+ssh://[email protected]/browserbase/sdk-python.git
6767
```
6868

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

122122
### Publish with a GitHub workflow
123123

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

126126
### Publish manually
127127

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The REST API documentation can be found on [docs.browserbase.com](https://docs.b
1515
## Installation
1616

1717
```sh
18-
# install from this staging repo
19-
pip install git+ssh://[email protected]/stainless-sdks/browserbase-python.git
18+
# install from the production repo
19+
pip install git+ssh://[email protected]/browserbase/sdk-python.git
2020
```
2121

2222
> [!NOTE]
@@ -218,9 +218,9 @@ context = response.parse() # get the object that `contexts.create()` would have
218218
print(context.id)
219219
```
220220

221-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/browserbase-python/tree/main/src/browserbase/_response.py) object.
221+
These methods return an [`APIResponse`](https://github.com/browserbase/sdk-python/tree/main/src/browserbase/_response.py) object.
222222

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

225225
#### `.with_streaming_response`
226226

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

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

319-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/browserbase-python/issues) with questions, bugs, or suggestions.
319+
We are keen for your feedback; please open an [issue](https://www.github.com/browserbase/sdk-python/issues) with questions, bugs, or suggestions.
320320

321321
### Determining the installed version
322322

Diff for: bin/check-release-environment

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${PYPI_TOKEN}" ]; then
6+
errors+=("The BROWSERBASE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
7+
fi
8+
9+
lenErrors=${#errors[@]}
10+
11+
if [[ lenErrors -gt 0 ]]; then
12+
echo -e "Found the following errors in the release environment:\n"
13+
14+
for error in "${errors[@]}"; do
15+
echo -e "- $error\n"
16+
done
17+
18+
exit 1
19+
fi
20+
21+
echo "The environment is ready to push releases!"

Diff for: pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ classifiers = [
3636
]
3737

3838
[project.urls]
39-
Homepage = "https://github.com/stainless-sdks/browserbase-python"
40-
Repository = "https://github.com/stainless-sdks/browserbase-python"
39+
Homepage = "https://github.com/browserbase/sdk-python"
40+
Repository = "https://github.com/browserbase/sdk-python"
4141

4242

4343

@@ -123,7 +123,7 @@ path = "README.md"
123123
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
124124
# replace relative links with absolute links
125125
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
126-
replacement = '[\1](https://github.com/stainless-sdks/browserbase-python/tree/main/\g<2>)'
126+
replacement = '[\1](https://github.com/browserbase/sdk-python/tree/main/\g<2>)'
127127

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

Diff for: release-please-config.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"packages": {
3+
".": {}
4+
},
5+
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"versioning": "prerelease",
9+
"prerelease": true,
10+
"bump-minor-pre-major": true,
11+
"bump-patch-for-minor-pre-major": false,
12+
"pull-request-header": "Automated Release PR",
13+
"pull-request-title-pattern": "release: ${version}",
14+
"changelog-sections": [
15+
{
16+
"type": "feat",
17+
"section": "Features"
18+
},
19+
{
20+
"type": "fix",
21+
"section": "Bug Fixes"
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements"
26+
},
27+
{
28+
"type": "revert",
29+
"section": "Reverts"
30+
},
31+
{
32+
"type": "chore",
33+
"section": "Chores"
34+
},
35+
{
36+
"type": "docs",
37+
"section": "Documentation"
38+
},
39+
{
40+
"type": "style",
41+
"section": "Styles"
42+
},
43+
{
44+
"type": "refactor",
45+
"section": "Refactors"
46+
},
47+
{
48+
"type": "test",
49+
"section": "Tests",
50+
"hidden": true
51+
},
52+
{
53+
"type": "build",
54+
"section": "Build System"
55+
},
56+
{
57+
"type": "ci",
58+
"section": "Continuous Integration",
59+
"hidden": true
60+
}
61+
],
62+
"release-type": "python",
63+
"extra-files": [
64+
"src/browserbase/_version.py"
65+
]
66+
}

Diff for: src/browserbase/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "browserbase"
4-
__version__ = "0.0.1-alpha.0"
4+
__version__ = "0.0.1-alpha.0" # x-release-please-version

Diff for: src/browserbase/resources/contexts.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def with_raw_response(self) -> ContextsResourceWithRawResponse:
3333
This property can be used as a prefix for any HTTP method call to return the
3434
the raw response object instead of the parsed content.
3535
36-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
36+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
3737
"""
3838
return ContextsResourceWithRawResponse(self)
3939

@@ -42,7 +42,7 @@ def with_streaming_response(self) -> ContextsResourceWithStreamingResponse:
4242
"""
4343
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4444
45-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
45+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
4646
"""
4747
return ContextsResourceWithStreamingResponse(self)
4848

@@ -156,7 +156,7 @@ def with_raw_response(self) -> AsyncContextsResourceWithRawResponse:
156156
This property can be used as a prefix for any HTTP method call to return the
157157
the raw response object instead of the parsed content.
158158
159-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
159+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
160160
"""
161161
return AsyncContextsResourceWithRawResponse(self)
162162

@@ -165,7 +165,7 @@ def with_streaming_response(self) -> AsyncContextsResourceWithStreamingResponse:
165165
"""
166166
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
167167
168-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
168+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
169169
"""
170170
return AsyncContextsResourceWithStreamingResponse(self)
171171

Diff for: src/browserbase/resources/extensions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def with_raw_response(self) -> ExtensionsResourceWithRawResponse:
3535
This property can be used as a prefix for any HTTP method call to return the
3636
the raw response object instead of the parsed content.
3737
38-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
38+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
3939
"""
4040
return ExtensionsResourceWithRawResponse(self)
4141

@@ -44,7 +44,7 @@ def with_streaming_response(self) -> ExtensionsResourceWithStreamingResponse:
4444
"""
4545
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4646
47-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
47+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
4848
"""
4949
return ExtensionsResourceWithStreamingResponse(self)
5050

@@ -162,7 +162,7 @@ def with_raw_response(self) -> AsyncExtensionsResourceWithRawResponse:
162162
This property can be used as a prefix for any HTTP method call to return the
163163
the raw response object instead of the parsed content.
164164
165-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
165+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
166166
"""
167167
return AsyncExtensionsResourceWithRawResponse(self)
168168

@@ -171,7 +171,7 @@ def with_streaming_response(self) -> AsyncExtensionsResourceWithStreamingRespons
171171
"""
172172
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
173173
174-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
174+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
175175
"""
176176
return AsyncExtensionsResourceWithStreamingResponse(self)
177177

Diff for: src/browserbase/resources/projects.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def with_raw_response(self) -> ProjectsResourceWithRawResponse:
2828
This property can be used as a prefix for any HTTP method call to return the
2929
the raw response object instead of the parsed content.
3030
31-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
31+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
3232
"""
3333
return ProjectsResourceWithRawResponse(self)
3434

@@ -37,7 +37,7 @@ def with_streaming_response(self) -> ProjectsResourceWithStreamingResponse:
3737
"""
3838
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
3939
40-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
40+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
4141
"""
4242
return ProjectsResourceWithStreamingResponse(self)
4343

@@ -134,7 +134,7 @@ def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse:
134134
This property can be used as a prefix for any HTTP method call to return the
135135
the raw response object instead of the parsed content.
136136
137-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
137+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
138138
"""
139139
return AsyncProjectsResourceWithRawResponse(self)
140140

@@ -143,7 +143,7 @@ def with_streaming_response(self) -> AsyncProjectsResourceWithStreamingResponse:
143143
"""
144144
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
145145
146-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
146+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
147147
"""
148148
return AsyncProjectsResourceWithStreamingResponse(self)
149149

Diff for: src/browserbase/resources/sessions/downloads.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def with_raw_response(self) -> DownloadsResourceWithRawResponse:
2929
This property can be used as a prefix for any HTTP method call to return the
3030
the raw response object instead of the parsed content.
3131
32-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
32+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
3333
"""
3434
return DownloadsResourceWithRawResponse(self)
3535

@@ -38,7 +38,7 @@ def with_streaming_response(self) -> DownloadsResourceWithStreamingResponse:
3838
"""
3939
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4040
41-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
41+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
4242
"""
4343
return DownloadsResourceWithStreamingResponse(self)
4444

@@ -84,7 +84,7 @@ def with_raw_response(self) -> AsyncDownloadsResourceWithRawResponse:
8484
This property can be used as a prefix for any HTTP method call to return the
8585
the raw response object instead of the parsed content.
8686
87-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#accessing-raw-response-data-eg-headers
87+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
8888
"""
8989
return AsyncDownloadsResourceWithRawResponse(self)
9090

@@ -93,7 +93,7 @@ def with_streaming_response(self) -> AsyncDownloadsResourceWithStreamingResponse
9393
"""
9494
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
9595
96-
For more information, see https://www.github.com/stainless-sdks/browserbase-python#with_streaming_response
96+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
9797
"""
9898
return AsyncDownloadsResourceWithStreamingResponse(self)
9999

0 commit comments

Comments
 (0)