Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: CI
on:
push:
branches:
- main
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches:
- main
- next
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ubuntu-latest
runs-on: ${{ github.repository == 'stainless-sdks/zbd-payments-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -29,9 +35,35 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/zbd-payments-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
name: upload
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

test:
timeout-minutes: 10
name: test
runs-on: ubuntu-latest
runs-on: ${{ github.repository == 'stainless-sdks/zbd-payments-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/zbdpay/zbd-payments-python-sdk/actions/workflows/publish-pypi.yml
name: Publish PyPI
on:
workflow_dispatch:

release:
types: [published]

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.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Publish to PyPI
run: |
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.ZBD_PAYMENTS_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'zbdpay/zbd-payments-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:
PYPI_TOKEN: ${{ secrets.ZBD_PAYMENTS_PYPI_TOKEN || secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0-alpha.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 33
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zbd%2Fzbd-payments-8a37aac39f339fd14d09cc1bbc1444f4d24d0dfd5f8d28d6a4cf096c1a583c4c.yml
openapi_spec_hash: 26af776d03d1f1fbcfd2c76856c1f678
config_hash: d2ecaa08414cfa2db88041eb1eb589bc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zbd%2Fzbd-payments-b07ae2569a1c3d44292fec44abb406b201a641a1ae03c8aa265ff8b1b7d07325.yml
openapi_spec_hash: 068c6e3db049853428040e8baaaa8ec1
config_hash: 7be95e9a7e9d28075d025f3c19c59b8b
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

## 0.1.0-alpha.1 (2025-06-30)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/zbdpay/zbd-payments-python-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

### Features

* **api:** update via SDK Studio ([e140140](https://github.com/zbdpay/zbd-payments-python-sdk/commit/e1401402adc0922f9d480bd4915508829a012ea6))
* **api:** update via SDK Studio ([d365689](https://github.com/zbdpay/zbd-payments-python-sdk/commit/d365689aea13350770ebb29003703506b2d93bc6))
* **api:** update via SDK Studio ([77175a0](https://github.com/zbdpay/zbd-payments-python-sdk/commit/77175a07ea0bd1874d86fecb7b82e2e2388bacb0))
* **client:** add support for aiohttp ([8788187](https://github.com/zbdpay/zbd-payments-python-sdk/commit/8788187346d655321d0f7039833533060ad23a58))


### Bug Fixes

* **ci:** correct conditional ([80e453a](https://github.com/zbdpay/zbd-payments-python-sdk/commit/80e453a6e788e1d0486512289db060a0c2116c4b))
* **ci:** release-doctor — report correct token name ([80668d2](https://github.com/zbdpay/zbd-payments-python-sdk/commit/80668d2c8e761c84183950b40f2d01319f0cbbe3))


### Chores

* change publish docs url ([ade5ab6](https://github.com/zbdpay/zbd-payments-python-sdk/commit/ade5ab6d9c14e7f91a6cbb1addf75189ae3dc42e))
* **ci:** only run for pushes and fork pull requests ([859534a](https://github.com/zbdpay/zbd-payments-python-sdk/commit/859534a6d07900299587933720f1054d5b67d036))
* configure new SDK language ([679c119](https://github.com/zbdpay/zbd-payments-python-sdk/commit/679c119fa94c1e1c88d78576c52b183be1dca2ca))
* configure new SDK language ([07173a5](https://github.com/zbdpay/zbd-payments-python-sdk/commit/07173a50fe45ea94e40ed83b04dc09384bf458e1))
* **internal:** codegen related update ([5cba4a2](https://github.com/zbdpay/zbd-payments-python-sdk/commit/5cba4a2c05d6d3a8a483ada0c22720aaeb619303))
* **tests:** skip some failing tests on the latest python versions ([680eed5](https://github.com/zbdpay/zbd-payments-python-sdk/commit/680eed5b78810d2296df2e60a3c8bf0f11c73d51))
* update SDK settings ([9be94bf](https://github.com/zbdpay/zbd-payments-python-sdk/commit/9be94bf044c25787f3832724f9f00ad05e0d5878))
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ $ rye sync --all-features
You can then run scripts using `rye run python script.py` or by activating the virtual environment:

```sh
$ rye shell
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
$ source .venv/bin/activate

# now you can omit the `rye run` prefix
Expand All @@ -37,7 +36,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/zbdpay_payments_sdk/lib/` and `examples/` directories.
modify the contents of the `src/zbdpay/lib/` and `examples/` directories.

## Adding and running examples

Expand All @@ -63,7 +62,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://git@github.com/stainless-sdks/zbd-payments-python.git
$ pip install git+ssh://git@github.com/zbdpay/zbd-payments-python-sdk.git
```

Alternatively, you can build from source and install the wheel file:
Expand Down Expand Up @@ -121,7 +120,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/zbd-payments-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/zbdpay/zbd-payments-python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.

### Publish manually

Expand Down
Loading