Skip to content

Commit 59b4a1f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into exec_overload_for_text_statement
2 parents c931342 + ac29fcd commit 59b4a1f

353 files changed

Lines changed: 5921 additions & 19850 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/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ updates:
88
commit-message:
99
prefix:
1010
# Python
11-
- package-ecosystem: "pip"
11+
- package-ecosystem: "uv"
1212
directory: "/"
1313
schedule:
1414
interval: "daily"

.github/workflows/build-docs.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ on:
88
- opened
99
- synchronize
1010

11-
env:
12-
UV_SYSTEM_PYTHON: 1
13-
14-
1511
jobs:
1612
changes:
1713
runs-on: ubuntu-latest
@@ -32,8 +28,8 @@ jobs:
3228
- README.md
3329
- docs/**
3430
- docs_src/**
35-
- requirements-docs.txt
3631
- pyproject.toml
32+
- uv.lock
3733
- mkdocs.yml
3834
- mkdocs.env.yml
3935
- .github/workflows/build-docs.yml
@@ -54,26 +50,25 @@ jobs:
5450
- name: Set up Python
5551
uses: actions/setup-python@v6
5652
with:
57-
python-version: "3.11"
53+
python-version-file: ".python-version"
5854
- name: Setup uv
5955
uses: astral-sh/setup-uv@v7
6056
with:
61-
version: "0.4.15"
6257
enable-cache: true
6358
cache-dependency-glob: |
64-
requirements**.txt
6559
pyproject.toml
60+
uv.lock
6661
- name: Install docs extras
67-
run: uv pip install -r requirements-docs.txt
68-
- uses: actions/cache@v4
62+
run: uv sync --locked --no-dev --group docs
63+
- uses: actions/cache@v5
6964
with:
7065
key: mkdocs-cards-${{ github.ref }}
7166
path: .cache
7267
- name: Verify README
73-
run: python ./scripts/docs.py verify-readme
68+
run: uv run ./scripts/docs.py verify-readme
7469
- name: Build Docs
75-
run: python ./scripts/docs.py build
76-
- uses: actions/upload-artifact@v5
70+
run: uv run ./scripts/docs.py build
71+
- uses: actions/upload-artifact@v6
7772
with:
7873
name: docs-site
7974
path: ./site/**

.github/workflows/deploy-docs.yml

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

15-
env:
16-
UV_SYSTEM_PYTHON: 1
17-
1815
jobs:
1916
deploy-docs:
2017
runs-on: ubuntu-latest
@@ -27,19 +24,18 @@ jobs:
2724
- name: Set up Python
2825
uses: actions/setup-python@v6
2926
with:
30-
python-version: "3.11"
27+
python-version-file: ".python-version"
3128
- name: Setup uv
3229
uses: astral-sh/setup-uv@v7
3330
with:
34-
version: "0.4.15"
3531
enable-cache: true
3632
cache-dependency-glob: |
37-
requirements**.txt
3833
pyproject.toml
34+
uv.lock
3935
- name: Install GitHub Actions dependencies
40-
run: uv pip install -r requirements-github-actions.txt
36+
run: uv sync --locked --no-dev --group github-actions
4137
- name: Deploy Docs Status Pending
42-
run: python ./scripts/deploy_docs_status.py
38+
run: uv run ./scripts/deploy_docs_status.py
4339
env:
4440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4541
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
@@ -49,7 +45,7 @@ jobs:
4945
run: |
5046
rm -rf ./site
5147
mkdir ./site
52-
- uses: actions/download-artifact@v6
48+
- uses: actions/download-artifact@v7
5349
with:
5450
path: ./site/
5551
pattern: docs-site
@@ -70,14 +66,14 @@ jobs:
7066
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
7167
- name: Deploy Docs Status Error
7268
if: failure()
73-
run: python ./scripts/deploy_docs_status.py
69+
run: uv run ./scripts/deploy_docs_status.py
7470
env:
7571
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7672
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7773
RUN_ID: ${{ github.run_id }}
7874
STATE: "error"
7975
- name: Comment Deploy
80-
run: python ./scripts/deploy_docs_status.py
76+
run: uv run ./scripts/deploy_docs_status.py
8177
env:
8278
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8379
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}

.github/workflows/pre-commit.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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-file: ".python-version"
44+
- name: Setup uv
45+
uses: astral-sh/setup-uv@v7
46+
with:
47+
cache-dependency-glob: |
48+
pyproject.toml
49+
uv.lock
50+
- name: Install Dependencies
51+
run: uv sync --locked
52+
- name: Run prek - pre-commit
53+
id: precommit
54+
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
55+
continue-on-error: true
56+
- name: Commit and push changes
57+
if: env.HAS_SECRETS == 'true'
58+
run: |
59+
git config user.name "github-actions[bot]"
60+
git config user.email "github-actions[bot]@users.noreply.github.com"
61+
git add -A
62+
if git diff --staged --quiet; then
63+
echo "No changes to commit"
64+
else
65+
git commit -m "🎨 Auto format"
66+
git push
67+
fi
68+
- uses: pre-commit-ci/lite-action@v1.1.0
69+
if: env.HAS_SECRETS == 'false'
70+
with:
71+
msg: 🎨 Auto format
72+
- name: Error out on pre-commit errors
73+
if: steps.precommit.outcome == 'failure'
74+
run: exit 1
75+
76+
# https://github.com/marketplace/actions/alls-green#why
77+
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
78+
if: always()
79+
needs:
80+
- pre-commit
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Dump GitHub context
84+
env:
85+
GITHUB_CONTEXT: ${{ toJson(github) }}
86+
run: echo "$GITHUB_CONTEXT"
87+
- name: Decide whether the needed jobs succeeded or failed
88+
uses: re-actors/alls-green@release/v1
89+
with:
90+
jobs: ${{ toJSON(needs) }}

.github/workflows/publish.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,22 @@ jobs:
2121
- sqlmodel-slim
2222
permissions:
2323
id-token: write
24+
contents: read
2425
steps:
26+
- name: Dump GitHub context
27+
env:
28+
GITHUB_CONTEXT: ${{ toJson(github) }}
29+
run: echo "$GITHUB_CONTEXT"
2530
- uses: actions/checkout@v6
2631
- name: Set up Python
2732
uses: actions/setup-python@v6
2833
with:
29-
python-version: "3.11"
30-
- name: Install build dependencies
31-
run: pip install build
34+
python-version-file: ".python-version"
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v7
3237
- name: Build distribution
38+
run: uv build
3339
env:
3440
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
35-
run: python -m build
3641
- name: Publish
37-
uses: pypa/gh-action-pypi-publish@v1.13.0
42+
run: uv publish

.github/workflows/smokeshow.yml

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

11-
env:
12-
UV_SYSTEM_PYTHON: 1
13-
1411
jobs:
1512
smokeshow:
16-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1713
runs-on: ubuntu-latest
1814
steps:
1915
- uses: actions/checkout@v6
2016
- uses: actions/setup-python@v6
2117
with:
22-
python-version: '3.9'
18+
python-version-file: ".python-version"
2319
- name: Setup uv
2420
uses: astral-sh/setup-uv@v7
2521
with:
26-
version: "0.4.15"
27-
enable-cache: true
2822
cache-dependency-glob: |
29-
requirements**.txt
3023
pyproject.toml
31-
- run: uv pip install -r requirements-github-actions.txt
32-
- uses: actions/download-artifact@v6
24+
uv.lock
25+
- run: uv sync --locked --no-dev --group github-actions
26+
- uses: actions/download-artifact@v7
3327
with:
3428
name: coverage-html
3529
path: htmlcov
@@ -39,7 +33,7 @@ jobs:
3933
- name: Upload coverage to Smokeshow
4034
run: |
4135
for i in 1 2 3 4 5; do
42-
if smokeshow upload htmlcov; then
36+
if uv run smokeshow upload htmlcov; then
4337
echo "Smokeshow upload success!"
4438
break
4539
fi
@@ -48,7 +42,7 @@ jobs:
4842
done
4943
env:
5044
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
51-
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95
45+
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 99
5246
SMOKESHOW_GITHUB_CONTEXT: coverage
5347
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5448
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}

.github/workflows/test-redistribute.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: "3.10"
29+
python-version-file: ".python-version"
3030
- name: Install build dependencies
3131
run: pip install build
3232
- name: Build source distribution
@@ -40,7 +40,7 @@ jobs:
4040
- name: Install test dependencies
4141
run: |
4242
cd dist/sqlmodel*/
43-
pip install -r requirements-tests.txt
43+
pip install --group tests --editable .
4444
env:
4545
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
4646
- name: Run source distribution tests

0 commit comments

Comments
 (0)