Skip to content

Commit 059a707

Browse files
authored
Merge branch 'main' into main
2 parents 4b51f3c + a82c3fe commit 059a707

File tree

108 files changed

+2820
-11851
lines changed

Some content is hidden

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

108 files changed

+2820
-11851
lines changed

.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/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: 22 additions & 11 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
@@ -28,11 +33,15 @@ jobs:
2833
- docs/**
2934
- docs_src/**
3035
- requirements-docs.txt
36+
- requirements-docs-insiders.txt
3137
- pyproject.toml
3238
- mkdocs.yml
3339
- mkdocs.insiders.yml
40+
- mkdocs.maybe-insiders.yml
41+
- mkdocs.no-insiders.yml
3442
- .github/workflows/build-docs.yml
3543
- .github/workflows/deploy-docs.yml
44+
- data/**
3645
3746
build-docs:
3847
needs:
@@ -49,20 +58,21 @@ jobs:
4958
uses: actions/setup-python@v5
5059
with:
5160
python-version: "3.11"
52-
- uses: actions/cache@v4
53-
id: cache
61+
- name: Setup uv
62+
uses: astral-sh/setup-uv@v5
5463
with:
55-
path: ${{ env.pythonLocation }}
56-
key: ${{ runner.os }}-python-docs-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-docs.txt') }}-v01
64+
version: "0.4.15"
65+
enable-cache: true
66+
cache-dependency-glob: |
67+
requirements**.txt
68+
pyproject.toml
5769
- name: Install docs extras
58-
if: steps.cache.outputs.cache-hit != 'true'
59-
run: pip install -r requirements-docs.txt
70+
run: uv pip install -r requirements-docs.txt
6071
- name: Install Material for MkDocs Insiders
61-
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
62-
run: |
63-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
64-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
65-
pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/mkdocstrings-python.git
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 }}
6676
- uses: actions/cache@v4
6777
with:
6878
key: mkdocs-cards-${{ github.ref }}
@@ -75,6 +85,7 @@ jobs:
7585
with:
7686
name: docs-site
7787
path: ./site/**
88+
include-hidden-files: true
7889

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

.github/workflows/deploy-docs.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ permissions:
1010
deployments: write
1111
issues: write
1212
pull-requests: write
13+
statuses: write
14+
15+
env:
16+
UV_SYSTEM_PYTHON: 1
1317

1418
jobs:
1519
deploy-docs:
@@ -20,6 +24,27 @@ jobs:
2024
GITHUB_CONTEXT: ${{ toJson(github) }}
2125
run: echo "$GITHUB_CONTEXT"
2226
- uses: actions/checkout@v4
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.11"
31+
- name: Setup uv
32+
uses: astral-sh/setup-uv@v5
33+
with:
34+
version: "0.4.15"
35+
enable-cache: true
36+
cache-dependency-glob: |
37+
requirements**.txt
38+
pyproject.toml
39+
- name: Install GitHub Actions dependencies
40+
run: uv pip install -r requirements-github-actions.txt
41+
- name: Deploy Docs Status Pending
42+
run: python ./scripts/deploy_docs_status.py
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
46+
RUN_ID: ${{ github.run_id }}
47+
2348
- name: Clean site
2449
run: |
2550
rm -rf ./site
@@ -35,30 +60,19 @@ jobs:
3560
# hashFiles returns an empty string if there are no files
3661
if: hashFiles('./site/*')
3762
id: deploy
38-
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
3967
with:
4068
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4169
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42-
projectName: sqlmodel
43-
directory: './site'
44-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
45-
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 ) }}
46-
- name: Set up Python
47-
uses: actions/setup-python@v5
48-
with:
49-
python-version: "3.11"
50-
- uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: ${{ env.pythonLocation }}
54-
key: ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
55-
- name: Install GitHub Actions dependencies
56-
if: steps.cache.outputs.cache-hit != 'true'
57-
run: pip install -r requirements-github-actions.txt
70+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
5871
- name: Comment Deploy
59-
if: steps.deploy.outputs.url != ''
60-
run: python ./scripts/comment_docs_deploy_url_in_pr.py
72+
run: python ./scripts/deploy_docs_status.py
6173
env:
6274
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
75+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
6476
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
77+
RUN_ID: ${{ github.run_id }}
78+
IS_DONE: "true"

.github/workflows/issue-manager.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Issue Manager
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: "13 18 * * *"
66
issue_comment:
77
types:
88
- created
@@ -16,18 +16,32 @@ on:
1616

1717
permissions:
1818
issues: write
19+
pull-requests: write
1920

2021
jobs:
2122
issue-manager:
23+
if: github.repository_owner == 'fastapi'
2224
runs-on: ubuntu-latest
2325
steps:
24-
- uses: tiangolo/[email protected]
26+
- name: Dump GitHub context
27+
env:
28+
GITHUB_CONTEXT: ${{ toJson(github) }}
29+
run: echo "$GITHUB_CONTEXT"
30+
- uses: tiangolo/[email protected]
2531
with:
2632
token: ${{ secrets.GITHUB_TOKEN }}
2733
config: >
2834
{
2935
"answered": {
3036
"delay": 864000,
3137
"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."
38+
},
39+
"waiting": {
40+
"delay": 2628000,
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."
42+
},
43+
"invalid": {
44+
"delay": 0,
45+
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
3246
}
3347
}

.github/workflows/labeler.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
22+
# Run this after labeler applied labels
23+
check-labels:
24+
needs:
25+
- labeler
26+
permissions:
27+
pull-requests: read
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: docker://agilepathway/pull-request-label-checker:latest
31+
with:
32+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +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: docker://tiangolo/latest-changes:0.2.0
34-
# - uses: tiangolo/latest-changes@main
33+
- uses: tiangolo/[email protected]
3534
with:
3635
token: ${{ secrets.GITHUB_TOKEN }}
3736
latest_changes_file: docs/release-notes.md

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3535
run: python -m build
3636
- name: Publish
37-
uses: pypa/gh-action-pypi-publish@v1.9.0
37+
uses: pypa/gh-action-pypi-publish@v1.12.4

0 commit comments

Comments
 (0)