Skip to content

Commit 642118f

Browse files
authored
Merge pull request #2 from OmniStack-sh/release-please--branches--main--changes--next
release: 0.1.0-alpha.1
2 parents 7d28614 + 0392c97 commit 642118f

File tree

13 files changed

+177
-27
lines changed

13 files changed

+177
-27
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 31 additions & 0 deletions
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/OmniStack-sh/omnistack-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.OMNISTACK_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

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 == 'OmniStack-sh/omnistack-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.OMNISTACK_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.1.0-alpha.1"
3+
}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 0.1.0-alpha.1 (2024-10-17)
4+
5+
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/OmniStack-sh/omnistack-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
6+
7+
### Features
8+
9+
* **api:** api update ([7d28614](https://github.com/OmniStack-sh/omnistack-python/commit/7d28614ac5d0b945e7b6df013d5c9c63522760c5))
10+
* **api:** api update ([#1](https://github.com/OmniStack-sh/omnistack-python/issues/1)) ([4d80dcc](https://github.com/OmniStack-sh/omnistack-python/commit/4d80dcc27b29333c398502ca08e8cd4f9e82e6e4))
11+
* **api:** update via SDK Studio ([55e43c9](https://github.com/OmniStack-sh/omnistack-python/commit/55e43c987366864154869a6f7c91ad267ce612dc))

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
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/omnistack-python.git
66+
$ pip install git+ssh://[email protected]/OmniStack-sh/omnistack-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/omnistack-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/OmniStack-sh/omnistack-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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ The REST API documentation can be found on [docs.omnistack.com](https://docs.omn
1515
## Installation
1616

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

22-
> [!NOTE]
23-
> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre omnistack`
24-
2522
## Usage
2623

2724
The full API of this library can be found in [api.md](api.md).
@@ -214,9 +211,9 @@ completion = response.parse() # get the object that `openai.completions.create(
214211
print(completion)
215212
```
216213

217-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/omnistack-python/tree/main/src/omnistack/_response.py) object.
214+
These methods return an [`APIResponse`](https://github.com/OmniStack-sh/omnistack-python/tree/main/src/omnistack/_response.py) object.
218215

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

221218
#### `.with_streaming_response`
222219

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

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

316-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/omnistack-python/issues) with questions, bugs, or suggestions.
313+
We are keen for your feedback; please open an [issue](https://www.github.com/OmniStack-sh/omnistack-python/issues) with questions, bugs, or suggestions.
317314

318315
### Determining the installed version
319316

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 OMNISTACK_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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "omnistack"
3-
version = "0.0.1-alpha.0"
3+
version = "0.1.0-alpha.1"
44
description = "The official Python library for the omnistack API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -36,8 +36,8 @@ classifiers = [
3636
]
3737

3838
[project.urls]
39-
Homepage = "https://github.com/stainless-sdks/omnistack-python"
40-
Repository = "https://github.com/stainless-sdks/omnistack-python"
39+
Homepage = "https://github.com/OmniStack-sh/omnistack-python"
40+
Repository = "https://github.com/OmniStack-sh/omnistack-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/omnistack-python/tree/main/\g<2>)'
126+
replacement = '[\1](https://github.com/OmniStack-sh/omnistack-python/tree/main/\g<2>)'
127127

128128
[tool.black]
129129
line-length = 120

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

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

src/omnistack/resources/openai/chat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def with_raw_response(self) -> ChatResourceWithRawResponse:
3434
This property can be used as a prefix for any HTTP method call to return the
3535
the raw response object instead of the parsed content.
3636
37-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
37+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
3838
"""
3939
return ChatResourceWithRawResponse(self)
4040

@@ -43,7 +43,7 @@ def with_streaming_response(self) -> ChatResourceWithStreamingResponse:
4343
"""
4444
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4545
46-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
46+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
4747
"""
4848
return ChatResourceWithStreamingResponse(self)
4949

@@ -302,7 +302,7 @@ def with_raw_response(self) -> AsyncChatResourceWithRawResponse:
302302
This property can be used as a prefix for any HTTP method call to return the
303303
the raw response object instead of the parsed content.
304304
305-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
305+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
306306
"""
307307
return AsyncChatResourceWithRawResponse(self)
308308

@@ -311,7 +311,7 @@ def with_streaming_response(self) -> AsyncChatResourceWithStreamingResponse:
311311
"""
312312
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
313313
314-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
314+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
315315
"""
316316
return AsyncChatResourceWithStreamingResponse(self)
317317

src/omnistack/resources/openai/completions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def with_raw_response(self) -> CompletionsResourceWithRawResponse:
3434
This property can be used as a prefix for any HTTP method call to return the
3535
the raw response object instead of the parsed content.
3636
37-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
37+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
3838
"""
3939
return CompletionsResourceWithRawResponse(self)
4040

@@ -43,7 +43,7 @@ def with_streaming_response(self) -> CompletionsResourceWithStreamingResponse:
4343
"""
4444
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
4545
46-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
46+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
4747
"""
4848
return CompletionsResourceWithStreamingResponse(self)
4949

@@ -241,7 +241,7 @@ def with_raw_response(self) -> AsyncCompletionsResourceWithRawResponse:
241241
This property can be used as a prefix for any HTTP method call to return the
242242
the raw response object instead of the parsed content.
243243
244-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
244+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
245245
"""
246246
return AsyncCompletionsResourceWithRawResponse(self)
247247

@@ -250,7 +250,7 @@ def with_streaming_response(self) -> AsyncCompletionsResourceWithStreamingRespon
250250
"""
251251
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
252252
253-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
253+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
254254
"""
255255
return AsyncCompletionsResourceWithStreamingResponse(self)
256256

src/omnistack/resources/openai/openai.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def with_raw_response(self) -> OpenAIResourceWithRawResponse:
3939
This property can be used as a prefix for any HTTP method call to return the
4040
the raw response object instead of the parsed content.
4141
42-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
42+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
4343
"""
4444
return OpenAIResourceWithRawResponse(self)
4545

@@ -48,7 +48,7 @@ def with_streaming_response(self) -> OpenAIResourceWithStreamingResponse:
4848
"""
4949
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
5050
51-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
51+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
5252
"""
5353
return OpenAIResourceWithStreamingResponse(self)
5454

@@ -68,7 +68,7 @@ def with_raw_response(self) -> AsyncOpenAIResourceWithRawResponse:
6868
This property can be used as a prefix for any HTTP method call to return the
6969
the raw response object instead of the parsed content.
7070
71-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#accessing-raw-response-data-eg-headers
71+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#accessing-raw-response-data-eg-headers
7272
"""
7373
return AsyncOpenAIResourceWithRawResponse(self)
7474

@@ -77,7 +77,7 @@ def with_streaming_response(self) -> AsyncOpenAIResourceWithStreamingResponse:
7777
"""
7878
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
7979
80-
For more information, see https://www.github.com/stainless-sdks/omnistack-python#with_streaming_response
80+
For more information, see https://www.github.com/OmniStack-sh/omnistack-python#with_streaming_response
8181
"""
8282
return AsyncOpenAIResourceWithStreamingResponse(self)
8383

0 commit comments

Comments
 (0)