Skip to content

Commit 521ea34

Browse files
chore: go live (#1)
1 parent b281a4b commit 521ea34

19 files changed

+193
-51
lines changed

.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/cleanlab/codex-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.CODEX_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.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 == 'cleanlab/codex-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.CODEX_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.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+
}

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/codex-python.git
66+
$ pip install git+ssh://[email protected]/cleanlab/codex-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/codex-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/cleanlab/codex-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
125125

126126
### Publish manually
127127

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The REST API documentation can be found on [help.cleanlab.ai](https://help.clean
1515
## Installation
1616

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

2222
> [!NOTE]
@@ -230,9 +230,9 @@ project = response.parse() # get the object that `projects.create()` would have
230230
print(project.id)
231231
```
232232

233-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/codex-python/tree/main/src/codex/_response.py) object.
233+
These methods return an [`APIResponse`](https://github.com/cleanlab/codex-python/tree/main/src/codex/_response.py) object.
234234

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

237237
#### `.with_streaming_response`
238238

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

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

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

345345
### Determining the installed version
346346

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 CODEX_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

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ classifiers = [
3434
]
3535

3636
[project.urls]
37-
Homepage = "https://github.com/stainless-sdks/codex-python"
38-
Repository = "https://github.com/stainless-sdks/codex-python"
37+
Homepage = "https://github.com/cleanlab/codex-python"
38+
Repository = "https://github.com/cleanlab/codex-python"
3939

4040

4141

@@ -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/stainless-sdks/codex-python/tree/main/\g<2>)'
125+
replacement = '[\1](https://github.com/cleanlab/codex-python/tree/main/\g<2>)'
126126

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

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/codex/_version.py"
65+
]
66+
}

src/codex/_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__ = "codex"
4-
__version__ = "0.0.1-alpha.0"
4+
__version__ = "0.0.1-alpha.0" # x-release-please-version

src/codex/resources/health.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def with_raw_response(self) -> HealthResourceWithRawResponse:
2626
This property can be used as a prefix for any HTTP method call to return the
2727
the raw response object instead of the parsed content.
2828
29-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
29+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
3030
"""
3131
return HealthResourceWithRawResponse(self)
3232

@@ -35,7 +35,7 @@ def with_streaming_response(self) -> HealthResourceWithStreamingResponse:
3535
"""
3636
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
3737
38-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
38+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
3939
"""
4040
return HealthResourceWithStreamingResponse(self)
4141

@@ -104,7 +104,7 @@ def with_raw_response(self) -> AsyncHealthResourceWithRawResponse:
104104
This property can be used as a prefix for any HTTP method call to return the
105105
the raw response object instead of the parsed content.
106106
107-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
107+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
108108
"""
109109
return AsyncHealthResourceWithRawResponse(self)
110110

@@ -113,7 +113,7 @@ def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse:
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/stainless-sdks/codex-python#with_streaming_response
116+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
117117
"""
118118
return AsyncHealthResourceWithStreamingResponse(self)
119119

src/codex/resources/organizations/billing.py

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

@@ -36,7 +36,7 @@ def with_streaming_response(self) -> BillingResourceWithStreamingResponse:
3636
"""
3737
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
3838
39-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
39+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
4040
"""
4141
return BillingResourceWithStreamingResponse(self)
4242

@@ -114,7 +114,7 @@ def with_raw_response(self) -> AsyncBillingResourceWithRawResponse:
114114
This property can be used as a prefix for any HTTP method call to return the
115115
the raw response object instead of the parsed content.
116116
117-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
117+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
118118
"""
119119
return AsyncBillingResourceWithRawResponse(self)
120120

@@ -123,7 +123,7 @@ def with_streaming_response(self) -> AsyncBillingResourceWithStreamingResponse:
123123
"""
124124
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
125125
126-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
126+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
127127
"""
128128
return AsyncBillingResourceWithStreamingResponse(self)
129129

src/codex/resources/organizations/organizations.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def with_raw_response(self) -> OrganizationsResourceWithRawResponse:
3838
This property can be used as a prefix for any HTTP method call to return the
3939
the raw response object instead of the parsed content.
4040
41-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
41+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
4242
"""
4343
return OrganizationsResourceWithRawResponse(self)
4444

@@ -47,7 +47,7 @@ def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse:
4747
"""
4848
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4949
50-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
50+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
5151
"""
5252
return OrganizationsResourceWithStreamingResponse(self)
5353

@@ -96,7 +96,7 @@ def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse:
9696
This property can be used as a prefix for any HTTP method call to return the
9797
the raw response object instead of the parsed content.
9898
99-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
99+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
100100
"""
101101
return AsyncOrganizationsResourceWithRawResponse(self)
102102

@@ -105,7 +105,7 @@ def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResp
105105
"""
106106
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
107107
108-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
108+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
109109
"""
110110
return AsyncOrganizationsResourceWithStreamingResponse(self)
111111

src/codex/resources/projects/access_keys.py

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

@@ -45,7 +45,7 @@ def with_streaming_response(self) -> AccessKeysResourceWithStreamingResponse:
4545
"""
4646
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4747
48-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
48+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
4949
"""
5050
return AccessKeysResourceWithStreamingResponse(self)
5151

@@ -290,7 +290,7 @@ def with_raw_response(self) -> AsyncAccessKeysResourceWithRawResponse:
290290
This property can be used as a prefix for any HTTP method call to return the
291291
the raw response object instead of the parsed content.
292292
293-
For more information, see https://www.github.com/stainless-sdks/codex-python#accessing-raw-response-data-eg-headers
293+
For more information, see https://www.github.com/cleanlab/codex-python#accessing-raw-response-data-eg-headers
294294
"""
295295
return AsyncAccessKeysResourceWithRawResponse(self)
296296

@@ -299,7 +299,7 @@ def with_streaming_response(self) -> AsyncAccessKeysResourceWithStreamingRespons
299299
"""
300300
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
301301
302-
For more information, see https://www.github.com/stainless-sdks/codex-python#with_streaming_response
302+
For more information, see https://www.github.com/cleanlab/codex-python#with_streaming_response
303303
"""
304304
return AsyncAccessKeysResourceWithStreamingResponse(self)
305305

0 commit comments

Comments
 (0)