Skip to content

Commit 63e5079

Browse files
authored
Merge branch 'master' into fix-duplicate-special-dependency-handling
2 parents 817c1b8 + b707bb8 commit 63e5079

1,988 files changed

Lines changed: 62151 additions & 14972 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.

.github/labeler.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ internal:
2929
- scripts/**
3030
- .gitignore
3131
- .pre-commit-config.yaml
32-
- pdm_build.py
33-
- requirements*.txt
3432
- uv.lock
3533
- docs/en/data/sponsors.yml
3634
- docs/en/overrides/main.html

.github/workflows/build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v6
2222
# For pull requests it's not necessary to checkout the code but for the main branch it is
23-
- uses: dorny/paths-filter@v3
23+
- uses: dorny/paths-filter@v4
2424
id: filter
2525
with:
2626
filters: |
@@ -97,7 +97,7 @@ jobs:
9797
path: docs/${{ matrix.lang }}/.cache
9898
- name: Build Docs
9999
run: uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
100-
- uses: actions/upload-artifact@v6
100+
- uses: actions/upload-artifact@v7
101101
with:
102102
name: docs-site-${{ matrix.lang }}
103103
path: ./site/**

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
rm -rf ./site
4747
mkdir ./site
48-
- uses: actions/download-artifact@v7
48+
- uses: actions/download-artifact@v8
4949
with:
5050
path: ./site/
5151
pattern: docs-site-*

.github/workflows/publish.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ on:
88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
package:
14-
- fastapi
15-
- fastapi-slim
1611
permissions:
1712
id-token: write
1813
contents: read
@@ -26,14 +21,9 @@ jobs:
2621
uses: actions/setup-python@v6
2722
with:
2823
python-version-file: ".python-version"
29-
# Issue ref: https://github.com/actions/setup-python/issues/436
30-
# cache: "pip"
31-
# cache-dependency-path: pyproject.toml
3224
- name: Install uv
3325
uses: astral-sh/setup-uv@v7
3426
- name: Build distribution
3527
run: uv build
36-
env:
37-
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3828
- name: Publish
3929
run: uv publish

.github/workflows/smokeshow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
pyproject.toml
2929
uv.lock
3030
- run: uv sync --locked --no-dev --group github-actions
31-
- uses: actions/download-artifact@v7
31+
- uses: actions/download-artifact@v8
3232
with:
3333
name: coverage-html
3434
path: htmlcov

.github/workflows/test.yml

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v6
3030
# For pull requests it's not necessary to checkout the code but for the main branch it is
31-
- uses: dorny/paths-filter@v3
31+
- uses: dorny/paths-filter@v4
3232
id: filter
3333
with:
3434
filters: |
@@ -45,7 +45,7 @@ jobs:
4545
test:
4646
needs:
4747
- changes
48-
if: needs.changes.outputs.src == 'true'
48+
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
4949
strategy:
5050
matrix:
5151
os: [ windows-latest, macos-latest ]
@@ -68,10 +68,8 @@ jobs:
6868
python-version: "3.13"
6969
coverage: coverage
7070
uv-resolution: highest
71-
# Ubuntu with 3.13 needs coverage for CodSpeed benchmarks
7271
- os: ubuntu-latest
7372
python-version: "3.13"
74-
coverage: coverage
7573
uv-resolution: highest
7674
codspeed: codspeed
7775
- os: ubuntu-latest
@@ -109,29 +107,52 @@ jobs:
109107
run: uv pip install "git+https://github.com/Kludex/starlette@main"
110108
- run: mkdir coverage
111109
- name: Test
112-
if: matrix.codspeed != 'codspeed'
113-
run: uv run --no-sync bash scripts/test.sh
110+
run: uv run --no-sync bash scripts/test-cov.sh
114111
env:
115112
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
116113
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
117-
- name: CodSpeed benchmarks
118-
if: matrix.codspeed == 'codspeed'
119-
uses: CodSpeedHQ/action@v4
120-
env:
121-
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
122-
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
123-
with:
124-
mode: simulation
125-
run: uv run --no-sync coverage run -m pytest tests/ --codspeed
126114
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
127115
- name: Store coverage files
128116
if: matrix.coverage == 'coverage'
129-
uses: actions/upload-artifact@v6
117+
uses: actions/upload-artifact@v7
130118
with:
131119
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/coverage/.coverage.*') }}
132120
path: coverage
133121
include-hidden-files: true
134122

123+
benchmark:
124+
needs:
125+
- changes
126+
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
127+
runs-on: ubuntu-latest
128+
env:
129+
UV_PYTHON: "3.13"
130+
UV_RESOLUTION: highest
131+
steps:
132+
- name: Dump GitHub context
133+
env:
134+
GITHUB_CONTEXT: ${{ toJson(github) }}
135+
run: echo "$GITHUB_CONTEXT"
136+
- uses: actions/checkout@v6
137+
- name: Set up Python
138+
uses: actions/setup-python@v6
139+
with:
140+
python-version: "3.13"
141+
- name: Setup uv
142+
uses: astral-sh/setup-uv@v7
143+
with:
144+
enable-cache: true
145+
cache-dependency-glob: |
146+
pyproject.toml
147+
uv.lock
148+
- name: Install Dependencies
149+
run: uv sync --no-dev --group tests --extra all
150+
- name: CodSpeed benchmarks
151+
uses: CodSpeedHQ/action@v4
152+
with:
153+
mode: simulation
154+
run: uv run --no-sync pytest tests/benchmarks --codspeed
155+
135156
coverage-combine:
136157
needs:
137158
- test
@@ -155,7 +176,7 @@ jobs:
155176
- name: Install Dependencies
156177
run: uv sync --locked --no-dev --group tests --extra all
157178
- name: Get coverage files
158-
uses: actions/download-artifact@v7
179+
uses: actions/download-artifact@v8
159180
with:
160181
pattern: coverage-*
161182
path: coverage
@@ -164,7 +185,7 @@ jobs:
164185
- run: uv run coverage combine coverage
165186
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
166187
- name: Store coverage HTML
167-
uses: actions/upload-artifact@v6
188+
uses: actions/upload-artifact@v7
168189
with:
169190
name: coverage-html
170191
path: htmlcov
@@ -176,6 +197,7 @@ jobs:
176197
if: always()
177198
needs:
178199
- coverage-combine
200+
- benchmark
179201
runs-on: ubuntu-latest
180202
steps:
181203
- name: Dump GitHub context
@@ -186,4 +208,4 @@ jobs:
186208
uses: re-actors/alls-green@release/v1
187209
with:
188210
jobs: ${{ toJSON(needs) }}
189-
allowed-skips: coverage-combine,test
211+
allowed-skips: coverage-combine,test,benchmark

.github/workflows/translate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Translate
22

33
on:
4-
# schedule:
5-
# - cron: "0 5 15 * *" # Run at 05:00 on the 15 of every month
4+
schedule:
5+
- cron: "0 5 1,15 * *" # Run at 05:00 on the 1st and 15th of every month
66

77
workflow_dispatch:
88
inputs:
@@ -119,5 +119,5 @@ jobs:
119119
LANGUAGE: ${{ matrix.lang }}
120120
EN_PATH: ${{ github.event.inputs.en_path }}
121121
COMMAND: ${{ matrix.command }}
122-
COMMIT_IN_PLACE: ${{ github.event.inputs.commit_in_place }}
122+
COMMIT_IN_PLACE: ${{ github.event.inputs.commit_in_place == 'true' && 'true' || '' }}
123123
MAX: ${{ github.event.inputs.max }}

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ repos:
3737
language: unsupported
3838
pass_filenames: false
3939

40+
- id: local-ty
41+
name: ty check
42+
entry: uv run ty check fastapi
43+
require_serial: true
44+
language: unsupported
45+
pass_filenames: false
46+
4047
- id: add-permalinks-pages
4148
language: unsupported
4249
name: add-permalinks-pages

0 commit comments

Comments
 (0)