Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5f8320

Browse files
authored
Merge branch 'master' into french-translation
2 parents 21cefa0 + df6d1de commit f5f8320

988 files changed

Lines changed: 31163 additions & 23338 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/actions/people/app/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,9 @@ def get_individual_sponsors(settings: Settings):
515515

516516
tiers: DefaultDict[float, Dict[str, SponsorEntity]] = defaultdict(dict)
517517
for node in nodes:
518-
tiers[node.tier.monthlyPriceInDollars][
519-
node.sponsorEntity.login
520-
] = node.sponsorEntity
518+
tiers[node.tier.monthlyPriceInDollars][node.sponsorEntity.login] = (
519+
node.sponsorEntity
520+
)
521521
return tiers
522522

523523

.github/labeler.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- docs/en/docs/**
6+
- docs_src/**
7+
- all-globs-to-all-files:
8+
- '!fastapi/**'
9+
- '!pyproject.toml'
10+
- '!docs/en/data/sponsors.yml'
11+
- '!docs/en/overrides/main.html'
12+
13+
lang-all:
14+
- all:
15+
- changed-files:
16+
- any-glob-to-any-file:
17+
- docs/*/docs/**
18+
- all-globs-to-all-files:
19+
- '!docs/en/docs/**'
20+
- '!fastapi/**'
21+
- '!pyproject.toml'
22+
23+
internal:
24+
- all:
25+
- changed-files:
26+
- any-glob-to-any-file:
27+
- .github/**
28+
- scripts/**
29+
- .gitignore
30+
- .pre-commit-config.yaml
31+
- pdm_build.py
32+
- requirements*.txt
33+
- docs/en/data/sponsors.yml
34+
- docs/en/overrides/main.html
35+
- all-globs-to-all-files:
36+
- '!docs/*/docs/**'
37+
- '!fastapi/**'
38+
- '!pyproject.toml'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Project
2+
3+
on:
4+
pull_request_target:
5+
issues:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
add-to-project:
12+
name: Add to project
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
project-url: https://github.com/orgs/fastapi/projects/2
18+
github-token: ${{ secrets.PROJECTS_TOKEN }}

.github/workflows/build-docs.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
types:
88
- opened
99
- synchronize
10+
11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
1014
jobs:
1115
changes:
1216
runs-on: ubuntu-latest
@@ -48,18 +52,20 @@ jobs:
4852
uses: actions/setup-python@v5
4953
with:
5054
python-version: "3.11"
51-
- uses: actions/cache@v4
52-
id: cache
55+
- name: Setup uv
56+
uses: astral-sh/setup-uv@v3
5357
with:
54-
path: ${{ env.pythonLocation }}
55-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v08
58+
version: "0.4.15"
59+
enable-cache: true
60+
cache-dependency-glob: |
61+
requirements**.txt
62+
pyproject.toml
5663
- name: Install docs extras
57-
if: steps.cache.outputs.cache-hit != 'true'
58-
run: pip install -r requirements-docs.txt
64+
run: uv pip install -r requirements-docs.txt
5965
# Install MkDocs Material Insiders here just to put it in the cache for the rest of the steps
6066
- name: Install Material for MkDocs Insiders
61-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-docs-insiders.txt
67+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
68+
run: uv pip install -r requirements-docs-insiders.txt
6369
env:
6470
TOKEN: ${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}
6571
- name: Verify Docs
@@ -88,17 +94,19 @@ jobs:
8894
uses: actions/setup-python@v5
8995
with:
9096
python-version: "3.11"
91-
- uses: actions/cache@v4
92-
id: cache
97+
- name: Setup uv
98+
uses: astral-sh/setup-uv@v3
9399
with:
94-
path: ${{ env.pythonLocation }}
95-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v08
100+
version: "0.4.15"
101+
enable-cache: true
102+
cache-dependency-glob: |
103+
requirements**.txt
104+
pyproject.toml
96105
- name: Install docs extras
97-
if: steps.cache.outputs.cache-hit != 'true'
98-
run: pip install -r requirements-docs.txt
106+
run: uv pip install -r requirements-docs.txt
99107
- name: Install Material for MkDocs Insiders
100-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
101-
run: pip install -r requirements-docs-insiders.txt
108+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
109+
run: uv pip install -r requirements-docs-insiders.txt
102110
env:
103111
TOKEN: ${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}
104112
- name: Update Languages
@@ -113,6 +121,7 @@ jobs:
113121
with:
114122
name: docs-site-${{ matrix.lang }}
115123
path: ./site/**
124+
include-hidden-files: true
116125

117126
# https://github.com/marketplace/actions/alls-green#why
118127
docs-all-green: # This job does nothing and is only used for the branch protection

.github/workflows/deploy-docs.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ permissions:
1212
pull-requests: write
1313
statuses: write
1414

15+
env:
16+
UV_SYSTEM_PYTHON: 1
17+
1518
jobs:
1619
deploy-docs:
1720
runs-on: ubuntu-latest
@@ -25,21 +28,22 @@ jobs:
2528
uses: actions/setup-python@v5
2629
with:
2730
python-version: "3.11"
28-
- uses: actions/cache@v4
29-
id: cache
31+
- name: Setup uv
32+
uses: astral-sh/setup-uv@v3
3033
with:
31-
path: ${{ env.pythonLocation }}
32-
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
34+
version: "0.4.15"
35+
enable-cache: true
36+
cache-dependency-glob: |
37+
requirements**.txt
38+
pyproject.toml
3339
- name: Install GitHub Actions dependencies
34-
if: steps.cache.outputs.cache-hit != 'true'
35-
run: pip install -r requirements-github-actions.txt
40+
run: uv pip install -r requirements-github-actions.txt
3641
- name: Deploy Docs Status Pending
3742
run: python ./scripts/deploy_docs_status.py
3843
env:
3944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4045
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
4146
RUN_ID: ${{ github.run_id }}
42-
4347
- name: Clean site
4448
run: |
4549
rm -rf ./site
@@ -55,19 +59,22 @@ jobs:
5559
# hashFiles returns an empty string if there are no files
5660
if: hashFiles('./site/*')
5761
id: deploy
58-
uses: cloudflare/pages-action@v1
62+
env:
63+
PROJECT_NAME: fastapitiangolo
64+
BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
65+
# TODO: Use v3 when it's fixed, probably in v3.11
66+
# https://github.com/cloudflare/wrangler-action/issues/307
67+
uses: cloudflare/[email protected]
68+
# uses: cloudflare/wrangler-action@v3
5969
with:
6070
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6171
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62-
projectName: fastapitiangolo
63-
directory: './site'
64-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
65-
branch: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
72+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6673
- name: Comment Deploy
6774
run: python ./scripts/deploy_docs_status.py
6875
env:
6976
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
77+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
7178
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7279
RUN_ID: ${{ github.run_id }}
7380
IS_DONE: "true"

.github/workflows/issue-manager.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Issue Manager
22

33
on:
44
schedule:
5-
- cron: "10 3 * * *"
5+
- cron: "13 22 * * *"
66
issue_comment:
77
types:
88
- created
@@ -16,6 +16,7 @@ on:
1616

1717
permissions:
1818
issues: write
19+
pull-requests: write
1920

2021
jobs:
2122
issue-manager:
@@ -26,7 +27,7 @@ jobs:
2627
env:
2728
GITHUB_CONTEXT: ${{ toJson(github) }}
2829
run: echo "$GITHUB_CONTEXT"
29-
- uses: tiangolo/[email protected].0
30+
- uses: tiangolo/[email protected].1
3031
with:
3132
token: ${{ secrets.GITHUB_TOKEN }}
3233
config: >
@@ -35,8 +36,12 @@ jobs:
3536
"delay": 864000,
3637
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
3738
},
38-
"changes-requested": {
39+
"waiting": {
3940
"delay": 2628000,
40-
"message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
41+
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
42+
},
43+
"invalid": {
44+
"delay": 0,
45+
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
4146
}
4247
}

.github/workflows/label-approved.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
permissions:
99
pull-requests: write
1010

11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
1114
jobs:
1215
label-approved:
1316
if: github.repository_owner == 'fastapi'
@@ -17,10 +20,26 @@ jobs:
1720
env:
1821
GITHUB_CONTEXT: ${{ toJson(github) }}
1922
run: echo "$GITHUB_CONTEXT"
20-
- uses: docker://tiangolo/label-approved:0.0.4
23+
- uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
- name: Setup uv
29+
uses: astral-sh/setup-uv@v3
2130
with:
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
config: >
31+
version: "0.4.15"
32+
enable-cache: true
33+
cache-dependency-glob: |
34+
requirements**.txt
35+
pyproject.toml
36+
- name: Install GitHub Actions dependencies
37+
run: uv pip install -r requirements-github-actions.txt
38+
- name: Label Approved
39+
run: python ./scripts/label_approved.py
40+
env:
41+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
CONFIG: >
2443
{
2544
"approved-1":
2645
{

.github/workflows/labeler.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
22+
# Run this after labeler applied labels
23+
check-labels:
24+
needs:
25+
- labeler
26+
permissions:
27+
pull-requests: read
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: docker://agilepathway/pull-request-label-checker:latest
31+
with:
32+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
3535
with:
3636
limit-access-to-actor: true
37-
- uses: docker://tiangolo/latest-changes:0.3.0
38-
# - uses: tiangolo/latest-changes@main
37+
- uses: tiangolo/[email protected]
3938
with:
4039
token: ${{ secrets.GITHUB_TOKEN }}
4140
latest_changes_file: docs/en/docs/release-notes.md

.github/workflows/notify-translations.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
permissions:
1919
discussions: write
2020

21+
env:
22+
UV_SYSTEM_PYTHON: 1
23+
2124
jobs:
2225
notify-translations:
2326
runs-on: ubuntu-latest
@@ -27,6 +30,19 @@ jobs:
2730
GITHUB_CONTEXT: ${{ toJson(github) }}
2831
run: echo "$GITHUB_CONTEXT"
2932
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v4
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.11"
38+
- name: Setup uv
39+
uses: astral-sh/setup-uv@v3
40+
with:
41+
version: "0.4.15"
42+
enable-cache: true
43+
cache-dependency-glob: |
44+
requirements**.txt
45+
pyproject.toml
3046
# Allow debugging with tmate
3147
- name: Setup tmate session
3248
uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)