Skip to content

Commit 212e987

Browse files
chore: update SDK settings
1 parent 0277c2c commit 212e987

11 files changed

Lines changed: 157 additions & 18 deletions

File tree

‎.github/workflows/publish-pypi.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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/brand-dot-dev/context-python-sdk/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@v6
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
21+
with:
22+
version: '0.9.13'
23+
24+
- name: Publish to PyPI
25+
run: |
26+
bash ./bin/publish-pypi
27+
env:
28+
PYPI_TOKEN: ${{ secrets.CONTEXT_DEV_PYPI_TOKEN || secrets.PYPI_TOKEN }}
Lines changed: 21 additions & 0 deletions
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 == 'brand-dot-dev/context-python-sdk' && (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@v6
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
PYPI_TOKEN: ${{ secrets.CONTEXT_DEV_PYPI_TOKEN || secrets.PYPI_TOKEN }}

‎.release-please-manifest.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
3+
}

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-a69e6793d72c7f91069972b64ff2e35b4ddfa62cd35d6451b7d63f95d5957951.yml
33
openapi_spec_hash: 8a77eef26c37dc2b63110169f0eef1f6
4-
config_hash: ffaf6d9c3318f968f81f096226f074c2
4+
config_hash: 31a9d4421c2238d40ded4572647f433c

‎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/stainless-sdks/context.dev-python.git
65+
$ pip install git+ssh://git@github.com/brand-dot-dev/context-python-sdk.git
6666
```
6767

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

114114
### Publish with a GitHub workflow
115115

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

118118
### Publish manually
119119

‎README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ The REST API documentation can be found on [docs.context.dev](https://docs.conte
2525
## Installation
2626

2727
```sh
28-
# install from this staging repo
29-
pip install git+ssh://git@github.com/stainless-sdks/context.dev-python.git
28+
# install from the production repo
29+
pip install git+ssh://git@github.com/brand-dot-dev/context-python-sdk.git
3030
```
3131

3232
> [!NOTE]
@@ -88,8 +88,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv
8888
You can enable this by installing `aiohttp`:
8989

9090
```sh
91-
# install from this staging repo
92-
pip install 'context.dev[aiohttp] @ git+ssh://git@github.com/stainless-sdks/context.dev-python.git'
91+
# install from the production repo
92+
pip install 'context.dev[aiohttp] @ git+ssh://git@github.com/brand-dot-dev/context-python-sdk.git'
9393
```
9494

9595
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
@@ -286,9 +286,9 @@ brand = response.parse() # get the object that `brand.retrieve()` would have re
286286
print(brand.brand)
287287
```
288288

289-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/context.dev-python/tree/main/src/context/dev/_response.py) object.
289+
These methods return an [`APIResponse`](https://github.com/brand-dot-dev/context-python-sdk/tree/main/src/context/dev/_response.py) object.
290290

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

293293
#### `.with_streaming_response`
294294

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

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

397-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/context.dev-python/issues) with questions, bugs, or suggestions.
397+
We are keen for your feedback; please open an [issue](https://www.github.com/brand-dot-dev/context-python-sdk/issues) with questions, bugs, or suggestions.
398398

399399
### Determining the installed version
400400

‎bin/check-release-environment‎

Lines changed: 21 additions & 0 deletions
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 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!"

‎pyproject.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ classifiers = [
3737
]
3838

3939
[project.urls]
40-
Homepage = "https://github.com/stainless-sdks/context.dev-python"
41-
Repository = "https://github.com/stainless-sdks/context.dev-python"
40+
Homepage = "https://github.com/brand-dot-dev/context-python-sdk"
41+
Repository = "https://github.com/brand-dot-dev/context-python-sdk"
4242

4343
[project.optional-dependencies]
4444
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
@@ -112,7 +112,7 @@ path = "README.md"
112112
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
113113
# replace relative links with absolute links
114114
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
115-
replacement = '[\1](https://github.com/stainless-sdks/context.dev-python/tree/main/\g<2>)'
115+
replacement = '[\1](https://github.com/brand-dot-dev/context-python-sdk/tree/main/\g<2>)'
116116

117117
[tool.pytest.ini_options]
118118
testpaths = ["tests"]

‎release-please-config.json‎

Lines changed: 66 additions & 0 deletions
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/context/dev/_version.py"
65+
]
66+
}

‎src/context/dev/_version.py‎

Lines changed: 1 addition & 1 deletion
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__ = "context.dev"
4-
__version__ = "0.0.1"
4+
__version__ = "0.0.1" # x-release-please-version

0 commit comments

Comments
 (0)