Skip to content

Commit 723e27b

Browse files
authored
Merge branch 'main' into patch-1
2 parents 8ecbbb3 + 1023126 commit 723e27b

Some content is hidden

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

59 files changed

+399
-11264
lines changed

.github/workflows/build-docs.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
types:
88
- opened
99
- synchronize
10+
11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
14+
1015
jobs:
1116
changes:
1217
runs-on: ubuntu-latest
@@ -36,6 +41,7 @@ jobs:
3641
- mkdocs.no-insiders.yml
3742
- .github/workflows/build-docs.yml
3843
- .github/workflows/deploy-docs.yml
44+
- data/**
3945
4046
build-docs:
4147
needs:
@@ -52,17 +58,19 @@ jobs:
5258
uses: actions/setup-python@v5
5359
with:
5460
python-version: "3.11"
55-
- uses: actions/cache@v4
56-
id: cache
61+
- name: Setup uv
62+
uses: astral-sh/setup-uv@v5
5763
with:
58-
path: ${{ env.pythonLocation }}
59-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt', 'requirements-docs-insiders.txt', 'requirements-docs-tests.txt') }}-v02
64+
version: "0.4.15"
65+
enable-cache: true
66+
cache-dependency-glob: |
67+
requirements**.txt
68+
pyproject.toml
6069
- name: Install docs extras
61-
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-docs.txt
70+
run: uv pip install -r requirements-docs.txt
6371
- name: Install Material for MkDocs Insiders
64-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
65-
run: pip install -r requirements-docs-insiders.txt
72+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
73+
run: uv pip install -r requirements-docs-insiders.txt
6674
env:
6775
TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}
6876
- uses: actions/cache@v4

.github/workflows/deploy-docs.yml

Lines changed: 17 additions & 12 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,14 +28,16 @@ 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@v5
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:
@@ -55,19 +60,19 @@ jobs:
5560
# hashFiles returns an empty string if there are no files
5661
if: hashFiles('./site/*')
5762
id: deploy
58-
uses: cloudflare/pages-action@v1
63+
env:
64+
PROJECT_NAME: sqlmodel
65+
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 ) }}
66+
uses: cloudflare/wrangler-action@v3
5967
with:
6068
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6169
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62-
projectName: sqlmodel
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 == 'main' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
70+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6671
- name: Comment Deploy
6772
run: python ./scripts/deploy_docs_status.py
6873
env:
6974
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
75+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
7176
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7277
RUN_ID: ${{ github.run_id }}
7378
IS_DONE: "true"

.github/workflows/issue-manager.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ jobs:
3939
"waiting": {
4040
"delay": 2628000,
4141
"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."
4246
}
4347
}

.github/workflows/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
2022
# Run this after labeler applied labels
2123
check-labels:
2224
needs:

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
3131
with:
3232
limit-access-to-actor: true
33-
- uses: tiangolo/[email protected].1
33+
- uses: tiangolo/[email protected].2
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
latest_changes_file: docs/release-notes.md

.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.9.0
37+
uses: pypa/gh-action-pypi-publish@v1.12.3

.github/workflows/smokeshow.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,44 @@ on:
88
permissions:
99
statuses: write
1010

11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
1114
jobs:
1215
smokeshow:
1316
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1417
runs-on: ubuntu-latest
15-
1618
steps:
19+
- uses: actions/checkout@v4
1720
- uses: actions/setup-python@v5
1821
with:
1922
python-version: '3.9'
20-
21-
- run: pip install smokeshow
22-
23+
- name: Setup uv
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
version: "0.4.15"
27+
enable-cache: true
28+
cache-dependency-glob: |
29+
requirements**.txt
30+
pyproject.toml
31+
- run: uv pip install -r requirements-github-actions.txt
2332
- uses: actions/download-artifact@v4
2433
with:
2534
name: coverage-html
2635
path: htmlcov
2736
github-token: ${{ secrets.GITHUB_TOKEN }}
2837
run-id: ${{ github.event.workflow_run.id }}
29-
30-
- run: smokeshow upload htmlcov
38+
# Try 5 times to upload coverage to smokeshow
39+
- name: Upload coverage to Smokeshow
40+
run: |
41+
for i in 1 2 3 4 5; do
42+
if smokeshow upload htmlcov; then
43+
echo "Smokeshow upload success!"
44+
break
45+
fi
46+
echo "Smokeshow upload error, sleep 1 sec and try again."
47+
sleep 1
48+
done
3149
env:
3250
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
3351
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95

.github/workflows/test.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ on:
1818
# cron every week on monday
1919
- cron: "0 0 * * 1"
2020

21+
env:
22+
UV_SYSTEM_PYTHON: 1
23+
2124
jobs:
2225
test:
2326
runs-on: ubuntu-latest
2427
strategy:
2528
matrix:
2629
python-version:
27-
- "3.7"
2830
- "3.8"
2931
- "3.9"
3032
- "3.10"
@@ -34,33 +36,34 @@ jobs:
3436
- pydantic-v1
3537
- pydantic-v2
3638
fail-fast: false
37-
3839
steps:
3940
- uses: actions/checkout@v4
4041
- name: Set up Python
4142
uses: actions/setup-python@v5
4243
with:
4344
python-version: ${{ matrix.python-version }}
45+
- name: Setup uv
46+
uses: astral-sh/setup-uv@v5
47+
with:
48+
version: "0.4.15"
49+
enable-cache: true
50+
cache-dependency-glob: |
51+
requirements**.txt
52+
pyproject.toml
4453
# Allow debugging with tmate
4554
- name: Setup tmate session
4655
uses: mxschmitt/action-tmate@v3
4756
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
4857
with:
4958
limit-access-to-actor: true
50-
- uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: ${{ env.pythonLocation }}
54-
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-v01
5559
- name: Install Dependencies
56-
if: steps.cache.outputs.cache-hit != 'true'
57-
run: pip install -r requirements-tests.txt
60+
run: uv pip install -r requirements-tests.txt
5861
- name: Install Pydantic v1
5962
if: matrix.pydantic-version == 'pydantic-v1'
60-
run: pip install --upgrade "pydantic>=1.10.0,<2.0.0"
63+
run: uv pip install --upgrade "pydantic>=1.10.0,<2.0.0"
6164
- name: Install Pydantic v2
6265
if: matrix.pydantic-version == 'pydantic-v2'
63-
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
66+
run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
6467
- name: Lint
6568
# Do not run on Python 3.7 as mypy behaves differently
6669
if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
@@ -82,28 +85,31 @@ jobs:
8285
needs:
8386
- test
8487
runs-on: ubuntu-latest
85-
8688
steps:
8789
- uses: actions/checkout@v4
88-
8990
- uses: actions/setup-python@v5
9091
with:
9192
python-version: '3.12'
92-
93+
- name: Setup uv
94+
uses: astral-sh/setup-uv@v5
95+
with:
96+
version: "0.4.15"
97+
enable-cache: true
98+
cache-dependency-glob: |
99+
requirements**.txt
100+
pyproject.toml
93101
- name: Get coverage files
94102
uses: actions/download-artifact@v4
95103
with:
96104
pattern: coverage-*
97105
path: coverage
98106
merge-multiple: true
99-
100-
- run: pip install coverage[toml]
101-
107+
- name: Install Dependencies
108+
run: uv pip install -r requirements-tests.txt
102109
- run: ls -la coverage
103110
- run: coverage combine coverage
104111
- run: coverage report
105112
- run: coverage html --title "Coverage for ${{ github.sha }}"
106-
107113
- name: Store coverage HTML
108114
uses: actions/upload-artifact@v4
109115
with:

data/members.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
members:
22
- login: tiangolo
3-
- login: estebanx64
43
- login: alejsdev

0 commit comments

Comments
 (0)