-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9fad9f
commit 6e40de2
Showing
93 changed files
with
1,806 additions
and
2,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Create releases | ||
on: | ||
schedule: | ||
- cron: '0 5 * * *' # every day at 5am UTC | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: release | ||
if: github.ref == 'refs/heads/main' && github.repository == 'prelude-so/python-sdk' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: stainless-api/trigger-release-please@v1 | ||
id: release | ||
with: | ||
repo: ${{ github.event.repository.full_name }} | ||
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }} | ||
|
||
- name: Install Rye | ||
if: ${{ steps.release.outputs.releases_created }} | ||
run: | | ||
curl -sSf https://rye.astral.sh/get | bash | ||
echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
env: | ||
RYE_VERSION: '0.35.0' | ||
RYE_INSTALL_OPTION: '--yes' | ||
|
||
- name: Publish to PyPI | ||
if: ${{ steps.release.outputs.releases_created }} | ||
run: | | ||
bash ./bin/publish-pypi | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PRELUDE_PYPI_TOKEN || secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Handle release PR title edits | ||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- unlabeled | ||
|
||
jobs: | ||
update_pr_content: | ||
name: Update pull request content | ||
if: | | ||
((github.event.action == 'edited' && github.event.changes.title.from != github.event.pull_request.title) || | ||
(github.event.action == 'unlabeled' && github.event.label.name == 'autorelease: custom version')) && | ||
startsWith(github.event.pull_request.head.ref, 'release-please--') && | ||
github.event.pull_request.state == 'open' && | ||
github.event.sender.login != 'stainless-bot' && | ||
github.event.sender.login != 'stainless-app' && | ||
github.repository == 'prelude-so/python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: stainless-api/trigger-release-please@v1 | ||
with: | ||
repo: ${{ github.event.repository.full_name }} | ||
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# workflow for re-running publishing to PyPI in case it fails for some reason | ||
# you can run this workflow by navigating to https://www.github.com/prelude-so/python-sdk/actions/workflows/publish-pypi.yml | ||
name: Publish PyPI | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rye | ||
run: | | ||
curl -sSf https://rye.astral.sh/get | bash | ||
echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
env: | ||
RYE_VERSION: '0.35.0' | ||
RYE_INSTALL_OPTION: '--yes' | ||
|
||
- name: Publish to PyPI | ||
run: | | ||
bash ./bin/publish-pypi | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PRELUDE_PYPI_TOKEN || secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release Doctor | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release_doctor: | ||
name: release doctor | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'prelude-so/python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check release environment | ||
run: | | ||
bash ./bin/check-release-environment | ||
env: | ||
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }} | ||
PYPI_TOKEN: ${{ secrets.PRELUDE_PYPI_TOKEN || secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "0.0.1-alpha.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 6 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-989c0ce686fda9836cf0ea2580994f0de0a36cf69bc14d451dd8b96290dfebc6.yml | ||
configured_endpoints: 3 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-0aa7fe37b742552639f50f71aaf8e55c20a6a9ee7388f03245558748e4edd493.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ $ pip install -r requirements-dev.lock | |
|
||
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may | ||
result in merge conflicts between manual patches and changes from the generator. The generator will never | ||
modify the contents of the `src/prelude/lib/` and `examples/` directories. | ||
modify the contents of the `src/prelude_sdk/lib/` and `examples/` directories. | ||
|
||
## Adding and running examples | ||
|
||
|
@@ -63,7 +63,7 @@ If you’d like to use the repository from source, you can either install from g | |
To install via git: | ||
|
||
```sh | ||
$ pip install git+ssh://[email protected]/stainless-sdks/prelude-python.git | ||
$ pip install git+ssh://[email protected]/prelude-so/python-sdk.git | ||
``` | ||
|
||
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 | |
|
||
### Publish with a GitHub workflow | ||
|
||
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/prelude-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. | ||
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/prelude-so/python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. | ||
|
||
### Publish manually | ||
|
||
|
Oops, something went wrong.