Skip to content

Commit fb9d26e

Browse files
authored
Merge branch 'main' into multipart-boundary
2 parents b1ca087 + 6df45e9 commit fb9d26e

397 files changed

Lines changed: 18161 additions & 7017 deletions

File tree

Some content is hidden

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

.changeset/const_values_are_now_validated_at_runtime.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.changeset/switch_yaml_parsing_to_12.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/checks.yml

Lines changed: 62 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
test:
1212
strategy:
1313
matrix:
14-
python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
14+
python: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
1515
os: [ ubuntu-latest, macos-latest, windows-latest ]
1616
runs-on: ${{ matrix.os }}
1717
steps:
18-
- uses: actions/checkout@v4.1.3
18+
- uses: actions/checkout@v6.0.2
1919
- name: Set up Python
20-
uses: actions/setup-python@v5.1.0
20+
uses: actions/setup-python@v6.2.0
2121
with:
2222
python-version: ${{ matrix.python }}
2323

@@ -27,7 +27,7 @@ jobs:
2727
shell: bash
2828

2929
- name: Cache dependencies
30-
uses: actions/cache@v4
30+
uses: actions/cache@v5
3131
with:
3232
path: .venv
3333
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/pdm.lock') }}
@@ -42,9 +42,6 @@ jobs:
4242
- name: Check formatting
4343
run: pdm run ruff format . --check
4444

45-
- name: Run safety
46-
run: pdm safety_check
47-
4845
- name: Run mypy
4946
run: pdm mypy --show-error-codes
5047

@@ -54,37 +51,70 @@ jobs:
5451
- name: Run pytest without coverage
5552
if: matrix.os != 'ubuntu-latest'
5653
run: pdm test
57-
env:
58-
TASKIPY: true
5954

6055
- name: Run pytest with coverage
6156
if: matrix.os == 'ubuntu-latest'
6257
run: pdm test_with_coverage
63-
env:
64-
TASKIPY: true
65-
58+
6659
- run: mv .coverage .coverage.${{ matrix.python }}
6760
if: matrix.os == 'ubuntu-latest'
6861

6962
- name: Store coverage report
70-
uses: actions/upload-artifact@v4.3.3
63+
uses: actions/upload-artifact@v7.0.1
7164
if: matrix.os == 'ubuntu-latest'
7265
with:
7366
name: coverage-${{ matrix.python }}
7467
path: .coverage.${{ matrix.python }}
7568
if-no-files-found: error
69+
include-hidden-files: true
70+
71+
test_min_deps:
72+
strategy:
73+
matrix:
74+
os: [ ubuntu-latest, macos-latest, windows-latest ]
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- uses: actions/checkout@v6.0.2
78+
- name: Set up Python
79+
uses: actions/setup-python@v6.2.0
80+
with:
81+
python-version: "3.10"
82+
83+
- name: Get Python Version
84+
id: get_python_version
85+
run: echo "python_version=$(python --version)" >> $GITHUB_OUTPUT
86+
shell: bash
87+
88+
- name: Cache dependencies
89+
uses: actions/cache@v5
90+
with:
91+
path: .venv
92+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies-${{ hashFiles('**/pdm.lock') }}
93+
restore-keys: |
94+
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies
95+
- name: Install PDM
96+
run: pip install pdm
97+
98+
- name: Install minimum dependencies
99+
run: pdm install -L pdm.minimal.lock
100+
101+
- name: Run mypy
102+
run: pdm mypy --show-error-codes
103+
104+
- name: Run unit tests only # snapshots are expected to fail
105+
run: pdm unit_test
76106

77107
coverage:
78108
name: Combine & check coverage
79109
needs: test
80110
runs-on: ubuntu-latest
81111
steps:
82-
- uses: actions/checkout@v4.1.3
83-
- uses: actions/setup-python@v5
112+
- uses: actions/checkout@v6.0.2
113+
- uses: actions/setup-python@v6
84114
with:
85115
python-version: "3.12"
86116
- name: Download coverage reports
87-
uses: actions/download-artifact@v4.1.6
117+
uses: actions/download-artifact@v8.0.1
88118
with:
89119
merge-multiple: true
90120

@@ -98,18 +128,18 @@ jobs:
98128
99129
# Find all of the downloaded coverage reports and combine them
100130
.venv/bin/python -m coverage combine
101-
131+
102132
# Create html report
103133
.venv/bin/python -m coverage html --skip-covered --skip-empty
104-
134+
105135
# Report in Markdown and write to summary.
106136
.venv/bin/python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
107-
137+
108138
# Report again and fail if under 100%.
109-
.venv/bin/python -m coverage report --fail-under=100
139+
.venv/bin/python -m coverage report --fail-under=100
110140
111141
- name: Upload HTML report if check failed.
112-
uses: actions/upload-artifact@v4.3.3
142+
uses: actions/upload-artifact@v7.0.1
113143
with:
114144
name: html-report
115145
path: htmlcov
@@ -120,51 +150,35 @@ jobs:
120150
runs-on: ubuntu-latest
121151
strategy:
122152
matrix:
123-
httpx_version:
124-
- "0.20.0"
125-
- ""
153+
lockfile:
154+
- "pdm.lock"
155+
- "pdm.minimal.lock"
126156
services:
127157
openapi-test-server:
128-
image: ghcr.io/openapi-generators/openapi-test-server:0.0.1
158+
image: ghcr.io/openapi-generators/openapi-test-server:0.2.1
129159
ports:
130160
- "3000:3000"
131161
steps:
132-
- uses: actions/checkout@v4.1.3
162+
- uses: actions/checkout@v6.0.2
133163
- name: Set up Python
134-
uses: actions/setup-python@v5.1.0
164+
uses: actions/setup-python@v6.2.0
135165
with:
136-
python-version: "3.8"
166+
python-version: "3.10"
137167
- name: Get Python Version
138168
id: get_python_version
139169
run: echo "python_version=$(python --version)" >> $GITHUB_OUTPUT
140-
- name: Cache dependencies
141-
uses: actions/cache@v4
142-
with:
143-
path: .venv
144-
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/pdm.lock') }}
145-
restore-keys: |
146-
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies
147-
- name: Install dependencies
148-
run: |
149-
pip install pdm
150-
python -m venv .venv
151-
pdm install
152170
- name: Cache Generated Client Dependencies
153-
uses: actions/cache@v4
171+
uses: actions/cache@v5
154172
with:
155173
path: integration-tests/.venv
156-
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies-${{ hashFiles('**/pdm.lock') }}
174+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies-${{ hashFiles('integration-tests/pdm*.lock') }}
157175
restore-keys: |
158176
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies
159-
- name: Set httpx version
160-
if: matrix.httpx_version != ''
161-
run: |
162-
cd integration-tests
163-
pdm add httpx==${{ matrix.httpx_version }}
164177
- name: Install Integration Dependencies
165178
run: |
166179
cd integration-tests
167-
pdm install
180+
pip install pdm
181+
pdm install -L ${{ matrix.lockfile }}
168182
- name: Run Tests
169183
run: |
170184
cd integration-tests

.github/workflows/preview_release_pr.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/release-dry-run.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,17 @@ on:
77

88
jobs:
99
release:
10-
if: github.head_ref == 'release' && github.event.pull_request.merged == true
10+
if: github.head_ref == 'knope/release' && github.event.pull_request.merged == true
1111
runs-on: ubuntu-latest
1212
permissions:
1313
id-token: write
1414
steps:
15-
- uses: actions/checkout@v4.1.3
16-
with:
17-
fetch-depth: 0
18-
token: ${{ secrets.PAT }}
19-
- name: Install Knope
20-
uses: knope-dev/action@v2.1.0
21-
with:
22-
version: 0.16.2
15+
- uses: actions/checkout@v6.0.2
2316
- name: Install Hatchling
2417
run: pip install --upgrade hatchling
2518
- name: Build
2619
run: hatchling build
2720
- name: Push to PyPI
28-
uses: pypa/gh-action-pypi-publish@v1.8.14
29-
- name: Create GitHub Release
30-
run: knope release
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.PAT }}
21+
uses: pypa/gh-action-pypi-publish@v1.14.0
22+
with:
23+
attestations: true

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ dmypy.json
2424
# JetBrains
2525
.idea/
2626

27+
# Visual Studio Code
28+
.vscode/
29+
2730
test-reports/
2831

2932
/coverage.xml
@@ -33,4 +36,5 @@ htmlcov/
3336
# Generated end to end test data
3437
my-test-api-client/
3538
custom-e2e/
36-
3-1-features-client
39+
3-1-features-client
40+
tests/tmp

0 commit comments

Comments
 (0)