Skip to content

Commit 3ce918a

Browse files
committed
Merge branch 'main' into main_diachkow
2 parents 07c11ba + e79d719 commit 3ce918a

249 files changed

Lines changed: 1851 additions & 8893 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/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ internal:
1616
- scripts/**
1717
- .gitignore
1818
- .pre-commit-config.yaml
19-
- pdm_build.py
2019
- requirements*.txt
20+
- uv.lock
2121
- all-globs-to-all-files:
2222
- '!docs/**'
2323
- '!sqlmodel/**'

.github/workflows/build-docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ jobs:
6464
with:
6565
key: mkdocs-cards-${{ github.ref }}
6666
path: .cache
67-
- name: Verify README
68-
run: uv run ./scripts/docs.py verify-readme
6967
- name: Build Docs
7068
run: uv run ./scripts/docs.py build
71-
- uses: actions/upload-artifact@v6
69+
- uses: actions/upload-artifact@v7
7270
with:
7371
name: docs-site
7472
path: ./site/**

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
rm -rf ./site
4747
mkdir ./site
48-
- uses: actions/download-artifact@v7
48+
- uses: actions/download-artifact@v8
4949
with:
5050
path: ./site/
5151
pattern: docs-site

.github/workflows/issue-manager.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ jobs:
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.",
4242
"reminder": {
4343
"before": "P3D",
44-
"message": "Heads-up: this will be closed in 3 days unless theres new activity."
44+
"message": "Heads-up: this will be closed in 3 days unless there's new activity."
4545
}
4646
},
4747
"invalid": {
4848
"delay": 0,
4949
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
50+
},
51+
"maybe-ai": {
52+
"delay": 0,
53+
"message": "This was marked as potentially AI generated and will be closed now. If this is an error, please provide additional details, make sure to read the docs about contributing and AI."
5054
}
5155
}

.github/workflows/publish.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ on:
1414
jobs:
1515
publish:
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
package:
20-
- sqlmodel
21-
- sqlmodel-slim
2217
permissions:
2318
id-token: write
2419
contents: read
@@ -36,7 +31,5 @@ jobs:
3631
uses: astral-sh/setup-uv@v7
3732
- name: Build distribution
3833
run: uv build
39-
env:
40-
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
4134
- name: Publish
4235
run: uv publish

.github/workflows/smokeshow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
pyproject.toml
2424
uv.lock
2525
- run: uv sync --locked --no-dev --group github-actions
26-
- uses: actions/download-artifact@v7
26+
- uses: actions/download-artifact@v8
2727
with:
2828
name: coverage-html
2929
path: htmlcov

.github/workflows/test-redistribute.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ on:
1212
jobs:
1313
test-redistribute:
1414
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
package:
18-
- sqlmodel
19-
- sqlmodel-slim
2015
steps:
2116
- name: Dump GitHub context
2217
env:
@@ -30,8 +25,6 @@ jobs:
3025
- name: Install build dependencies
3126
run: pip install build
3227
- name: Build source distribution
33-
env:
34-
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3528
run: python -m build --sdist
3629
- name: Decompress source distribution
3730
run: |
@@ -41,8 +34,6 @@ jobs:
4134
run: |
4235
cd dist/sqlmodel*/
4336
pip install --group tests --editable .
44-
env:
45-
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
4637
- name: Run source distribution tests
4738
run: |
4839
cd dist/sqlmodel*/

.github/workflows/test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,29 @@ jobs:
2727
matrix:
2828
os: [ ubuntu-latest, windows-latest, macos-latest ]
2929
python-version: [ "3.14" ]
30+
uv-resolution:
31+
- highest
3032
include:
31-
- os: windows-latest
32-
python-version: "3.9"
3333
- os: ubuntu-latest
3434
python-version: "3.10"
35+
uv-resolution: lowest-direct
3536
- os: macos-latest
3637
python-version: "3.11"
38+
uv-resolution: highest
3739
- os: windows-latest
3840
python-version: "3.12"
41+
uv-resolution: lowest-direct
3942
- os: ubuntu-latest
4043
python-version: "3.13"
44+
uv-resolution: highest
4145
- os: macos-latest
4246
python-version: "3.13"
47+
uv-resolution: highest
4348
fail-fast: false
4449
runs-on: ${{ matrix.os }}
4550
env:
4651
UV_PYTHON: ${{ matrix.python-version }}
52+
UV_RESOLUTION: ${{ matrix.uv-resolution }}
4753
steps:
4854
- uses: actions/checkout@v6
4955
- name: Set up Python
@@ -64,15 +70,15 @@ jobs:
6470
with:
6571
limit-access-to-actor: true
6672
- name: Install Dependencies
67-
run: uv sync --locked --no-dev --group tests
73+
run: uv sync --no-dev --group tests
6874
- run: mkdir coverage
6975
- name: Test
7076
run: uv run bash scripts/test.sh
7177
env:
7278
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }}
7379
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
7480
- name: Store coverage files
75-
uses: actions/upload-artifact@v6
81+
uses: actions/upload-artifact@v7
7682
with:
7783
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
7884
path: coverage
@@ -95,7 +101,7 @@ jobs:
95101
pyproject.toml
96102
uv.lock
97103
- name: Get coverage files
98-
uses: actions/download-artifact@v7
104+
uses: actions/download-artifact@v8
99105
with:
100106
pattern: coverage-*
101107
path: coverage
@@ -106,7 +112,7 @@ jobs:
106112
- run: uv run coverage combine coverage
107113
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
108114
- name: Store coverage HTML
109-
uses: actions/upload-artifact@v6
115+
uses: actions/upload-artifact@v7
110116
with:
111117
name: coverage-html
112118
path: htmlcov

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,22 @@ repos:
2828
language: unsupported
2929
types: [python]
3030

31+
- id: local-mypy
32+
name: mypy check
33+
entry: uv run mypy sqlmodel tests/test_select_typing.py
34+
require_serial: true
35+
language: unsupported
36+
pass_filenames: false
37+
3138
- id: generate-select
3239
language: unsupported
3340
name: generate-select
3441
entry: uv run ./scripts/generate_select.py
3542
files: ^scripts/generate_select\.py|sqlmodel/sql/_expression_select_gen\.py\.jinja2$
43+
44+
- id: generate-readme
45+
language: unsupported
46+
name: generate README.md from index.md
47+
entry: uv run ./scripts/docs.py generate-readme
48+
files: ^docs/index\.md|scripts/docs\.py$
49+
pass_filenames: false

docs/contributing.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,39 @@ This helps to make sure that:
158158
* The documentation is up-to-date.
159159
* The documentation examples can be run as is.
160160
* Most of the features are covered by the documentation, ensured by test coverage.
161+
162+
## Automated Code and AI
163+
164+
You are encouraged to use all the tools you want to do your work and contribute as efficiently as possible, this includes AI (LLM) tools, etc. Nevertheless, contributions should have meaningful human intervention, judgement, context, etc.
165+
166+
If the **human effort** put in a PR, e.g. writing LLM prompts, is **less** than the **effort we would need to put** to **review it**, please **don't** submit the PR.
167+
168+
Think of it this way: we can already write LLM prompts or run automated tools ourselves, and that would be faster than reviewing external PRs.
169+
170+
### Closing Automated and AI PRs
171+
172+
If we see PRs that seem AI generated or automated in similar ways, we'll flag them and close them.
173+
174+
The same applies to comments and descriptions, please don't copy paste the content generated by an LLM.
175+
176+
### Human Effort Denial of Service
177+
178+
Using automated tools and AI to submit PRs or comments that we have to carefully review and handle would be the equivalent of a <a href="https://en.wikipedia.org/wiki/Denial-of-service_attack" class="external-link" target="_blank">Denial-of-service attack</a> on our human effort.
179+
180+
It would be very little effort from the person submitting the PR (an LLM prompt) that generates a large amount of effort on our side (carefully reviewing code).
181+
182+
Please don't do that.
183+
184+
We'll need to block accounts that spam us with repeated automated PRs or comments.
185+
186+
### Use Tools Wisely
187+
188+
As Uncle Ben said:
189+
190+
<blockquote>
191+
With great <strike>power</strike> <strong>tools</strong> comes great responsibility.
192+
</blockquote>
193+
194+
Avoid inadvertently doing harm.
195+
196+
You have amazing tools at hand, use them wisely to help effectively.

0 commit comments

Comments
 (0)