Skip to content

Commit 652adf6

Browse files
committed
Merge branch 'main' into dependabot/pip/dirty-equals-0.11
2 parents ef36dd2 + d7b596b commit 652adf6

211 files changed

Lines changed: 2306 additions & 14749 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/workflows/build-docs.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
docs: ${{ steps.filter.outputs.docs }}
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
# For pull requests it's not necessary to checkout the code but for the main branch it is
2727
- uses: dorny/paths-filter@v3
2828
id: filter
@@ -33,12 +33,9 @@ jobs:
3333
- docs/**
3434
- docs_src/**
3535
- requirements-docs.txt
36-
- requirements-docs-insiders.txt
3736
- pyproject.toml
3837
- mkdocs.yml
39-
- mkdocs.insiders.yml
40-
- mkdocs.maybe-insiders.yml
41-
- mkdocs.no-insiders.yml
38+
- mkdocs.env.yml
4239
- .github/workflows/build-docs.yml
4340
- .github/workflows/deploy-docs.yml
4441
- data/**
@@ -53,7 +50,7 @@ jobs:
5350
env:
5451
GITHUB_CONTEXT: ${{ toJson(github) }}
5552
run: echo "$GITHUB_CONTEXT"
56-
- uses: actions/checkout@v5
53+
- uses: actions/checkout@v6
5754
- name: Set up Python
5855
uses: actions/setup-python@v6
5956
with:
@@ -68,20 +65,15 @@ jobs:
6865
pyproject.toml
6966
- name: Install docs extras
7067
run: uv pip install -r requirements-docs.txt
71-
- name: Install Material for MkDocs Insiders
72-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
73-
run: uv pip install -r requirements-docs-insiders.txt
74-
env:
75-
TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}
76-
- uses: actions/cache@v4
68+
- uses: actions/cache@v5
7769
with:
7870
key: mkdocs-cards-${{ github.ref }}
7971
path: .cache
8072
- name: Verify README
8173
run: python ./scripts/docs.py verify-readme
8274
- name: Build Docs
8375
run: python ./scripts/docs.py build
84-
- uses: actions/upload-artifact@v5
76+
- uses: actions/upload-artifact@v6
8577
with:
8678
name: docs-site
8779
path: ./site/**

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
env:
2424
GITHUB_CONTEXT: ${{ toJson(github) }}
2525
run: echo "$GITHUB_CONTEXT"
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727
- name: Set up Python
2828
uses: actions/setup-python@v6
2929
with:
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
rm -rf ./site
5151
mkdir ./site
52-
- uses: actions/download-artifact@v6
52+
- uses: actions/download-artifact@v7
5353
with:
5454
path: ./site/
5555
pattern: docs-site

.github/workflows/latest-changes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
latest-changes:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424
with:
2525
# To allow latest-changes to commit to the main branch
2626
token: ${{ secrets.SQLMODEL_LATEST_CHANGES }}
@@ -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/latest-changes@0.4.0
33+
- uses: tiangolo/latest-changes@0.4.1
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
latest_changes_file: docs/release-notes.md

.github/workflows/pre-commit.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
env:
10+
# Forks and Dependabot don't have access to secrets
11+
HAS_SECRETS: ${{ secrets.PRE_COMMIT != '' }}
12+
13+
jobs:
14+
pre-commit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Dump GitHub context
18+
env:
19+
GITHUB_CONTEXT: ${{ toJson(github) }}
20+
run: echo "$GITHUB_CONTEXT"
21+
- uses: actions/checkout@v6
22+
name: Checkout PR for own repo
23+
if: env.HAS_SECRETS == 'true'
24+
with:
25+
# To be able to commit it needs to fetch the head of the branch, not the
26+
# merge commit
27+
ref: ${{ github.head_ref }}
28+
# And it needs the full history to be able to compute diffs
29+
fetch-depth: 0
30+
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
31+
token: ${{ secrets.PRE_COMMIT }}
32+
# pre-commit lite ci needs the default checkout configs to work
33+
- uses: actions/checkout@v6
34+
name: Checkout PR for fork
35+
if: env.HAS_SECRETS == 'false'
36+
with:
37+
# To be able to commit it needs the head branch of the PR, the remote one
38+
ref: ${{ github.event.pull_request.head.sha }}
39+
fetch-depth: 0
40+
- name: Set up Python
41+
uses: actions/setup-python@v6
42+
with:
43+
python-version: "3.14"
44+
- name: Setup uv
45+
uses: astral-sh/setup-uv@v7
46+
with:
47+
cache-dependency-glob: |
48+
requirements**.txt
49+
pyproject.toml
50+
uv.lock
51+
- name: Install Dependencies
52+
run: |
53+
uv venv
54+
uv pip install -r requirements.txt
55+
- name: Run prek - pre-commit
56+
id: precommit
57+
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
58+
continue-on-error: true
59+
- name: Commit and push changes
60+
if: env.HAS_SECRETS == 'true'
61+
run: |
62+
git config user.name "github-actions[bot]"
63+
git config user.email "github-actions[bot]@users.noreply.github.com"
64+
git add -A
65+
if git diff --staged --quiet; then
66+
echo "No changes to commit"
67+
else
68+
git commit -m "🎨 Auto format"
69+
git push
70+
fi
71+
- uses: pre-commit-ci/lite-action@v1.1.0
72+
if: env.HAS_SECRETS == 'false'
73+
with:
74+
msg: 🎨 Auto format
75+
- name: Error out on pre-commit errors
76+
if: steps.precommit.outcome == 'failure'
77+
run: exit 1
78+
79+
# https://github.com/marketplace/actions/alls-green#why
80+
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
81+
if: always()
82+
needs:
83+
- pre-commit
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Dump GitHub context
87+
env:
88+
GITHUB_CONTEXT: ${{ toJson(github) }}
89+
run: echo "$GITHUB_CONTEXT"
90+
- name: Decide whether the needed jobs succeeded or failed
91+
uses: re-actors/alls-green@release/v1
92+
with:
93+
jobs: ${{ toJSON(needs) }}

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
permissions:
2323
id-token: write
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
- name: Set up Python
2727
uses: actions/setup-python@v6
2828
with:

.github/workflows/smokeshow.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,20 @@ env:
1313

1414
jobs:
1515
smokeshow:
16-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1716
runs-on: ubuntu-latest
1817
steps:
19-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
2019
- uses: actions/setup-python@v6
2120
with:
22-
python-version: '3.9'
21+
python-version: '3.13'
2322
- name: Setup uv
2423
uses: astral-sh/setup-uv@v7
2524
with:
26-
version: "0.4.15"
27-
enable-cache: true
2825
cache-dependency-glob: |
2926
requirements**.txt
3027
pyproject.toml
3128
- run: uv pip install -r requirements-github-actions.txt
32-
- uses: actions/download-artifact@v6
29+
- uses: actions/download-artifact@v7
3330
with:
3431
name: coverage-html
3532
path: htmlcov
@@ -48,7 +45,7 @@ jobs:
4845
done
4946
env:
5047
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
51-
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95
48+
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 99
5249
SMOKESHOW_GITHUB_CONTEXT: coverage
5350
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5451
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}

.github/workflows/test-redistribute.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
env:
2323
GITHUB_CONTEXT: ${{ toJson(github) }}
2424
run: echo "$GITHUB_CONTEXT"
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
- name: Set up Python
2727
uses: actions/setup-python@v6
2828
with:

.github/workflows/test.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
fail-fast: false
5555
runs-on: ${{ matrix.os }}
5656
steps:
57-
- uses: actions/checkout@v5
57+
- uses: actions/checkout@v6
5858
- name: Set up Python
5959
uses: actions/setup-python@v6
6060
with:
@@ -81,17 +81,14 @@ jobs:
8181
- name: Install Pydantic v2
8282
if: matrix.pydantic-version == 'pydantic-v2'
8383
run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0"
84-
- name: Lint
85-
if: matrix.pydantic-version == 'pydantic-v2' && matrix.python-version != '3.8'
86-
run: bash scripts/lint.sh
8784
- run: mkdir coverage
8885
- name: Test
8986
run: bash scripts/test.sh
9087
env:
9188
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
9289
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
9390
- name: Store coverage files
94-
uses: actions/upload-artifact@v5
91+
uses: actions/upload-artifact@v6
9592
with:
9693
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
9794
path: coverage
@@ -102,7 +99,7 @@ jobs:
10299
- test
103100
runs-on: ubuntu-latest
104101
steps:
105-
- uses: actions/checkout@v5
102+
- uses: actions/checkout@v6
106103
- uses: actions/setup-python@v6
107104
with:
108105
python-version: '3.13'
@@ -115,7 +112,7 @@ jobs:
115112
requirements**.txt
116113
pyproject.toml
117114
- name: Get coverage files
118-
uses: actions/download-artifact@v6
115+
uses: actions/download-artifact@v7
119116
with:
120117
pattern: coverage-*
121118
path: coverage
@@ -124,14 +121,14 @@ jobs:
124121
run: uv pip install -r requirements-tests.txt
125122
- run: ls -la coverage
126123
- run: coverage combine coverage
127-
- run: coverage report
128124
- run: coverage html --title "Coverage for ${{ github.sha }}"
129125
- name: Store coverage HTML
130-
uses: actions/upload-artifact@v5
126+
uses: actions/upload-artifact@v6
131127
with:
132128
name: coverage-html
133129
path: htmlcov
134130
include-hidden-files: true
131+
- run: coverage report --fail-under=99
135132

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

.pre-commit-config.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3-
default_language_version:
4-
python: python3.10
53
repos:
64
- repo: https://github.com/pre-commit/pre-commit-hooks
75
rev: v6.0.0
@@ -14,12 +12,9 @@ repos:
1412
- id: end-of-file-fixer
1513
- id: trailing-whitespace
1614
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.14.5
15+
rev: v0.14.10
1816
hooks:
1917
- id: ruff
2018
args:
2119
- --fix
2220
- id: ruff-format
23-
ci:
24-
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
25-
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate

docs/css/custom.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/* Fira Code, including characters used by Rich output, like the "heavy right-pointing angle bracket ornament", not included in Google Fonts */
2+
@import url(https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css);
3+
/* Noto Color Emoji for emoji support with the same font everywhere */
4+
@import url(https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap);
5+
6+
/* Override default code font in Material for MkDocs to Fira Code */
7+
:root {
8+
--md-code-font: "Fira Code", monospace, "Noto Color Emoji";
9+
}
10+
11+
/* Override default regular font in Material for MkDocs to include Noto Color Emoji */
12+
:root {
13+
--md-text-font: "Roboto", "Noto Color Emoji";
14+
}
15+
116
.termynal-comment {
217
color: #4a968f;
318
font-style: italic;

0 commit comments

Comments
 (0)