Skip to content

Commit 46218e9

Browse files
authored
Merge branch 'main' into issue-manager
2 parents 5a5eaa6 + 4aef35e commit 46218e9

File tree

14 files changed

+112
-56
lines changed

14 files changed

+112
-56
lines changed

.github/workflows/build-docs.yml

Lines changed: 15 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
@@ -52,17 +57,19 @@ jobs:
5257
uses: actions/setup-python@v5
5358
with:
5459
python-version: "3.11"
55-
- uses: actions/cache@v4
56-
id: cache
60+
- name: Setup uv
61+
uses: astral-sh/setup-uv@v3
5762
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
63+
version: "0.4.15"
64+
enable-cache: true
65+
cache-dependency-glob: |
66+
requirements**.txt
67+
pyproject.toml
6068
- name: Install docs extras
61-
if: steps.cache.outputs.cache-hit != 'true'
62-
run: pip install -r requirements-docs.txt
69+
run: uv pip install -r requirements-docs.txt
6370
- 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
71+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
72+
run: uv pip install -r requirements-docs-insiders.txt
6673
env:
6774
TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}
6875
- 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@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:
@@ -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: 5 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: "11 4 * * *"
5+
- cron: "13 18 * * *"
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,9 +36,9 @@ 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."
4142
},
4243
"invalid": {
4344
"delay": 0,

.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/smokeshow.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,33 @@ 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@v3
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-
3038
- run: smokeshow upload htmlcov
3139
env:
3240
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}

.github/workflows/test.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ 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
@@ -34,33 +37,34 @@ jobs:
3437
- pydantic-v1
3538
- pydantic-v2
3639
fail-fast: false
37-
3840
steps:
3941
- uses: actions/checkout@v4
4042
- name: Set up Python
4143
uses: actions/setup-python@v5
4244
with:
4345
python-version: ${{ matrix.python-version }}
46+
- name: Setup uv
47+
uses: astral-sh/setup-uv@v3
48+
with:
49+
version: "0.4.15"
50+
enable-cache: true
51+
cache-dependency-glob: |
52+
requirements**.txt
53+
pyproject.toml
4454
# Allow debugging with tmate
4555
- name: Setup tmate session
4656
uses: mxschmitt/action-tmate@v3
4757
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
4858
with:
4959
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
5560
- name: Install Dependencies
56-
if: steps.cache.outputs.cache-hit != 'true'
57-
run: pip install -r requirements-tests.txt
61+
run: uv pip install -r requirements-tests.txt
5862
- name: Install Pydantic v1
5963
if: matrix.pydantic-version == 'pydantic-v1'
60-
run: pip install --upgrade "pydantic>=1.10.0,<2.0.0"
64+
run: uv pip install --upgrade "pydantic>=1.10.0,<2.0.0"
6165
- name: Install Pydantic v2
6266
if: matrix.pydantic-version == 'pydantic-v2'
63-
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
67+
run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
6468
- name: Lint
6569
# Do not run on Python 3.7 as mypy behaves differently
6670
if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
@@ -69,7 +73,7 @@ jobs:
6973
- name: Test
7074
run: bash scripts/test.sh
7175
env:
72-
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
76+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
7377
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
7478
- name: Store coverage files
7579
uses: actions/upload-artifact@v4
@@ -82,28 +86,31 @@ jobs:
8286
needs:
8387
- test
8488
runs-on: ubuntu-latest
85-
8689
steps:
8790
- uses: actions/checkout@v4
88-
8991
- uses: actions/setup-python@v5
9092
with:
9193
python-version: '3.12'
92-
94+
- name: Setup uv
95+
uses: astral-sh/setup-uv@v3
96+
with:
97+
version: "0.4.15"
98+
enable-cache: true
99+
cache-dependency-glob: |
100+
requirements**.txt
101+
pyproject.toml
93102
- name: Get coverage files
94103
uses: actions/download-artifact@v4
95104
with:
96105
pattern: coverage-*
97106
path: coverage
98107
merge-multiple: true
99-
100-
- run: pip install coverage[toml]
101-
108+
- name: Install Dependencies
109+
run: uv pip install -r requirements-tests.txt
102110
- run: ls -la coverage
103111
- run: coverage combine coverage
104112
- run: coverage report
105113
- run: coverage html --title "Coverage for ${{ github.sha }}"
106-
107114
- name: Store coverage HTML
108115
uses: actions/upload-artifact@v4
109116
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.6.2
17+
rev: v0.6.5
1818
hooks:
1919
- id: ruff
2020
args:

docs/release-notes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@
22

33
## Latest Changes
44

5+
### Refactors
6+
7+
* 🚨 Fix types for new Pydantic. PR [#1131](https://github.com/fastapi/sqlmodel/pull/1131) by [@tiangolo](https://github.com/tiangolo).
8+
59
### Docs
610

11+
* ✏️ Fix typo in documentation. PR [#1106](https://github.com/fastapi/sqlmodel/pull/1106) by [@Solipsistmonkey](https://github.com/Solipsistmonkey).
712
* 📝 Remove highlights in `indexes.md` . PR [#1100](https://github.com/fastapi/sqlmodel/pull/1100) by [@alejsdev](https://github.com/alejsdev).
813

914
### Internal
1015

16+
* 👷 Fix smokeshow, checkout files on CI. PR [#1136](https://github.com/fastapi/sqlmodel/pull/1136) by [@tiangolo](https://github.com/tiangolo).
17+
* 👷 Use uv in CI. PR [#1135](https://github.com/fastapi/sqlmodel/pull/1135) by [@tiangolo](https://github.com/tiangolo).
18+
* ➕ Add docs dependency markdown-include-variants. PR [#1129](https://github.com/fastapi/sqlmodel/pull/1129) by [@tiangolo](https://github.com/tiangolo).
19+
* 🔨 Update script to standardize format. PR [#1130](https://github.com/fastapi/sqlmodel/pull/1130) by [@tiangolo](https://github.com/tiangolo).
20+
* 👷 Update `labeler.yml`. PR [#1128](https://github.com/fastapi/sqlmodel/pull/1128) by [@tiangolo](https://github.com/tiangolo).
21+
* 👷 Update worfkow deploy-docs-notify URL. PR [#1126](https://github.com/fastapi/sqlmodel/pull/1126) by [@tiangolo](https://github.com/tiangolo).
22+
* 👷 Upgrade Cloudflare GitHub Action. PR [#1124](https://github.com/fastapi/sqlmodel/pull/1124) by [@tiangolo](https://github.com/tiangolo).
23+
*[pre-commit.ci] pre-commit autoupdate. PR [#1097](https://github.com/fastapi/sqlmodel/pull/1097) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
24+
* ⬆ Bump tiangolo/issue-manager from 0.5.0 to 0.5.1. PR [#1107](https://github.com/fastapi/sqlmodel/pull/1107) by [@dependabot[bot]](https://github.com/apps/dependabot).
25+
* 👷 Update `issue-manager.yml`. PR [#1103](https://github.com/fastapi/sqlmodel/pull/1103) by [@tiangolo](https://github.com/tiangolo).
26+
* 👷 Fix coverage processing in CI, one name per matrix run. PR [#1104](https://github.com/fastapi/sqlmodel/pull/1104) by [@tiangolo](https://github.com/tiangolo).
1127
* 💚 Set `include-hidden-files` to `True` when using the `upload-artifact` GH action. PR [#1098](https://github.com/fastapi/sqlmodel/pull/1098) by [@svlandeg](https://github.com/svlandeg).
1228
*[pre-commit.ci] pre-commit autoupdate. PR [#1088](https://github.com/fastapi/sqlmodel/pull/1088) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
1329

docs/tutorial/one.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,4 +710,4 @@ Hero: None
710710

711711
## Recap
712712

713-
As querying the SQL database for a single row is a common operation, you know have several tools to do it in a short and simple way. 🎉
713+
As querying the SQL database for a single row is a common operation, you now have several tools to do it in a short and simple way. 🎉

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ markdown_extensions:
184184

185185
# Other extensions
186186
mdx_include:
187+
markdown_include_variants:
187188

188189
extra:
189190
analytics:

0 commit comments

Comments
 (0)