Skip to content

Commit d5f78f2

Browse files
authored
Merge branch 'main' into docs/aliases
2 parents bd2d61a + c5085b6 commit d5f78f2

File tree

337 files changed

+23836
-8514
lines changed

Some content is hidden

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

337 files changed

+23836
-8514
lines changed

.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/DISCUSSION_TEMPLATE/questions.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,14 @@ body:
6464
If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you.
6565
6666
placeholder: |
67-
from typing import Optional
68-
6967
from sqlmodel import Field, Session, SQLModel, create_engine
7068
7169
7270
class Hero(SQLModel, table=True):
73-
id: Optional[int] = Field(default=None, primary_key=True)
71+
id: int | None = Field(default=None, primary_key=True)
7472
name: str
7573
secret_name: str
76-
age: Optional[int] = None
74+
age: int | None = None
7775
7876
7977
hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson")

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ contact_links:
44
about: Please report security vulnerabilities to [email protected]
55
- name: Question or Problem
66
about: Ask a question or ask about a problem in GitHub Discussions.
7-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/questions
7+
url: https://github.com/fastapi/sqlmodel/discussions/categories/questions
88
- name: Feature Request
99
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
10-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/questions
10+
url: https://github.com/fastapi/sqlmodel/discussions/categories/questions
1111
- name: Show and tell
1212
about: Show what you built with SQLModel or to be used with SQLModel.
13-
url: https://github.com/tiangolo/sqlmodel/discussions/categories/show-and-tell
13+
url: https://github.com/fastapi/sqlmodel/discussions/categories/show-and-tell

.github/ISSUE_TEMPLATE/privileged.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
value: |
77
Thanks for your interest in SQLModel! 🚀
88
9-
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/tiangolo/sqlmodel/discussions/categories/questions) instead.
9+
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/fastapi/sqlmodel/discussions/categories/questions) instead.
1010
- type: checkboxes
1111
id: privileged
1212
attributes:

.github/actions/comment-docs-preview-in-pr/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/actions/comment-docs-preview-in-pr/action.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/actions/comment-docs-preview-in-pr/app/main.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- docs/**
6+
- docs_src/**
7+
- all-globs-to-all-files:
8+
- '!sqlmodel/**'
9+
- '!pyproject.toml'
10+
11+
internal:
12+
- all:
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- .github/**
16+
- scripts/**
17+
- .gitignore
18+
- .pre-commit-config.yaml
19+
- pdm_build.py
20+
- requirements*.txt
21+
- all-globs-to-all-files:
22+
- '!docs/**'
23+
- '!sqlmodel/**'
24+
- '!pyproject.toml'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Project
2+
3+
on:
4+
pull_request_target:
5+
issues:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
add-to-project:
12+
name: Add to project
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
project-url: https://github.com/orgs/fastapi/projects/2
18+
github-token: ${{ secrets.PROJECTS_TOKEN }}

.github/workflows/build-docs.yml

Lines changed: 30 additions & 23 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
@@ -17,21 +22,26 @@ jobs:
1722
outputs:
1823
docs: ${{ steps.filter.outputs.docs }}
1924
steps:
20-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2126
# For pull requests it's not necessary to checkout the code but for the main branch it is
22-
- uses: dorny/paths-filter@v2
27+
- uses: dorny/paths-filter@v3
2328
id: filter
2429
with:
2530
filters: |
2631
docs:
2732
- README.md
2833
- docs/**
2934
- docs_src/**
35+
- requirements-docs.txt
36+
- requirements-docs-insiders.txt
3037
- pyproject.toml
3138
- mkdocs.yml
3239
- mkdocs.insiders.yml
40+
- mkdocs.maybe-insiders.yml
41+
- mkdocs.no-insiders.yml
3342
- .github/workflows/build-docs.yml
3443
- .github/workflows/deploy-docs.yml
44+
- data/**
3545
3646
build-docs:
3747
needs:
@@ -43,42 +53,39 @@ jobs:
4353
env:
4454
GITHUB_CONTEXT: ${{ toJson(github) }}
4555
run: echo "$GITHUB_CONTEXT"
46-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v5
4757
- name: Set up Python
48-
uses: actions/setup-python@v4
58+
uses: actions/setup-python@v5
4959
with:
5060
python-version: "3.11"
51-
- uses: actions/cache@v3
52-
id: cache
61+
- name: Setup uv
62+
uses: astral-sh/setup-uv@v6
5363
with:
54-
path: ${{ env.pythonLocation }}
55-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-v01
56-
- name: Install Poetry
57-
if: steps.cache.outputs.cache-hit != 'true'
58-
run: |
59-
python -m pip install --upgrade pip
60-
python -m pip install "poetry"
61-
python -m poetry self add poetry-version-plugin
62-
- name: Configure poetry
63-
run: python -m poetry config virtualenvs.create false
64-
- name: Install Dependencies
65-
if: steps.cache.outputs.cache-hit != 'true'
66-
run: python -m poetry install
64+
version: "0.4.15"
65+
enable-cache: true
66+
cache-dependency-glob: |
67+
requirements**.txt
68+
pyproject.toml
69+
- name: Install docs extras
70+
run: uv pip install -r requirements-docs.txt
6771
- name: Install Material for MkDocs Insiders
68-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
69-
run: python -m poetry run pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
70-
- uses: actions/cache@v3
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
7177
with:
7278
key: mkdocs-cards-${{ github.ref }}
7379
path: .cache
7480
- name: Verify README
7581
run: python ./scripts/docs.py verify-readme
7682
- name: Build Docs
7783
run: python ./scripts/docs.py build
78-
- uses: actions/upload-artifact@v3
84+
- uses: actions/upload-artifact@v4
7985
with:
8086
name: docs-site
8187
path: ./site/**
88+
include-hidden-files: true
8289

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

0 commit comments

Comments
 (0)