Skip to content

Commit 36a7601

Browse files
authored
Merge branch 'main' into main
2 parents 332891d + a20a3a8 commit 36a7601

File tree

90 files changed

+6162
-969
lines changed

Some content is hidden

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

90 files changed

+6162
-969
lines changed

.github/actions/comment-docs-preview-in-pr/Dockerfile

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

.github/actions/comment-docs-preview-in-pr/action.yml

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

.github/actions/comment-docs-preview-in-pr/app/main.py

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

.github/workflows/build-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121
# For pull requests it's not necessary to checkout the code but for the main branch it is
22-
- uses: dorny/paths-filter@v2
22+
- uses: dorny/paths-filter@v3
2323
id: filter
2424
with:
2525
filters: |
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/setup-python@v5
5050
with:
5151
python-version: "3.11"
52-
- uses: actions/cache@v3
52+
- uses: actions/cache@v4
5353
id: cache
5454
with:
5555
path: ${{ env.pythonLocation }}
@@ -63,15 +63,15 @@ jobs:
6363
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
6464
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
6565
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/mkdocstrings-python.git
66-
- uses: actions/cache@v3
66+
- uses: actions/cache@v4
6767
with:
6868
key: mkdocs-cards-${{ github.ref }}
6969
path: .cache
7070
- name: Verify README
7171
run: python ./scripts/docs.py verify-readme
7272
- name: Build Docs
7373
run: python ./scripts/docs.py build
74-
- uses: actions/upload-artifact@v3
74+
- uses: actions/upload-artifact@v4
7575
with:
7676
name: docs-site
7777
path: ./site/**

.github/workflows/deploy-docs.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
deployments: write
11+
issues: write
12+
pull-requests: write
13+
914
jobs:
1015
deploy-docs:
1116
runs-on: ubuntu-latest
@@ -19,18 +24,16 @@ jobs:
1924
run: |
2025
rm -rf ./site
2126
mkdir ./site
22-
- name: Download Artifact Docs
23-
id: download
24-
uses: dawidd6/[email protected]
27+
- uses: actions/download-artifact@v4
2528
with:
26-
if_no_artifact_found: ignore
27-
github_token: ${{ secrets.GITHUB_TOKEN }}
28-
workflow: build-docs.yml
29-
run_id: ${{ github.event.workflow_run.id }}
30-
name: docs-site
3129
path: ./site/
30+
pattern: docs-site
31+
merge-multiple: true
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
run-id: ${{ github.event.workflow_run.id }}
3234
- name: Deploy to Cloudflare Pages
33-
if: steps.download.outputs.found_artifact == 'true'
35+
# hashFiles returns an empty string if there are no files
36+
if: hashFiles('./site/*')
3437
id: deploy
3538
uses: cloudflare/pages-action@v1
3639
with:
@@ -40,9 +43,22 @@ jobs:
4043
directory: './site'
4144
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
4245
branch: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'main' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
46+
- name: Set up Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: "3.11"
50+
- uses: actions/cache@v4
51+
id: cache
52+
with:
53+
path: ${{ env.pythonLocation }}
54+
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
55+
- name: Install GitHub Actions dependencies
56+
if: steps.cache.outputs.cache-hit != 'true'
57+
run: pip install -r requirements-github-actions.txt
4358
- name: Comment Deploy
4459
if: steps.deploy.outputs.url != ''
45-
uses: ./.github/actions/comment-docs-preview-in-pr
46-
with:
47-
token: ${{ secrets.GITHUB_TOKEN }}
48-
deploy_url: "${{ steps.deploy.outputs.url }}"
60+
run: python ./scripts/comment_docs_deploy_url_in_pr.py
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
64+
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}

.github/workflows/issue-manager.yml

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

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: "11 4 * * *"
66
issue_comment:
77
types:
88
- created
@@ -14,17 +14,29 @@ on:
1414
- labeled
1515
workflow_dispatch:
1616

17+
permissions:
18+
issues: write
19+
1720
jobs:
1821
issue-manager:
22+
if: github.repository_owner == 'tiangolo'
1923
runs-on: ubuntu-latest
2024
steps:
21-
- uses: tiangolo/[email protected]
25+
- name: Dump GitHub context
26+
env:
27+
GITHUB_CONTEXT: ${{ toJson(github) }}
28+
run: echo "$GITHUB_CONTEXT"
29+
- uses: tiangolo/[email protected]
2230
with:
2331
token: ${{ secrets.GITHUB_TOKEN }}
2432
config: >
2533
{
2634
"answered": {
2735
"delay": 864000,
2836
"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."
37+
},
38+
"changes-requested": {
39+
"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."
2941
}
3042
}

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3535
run: python -m build
3636
- name: Publish
37-
uses: pypa/gh-action-pypi-publish@v1.8.11
37+
uses: pypa/gh-action-pypi-publish@v1.9.0

.github/workflows/smokeshow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ jobs:
2020

2121
- run: pip install smokeshow
2222

23-
- uses: dawidd6/action-download-artifact@v2.28.0
23+
- uses: actions/download-artifact@v4
2424
with:
25-
workflow: test.yml
26-
commit: ${{ github.event.workflow_run.head_sha }}
25+
name: coverage-html
26+
path: htmlcov
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
run-id: ${{ github.event.workflow_run.id }}
2729

28-
- run: smokeshow upload coverage-html
30+
- run: smokeshow upload htmlcov
2931
env:
3032
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
3133
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95

.github/workflows/test.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ jobs:
4747
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
4848
with:
4949
limit-access-to-actor: true
50-
- uses: actions/cache@v3
50+
- uses: actions/cache@v4
5151
id: cache
5252
with:
5353
path: ${{ env.pythonLocation }}
54-
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
54+
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-v01
5555
- name: Install Dependencies
5656
if: steps.cache.outputs.cache-hit != 'true'
5757
run: pip install -r requirements-tests.txt
@@ -60,7 +60,7 @@ jobs:
6060
run: pip install --upgrade "pydantic>=1.10.0,<2.0.0"
6161
- name: Install Pydantic v2
6262
if: matrix.pydantic-version == 'pydantic-v2'
63-
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0"
63+
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
6464
- name: Lint
6565
# Do not run on Python 3.7 as mypy behaves differently
6666
if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
@@ -72,9 +72,9 @@ jobs:
7272
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
7373
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
7474
- name: Store coverage files
75-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
7676
with:
77-
name: coverage
77+
name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
7878
path: coverage
7979
coverage-combine:
8080
needs:
@@ -89,10 +89,11 @@ jobs:
8989
python-version: '3.8'
9090

9191
- name: Get coverage files
92-
uses: actions/download-artifact@v3
92+
uses: actions/download-artifact@v4
9393
with:
94-
name: coverage
94+
pattern: coverage-*
9595
path: coverage
96+
merge-multiple: true
9697

9798
- run: pip install coverage[toml]
9899

@@ -102,7 +103,7 @@ jobs:
102103
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
103104

104105
- name: Store coverage HTML
105-
uses: actions/upload-artifact@v3
106+
uses: actions/upload-artifact@v4
106107
with:
107108
name: coverage-html
108109
path: htmlcov

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_language_version:
44
python: python3.10
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.5.0
7+
rev: v4.6.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-toml
@@ -14,7 +14,7 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.2.0
17+
rev: v0.5.2
1818
hooks:
1919
- id: ruff
2020
args:

0 commit comments

Comments
 (0)