Skip to content

Commit be43bda

Browse files
committed
Merge branch 'latest-codegen-beta' of github.com:stripe/stripe-python into latest-codegen-beta
2 parents 6546a70 + 4ae0b97 commit be43bda

File tree

184 files changed

+13415
-814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+13415
-814
lines changed

.github/pull_request_template.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Why?
2+
<!-- Describe why this change is being made. Briefly include history and context, high-level what this PR does, and what the world looks like afterward. -->
3+
4+
### What?
5+
<!--
6+
List out the key changes made in this PR, e.g.
7+
- implements the antimatter particle trace in the nitronium microfilament drive
8+
- updated tests -->
9+
10+
### See Also
11+
<!-- Include any links or additional information that help explain this change. -->

.github/workflows/ci.yml

+45-53
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,47 @@ on:
1919

2020
jobs:
2121
lint:
22-
name: Lint & Mypy
23-
runs-on: ubuntu-latest
22+
name: Static Checks
23+
runs-on: "ubuntu-24.04"
2424
steps:
25+
- uses: extractions/setup-just@v2
2526
- uses: actions/checkout@v3
2627
- name: Set up Python 3
2728
uses: actions/setup-python@v4
2829
with:
2930
python-version: "3.10"
30-
- name: mypy
31-
run: make mypy
32-
- name: lint
33-
run: make lint
34-
- name: fmtcheck
35-
run: make fmtcheck
31+
- name: check examples w/ mypy (against [email protected])
32+
run: just typecheck-examples
33+
# skip deps on all these since mypy installed everything
34+
- name: check linting
35+
run: just --no-deps lint
36+
- name: check formatting
37+
run: just --no-deps format-check
38+
# pyright depends on node, which it handles and installs for itself as needed
39+
# we _could_ run setup-node to make it available for it if we're having reliability problems
40+
- name: check types (all Python versions)
41+
run: |
42+
set -eox
43+
44+
for minor in {6..12}; do
45+
just --no-deps typecheck $minor
46+
done
3647
3748
build:
3849
name: Build
39-
runs-on: ubuntu-latest
50+
runs-on: "ubuntu-24.04"
4051
steps:
52+
- uses: extractions/setup-just@v2
4153
- uses: actions/checkout@v3
4254

4355
- name: Set up Python 3
4456
uses: actions/setup-python@v4
4557
with:
4658
python-version: "3.10"
4759

48-
- name: Install tools
49-
run: make venv
50-
5160
- name: Build and check package
5261
run: |
53-
set -x
54-
source venv/bin/activate
55-
python setup.py clean --all sdist bdist_wheel --universal
56-
python -m twine check dist/*
62+
just build
5763
5864
- name: "Upload Artifact"
5965
uses: actions/upload-artifact@v3
@@ -69,45 +75,30 @@ jobs:
6975
strategy:
7076
fail-fast: false
7177
matrix:
72-
python:
73-
- { version: "3.6" , env: "py36" }
74-
- { version: "3.7" , env: "py37" }
75-
- { version: "3.8" , env: "py38" }
76-
- { version: "3.9" , env: "py39" }
77-
- { version: "3.10" , env: "py310" }
78-
- { version: "3.11" , env: "py311" }
79-
- { version: "3.12" , env: "py312" }
80-
- { version: "pypy-3.7" , env: "py3.7" }
81-
- { version: "pypy-3.8" , env: "py3.8" }
82-
- { version: "pypy-3.9" , env: "py3.9" }
83-
- { version: "pypy-3.10" , env: "py3.10" }
84-
name: Test (${{ matrix.python.version }})
78+
python_version:
79+
- "3.6"
80+
- "3.7"
81+
- "3.8"
82+
- "3.9"
83+
- "3.10"
84+
- "3.11"
85+
- "3.12"
86+
- "pypy-3.7"
87+
- "pypy-3.8"
88+
- "pypy-3.9"
89+
- "pypy-3.10"
90+
name: Test (${{ matrix.python_version }})
8591
steps:
92+
- uses: extractions/setup-just@v2
8693
- uses: actions/checkout@v3
87-
88-
- name: Set up Python ${{ matrix.python.version }} and 3.10
94+
- name: Set up Python ${{ matrix.python_version }}
8995
uses: actions/setup-python@v4
9096
with:
91-
python-version: |
92-
${{ matrix.python.version }}
93-
3.10
94-
97+
python-version: ${{ matrix.python_version }}
9598
- uses: stripe/openapi/actions/stripe-mock@master
9699

97-
- name: Typecheck with pyright
98-
run: PYRIGHT_ARGS="-- --pythonversion ${{ matrix.python.version }}" make pyright
99-
# Skip typecheking in pypy legs
100-
if: ${{ !contains(matrix.python.version, 'pypy') }}
101-
102-
- name: Test with pytest
103-
run: TOX_ARGS="-e ${{ matrix.python.env }}" make ci-test
104-
105-
- name: Calculate and publish coverage
106-
run: make coveralls
107-
if: env.COVERALLS_REPO_TOKEN && matrix.python.version == '3.10'
108-
env:
109-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
100+
- name: "run tests"
101+
run: just test
111102

112103
publish:
113104
name: Publish
@@ -116,7 +107,7 @@ jobs:
116107
startsWith(github.ref, 'refs/tags/v') &&
117108
endsWith(github.actor, '-stripe')
118109
needs: [build, test, lint]
119-
runs-on: ubuntu-latest
110+
runs-on: "ubuntu-24.04"
120111
steps:
121112
- uses: actions/checkout@v3
122113
- name: Download all workflow run artifacts
@@ -137,11 +128,12 @@ jobs:
137128
GPG_SIGNING_PRIVKEY: ${{ secrets.GPG_SIGNING_PRIVKEY }}
138129
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
139130
- name: Install tools
140-
run: make venv
141-
- name: Publish packages to PyPy
131+
run: just install-build-deps
132+
- name: Publish packages to PyPI
133+
# could probably move this into a just recipe too?
142134
run: |
143135
set -ex
144-
source venv/bin/activate
136+
source .venv/bin/activate
145137
export VERSION=$(cat VERSION)
146138
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION.tar.gz
147139
gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION-py2.py3-none-any.whl

0 commit comments

Comments
 (0)