Skip to content

Commit b1f3f90

Browse files
authored
Merge branch 'main' into main
2 parents 507b5fd + abbc92b commit b1f3f90

File tree

7 files changed

+33
-13
lines changed

7 files changed

+33
-13
lines changed

.github/workflows/deploy-docs.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ jobs:
5555
# hashFiles returns an empty string if there are no files
5656
if: hashFiles('./site/*')
5757
id: deploy
58-
uses: cloudflare/pages-action@v1
58+
env:
59+
PROJECT_NAME: sqlmodel
60+
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 ) }}
61+
uses: cloudflare/wrangler-action@v3
5962
with:
6063
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6164
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62-
projectName: sqlmodel
63-
directory: './site'
64-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
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 ) }}
65+
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6666
- name: Comment Deploy
6767
run: python ./scripts/deploy_docs_status.py
6868
env:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DEPLOY_URL: ${{ steps.deploy.outputs.url }}
70+
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
7171
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
7272
RUN_ID: ${{ github.run_id }}
7373
IS_DONE: "true"

.github/workflows/labeler.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
2022
# Run this after labeler applied labels
2123
check-labels:
2224
needs:

docs/release-notes.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,22 @@
22

33
## Latest Changes
44

5+
### Refactors
6+
7+
* 🚨 Fix types for new Pydantic. PR [#1131](https://github.com/fastapi/sqlmodel/pull/1131) by [@tiangolo](https://github.com/tiangolo).
8+
59
### Docs
610

711
* ✏️ Fix typo in documentation. PR [#1106](https://github.com/fastapi/sqlmodel/pull/1106) by [@Solipsistmonkey](https://github.com/Solipsistmonkey).
812
* 📝 Remove highlights in `indexes.md` . PR [#1100](https://github.com/fastapi/sqlmodel/pull/1100) by [@alejsdev](https://github.com/alejsdev).
913

1014
### Internal
1115

16+
* ➕ Add docs dependency markdown-include-variants. PR [#1129](https://github.com/fastapi/sqlmodel/pull/1129) by [@tiangolo](https://github.com/tiangolo).
17+
* 🔨 Update script to standardize format. PR [#1130](https://github.com/fastapi/sqlmodel/pull/1130) by [@tiangolo](https://github.com/tiangolo).
18+
* 👷 Update `labeler.yml`. PR [#1128](https://github.com/fastapi/sqlmodel/pull/1128) by [@tiangolo](https://github.com/tiangolo).
19+
* 👷 Update worfkow deploy-docs-notify URL. PR [#1126](https://github.com/fastapi/sqlmodel/pull/1126) by [@tiangolo](https://github.com/tiangolo).
20+
* 👷 Upgrade Cloudflare GitHub Action. PR [#1124](https://github.com/fastapi/sqlmodel/pull/1124) by [@tiangolo](https://github.com/tiangolo).
1221
*[pre-commit.ci] pre-commit autoupdate. PR [#1097](https://github.com/fastapi/sqlmodel/pull/1097) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
1322
* ⬆ Bump tiangolo/issue-manager from 0.5.0 to 0.5.1. PR [#1107](https://github.com/fastapi/sqlmodel/pull/1107) by [@dependabot[bot]](https://github.com/apps/dependabot).
1423
* 👷 Update `issue-manager.yml`. PR [#1103](https://github.com/fastapi/sqlmodel/pull/1103) by [@tiangolo](https://github.com/tiangolo).

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ markdown_extensions:
184184

185185
# Other extensions
186186
mdx_include:
187+
markdown_include_variants:
187188

188189
extra:
189190
analytics:

requirements-docs.txt

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ cairosvg==2.7.1
1616
# For griffe, it formats with black
1717
typer == 0.12.3
1818
mkdocs-macros-plugin==1.0.5
19+
markdown-include-variants==0.0.1

scripts/format.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/sh -e
1+
#!/usr/bin/env bash
2+
3+
set -e
24
set -x
35

46
ruff check sqlmodel tests docs_src scripts --fix

sqlmodel/main.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from sqlalchemy.orm.instrumentation import is_instrumented
5353
from sqlalchemy.sql.schema import MetaData
5454
from sqlalchemy.sql.sqltypes import LargeBinary, Time, Uuid
55-
from typing_extensions import Literal, deprecated, get_origin
55+
from typing_extensions import Literal, TypeAlias, deprecated, get_origin
5656

5757
from ._compat import ( # type: ignore[attr-defined]
5858
IS_PYDANTIC_V2,
@@ -90,7 +90,12 @@
9090

9191
_T = TypeVar("_T")
9292
NoArgAnyCallable = Callable[[], Any]
93-
IncEx = Union[Set[int], Set[str], Dict[int, Any], Dict[str, Any], None]
93+
IncEx: TypeAlias = Union[
94+
Set[int],
95+
Set[str],
96+
Mapping[int, Union["IncEx", Literal[True]]],
97+
Mapping[str, Union["IncEx", Literal[True]]],
98+
]
9499
OnDeleteType = Literal["CASCADE", "SET NULL", "RESTRICT"]
95100

96101

@@ -858,8 +863,8 @@ def model_dump(
858863
self,
859864
*,
860865
mode: Union[Literal["json", "python"], str] = "python",
861-
include: IncEx = None,
862-
exclude: IncEx = None,
866+
include: Union[IncEx, None] = None,
867+
exclude: Union[IncEx, None] = None,
863868
context: Union[Dict[str, Any], None] = None,
864869
by_alias: bool = False,
865870
exclude_unset: bool = False,
@@ -908,8 +913,8 @@ def model_dump(
908913
def dict(
909914
self,
910915
*,
911-
include: IncEx = None,
912-
exclude: IncEx = None,
916+
include: Union[IncEx, None] = None,
917+
exclude: Union[IncEx, None] = None,
913918
by_alias: bool = False,
914919
exclude_unset: bool = False,
915920
exclude_defaults: bool = False,

0 commit comments

Comments
 (0)