Skip to content

Commit

Permalink
Merge branch 'main' into docs/tutorial/fastapi/response-model.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimitha-jagadeesha authored Dec 18, 2024
2 parents 3b8e4a0 + 8c27528 commit 9726570
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- mkdocs.no-insiders.yml
- .github/workflows/build-docs.yml
- .github/workflows/deploy-docs.yml
- data/**
build-docs:
needs:
Expand All @@ -58,7 +59,7 @@ jobs:
with:
python-version: "3.11"
- name: Setup uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.4.15"
enable-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
python-version: "3.11"
- name: Setup uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.4.15"
enable-cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- uses: tiangolo/latest-changes@0.3.1
- uses: tiangolo/latest-changes@0.3.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
latest_changes_file: docs/release-notes.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.12.3
2 changes: 1 addition & 1 deletion .github/workflows/smokeshow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
python-version: '3.9'
- name: Setup uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.4.15"
enable-cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.4.15"
enable-cache: true
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
with:
python-version: '3.12'
- name: Setup uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v4
with:
version: "0.4.15"
enable-cache: true
Expand Down
1 change: 0 additions & 1 deletion data/members.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
members:
- login: tiangolo
- login: estebanx64
- login: alejsdev
9 changes: 8 additions & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Docs

* ✏️ Fix typo in the release notes of v0.0.22. PR [#1195](https://github.com/fastapi/sqlmodel/pull/1195) by [@PipeKnight](https://github.com/PipeKnight).
* 📝 Update includes for `docs/advanced/uuid.md`. PR [#1151](https://github.com/fastapi/sqlmodel/pull/1151) by [@tiangolo](https://github.com/tiangolo).
* 📝 Update includes for `docs/tutorial/create-db-and-table.md`. PR [#1149](https://github.com/fastapi/sqlmodel/pull/1149) by [@tiangolo](https://github.com/tiangolo).
* 📝 Fix internal links in docs. PR [#1148](https://github.com/fastapi/sqlmodel/pull/1148) by [@tiangolo](https://github.com/tiangolo).
Expand All @@ -16,6 +17,12 @@

### Internal

* ⬆ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.12.3. PR [#1240](https://github.com/fastapi/sqlmodel/pull/1240) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump astral-sh/setup-uv from 3 to 4. PR [#1225](https://github.com/fastapi/sqlmodel/pull/1225) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump tiangolo/latest-changes from 0.3.1 to 0.3.2. PR [#1207](https://github.com/fastapi/sqlmodel/pull/1207) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 🔨 Update docs previews script. PR [#1236](https://github.com/fastapi/sqlmodel/pull/1236) by [@tiangolo](https://github.com/tiangolo).
* 🔧 Update build-docs filter paths. PR [#1235](https://github.com/fastapi/sqlmodel/pull/1235) by [@tiangolo](https://github.com/tiangolo).
* 🔧 Update team members. PR [#1234](https://github.com/fastapi/sqlmodel/pull/1234) by [@tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade markdown-include-variants to version 0.0.3. PR [#1152](https://github.com/fastapi/sqlmodel/pull/1152) by [@tiangolo](https://github.com/tiangolo).
* 👷 Update issue manager workflow. PR [#1137](https://github.com/fastapi/sqlmodel/pull/1137) by [@alejsdev](https://github.com/alejsdev).
* 👷 Fix smokeshow, checkout files on CI. PR [#1136](https://github.com/fastapi/sqlmodel/pull/1136) by [@tiangolo](https://github.com/tiangolo).
Expand All @@ -36,7 +43,7 @@

### Fixes

* 🐛 Fix support for types with `Optional[Annoated[x, f()]]`, e.g. `id: Optional[pydantic.UUID4]`. PR [#1093](https://github.com/fastapi/sqlmodel/pull/1093) by [@tiangolo](https://github.com/tiangolo).
* 🐛 Fix support for types with `Optional[Annotated[x, f()]]`, e.g. `id: Optional[pydantic.UUID4]`. PR [#1093](https://github.com/fastapi/sqlmodel/pull/1093) by [@tiangolo](https://github.com/tiangolo).

### Docs

Expand Down
32 changes: 23 additions & 9 deletions scripts/deploy_docs_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import re

from github import Github
from pydantic import SecretStr
from pydantic import BaseModel, SecretStr
from pydantic_settings import BaseSettings

site_domain = "sqlmodel.tiangolo.com"


class Settings(BaseSettings):
github_repository: str
Expand All @@ -15,7 +17,12 @@ class Settings(BaseSettings):
is_done: bool = False


def main():
class LinkData(BaseModel):
previous_link: str
preview_link: str


def main() -> None:
logging.basicConfig(level=logging.INFO)
settings = Settings()

Expand Down Expand Up @@ -60,24 +67,31 @@ def main():
docs_files = [f for f in files if f.filename.startswith("docs/")]

deploy_url = settings.deploy_url.rstrip("/")
links: list[str] = []
links: list[LinkData] = []
for f in docs_files:
match = re.match(r"docs/(.*)", f.filename)
assert match
if not match:
continue
path = match.group(1)
if path.endswith("index.md"):
path = path.replace("index.md", "")
use_path = path.replace("index.md", "")
else:
path = path.replace(".md", "/")
link = f"{deploy_url}/{path}"
use_path = path.replace(".md", "/")
link = LinkData(
previous_link=f"https://{site_domain}/{use_path}",
preview_link=f"{deploy_url}/{use_path}",
)
links.append(link)
links.sort()
links.sort(key=lambda x: x.preview_link)

message = f"📝 Docs preview for commit {settings.commit_sha} at: {deploy_url}"

if links:
message += "\n\n### Modified Pages\n\n"
message += "\n".join([f"* {link}" for link in links])
for link in links:
message += f"* {link.preview_link}"
message += f" - ([before]({link.previous_link}))"
message += "\n"

print(message)
use_pr.as_issue().create_comment(message)
Expand Down

0 comments on commit 9726570

Please sign in to comment.