Skip to content

Commit c9f7ad8

Browse files
authored
Merge branch 'main' into main
2 parents ecfafa2 + fa5895c commit c9f7ad8

File tree

110 files changed

+2811
-11893
lines changed

Some content is hidden

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

110 files changed

+2811
-11893
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/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: 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: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
deployments: write
11+
issues: write
12+
pull-requests: write
13+
statuses: write
14+
15+
env:
16+
UV_SYSTEM_PYTHON: 1
17+
918
jobs:
1019
deploy-docs:
1120
runs-on: ubuntu-latest
@@ -15,6 +24,27 @@ jobs:
1524
GITHUB_CONTEXT: ${{ toJson(github) }}
1625
run: echo "$GITHUB_CONTEXT"
1726
- 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+
1848
- name: Clean site
1949
run: |
2050
rm -rf ./site
@@ -30,17 +60,19 @@ jobs:
3060
# hashFiles returns an empty string if there are no files
3161
if: hashFiles('./site/*')
3262
id: deploy
33-
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
3467
with:
3568
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3669
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37-
projectName: sqlmodel
38-
directory: './site'
39-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
40-
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 ) }}
70+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
4171
- name: Comment Deploy
42-
if: steps.deploy.outputs.url != ''
43-
uses: ./.github/actions/comment-docs-preview-in-pr
44-
with:
45-
token: ${{ secrets.GITHUB_TOKEN }}
46-
deploy_url: "${{ steps.deploy.outputs.url }}"
72+
run: python ./scripts/deploy_docs_status.py
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
76+
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: 19 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
@@ -14,17 +14,34 @@ on:
1414
- labeled
1515
workflow_dispatch:
1616

17+
permissions:
18+
issues: write
19+
pull-requests: write
20+
1721
jobs:
1822
issue-manager:
23+
if: github.repository_owner == 'fastapi'
1924
runs-on: ubuntu-latest
2025
steps:
21-
- 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]
2231
with:
2332
token: ${{ secrets.GITHUB_TOKEN }}
2433
config: >
2534
{
2635
"answered": {
2736
"delay": 864000,
2837
"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."
2946
}
3047
}

0 commit comments

Comments
 (0)