]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
🔧 Upgrade Material for MkDocs and remove insiders (#1650)
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 20 Nov 2025 12:12:37 +0000 (13:12 +0100)
committerGitHub <noreply@github.com>
Thu, 20 Nov 2025 12:12:37 +0000 (13:12 +0100)
.github/workflows/build-docs.yml
mkdocs.env.yml [moved from mkdocs.maybe-insiders.yml with 79% similarity]
mkdocs.insiders.yml [deleted file]
mkdocs.no-insiders.yml [deleted file]
mkdocs.yml
requirements-docs-insiders.txt [deleted file]
requirements-docs.txt
scripts/docs.py

index d4d4737e99ddeb5b5786faa20596367e7f8e2545..1b702741db787e632102e9858e30fa06745aa417 100644 (file)
@@ -33,12 +33,9 @@ jobs:
             - docs/**
             - docs_src/**
             - requirements-docs.txt
-            - requirements-docs-insiders.txt
             - pyproject.toml
             - mkdocs.yml
-            - mkdocs.insiders.yml
-            - mkdocs.maybe-insiders.yml
-            - mkdocs.no-insiders.yml
+            - mkdocs.env.yml
             - .github/workflows/build-docs.yml
             - .github/workflows/deploy-docs.yml
             - data/**
@@ -68,11 +65,6 @@ jobs:
             pyproject.toml
       - name: Install docs extras
         run: uv pip install -r requirements-docs.txt
-      - name: Install Material for MkDocs Insiders
-        if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
-        run: uv pip install -r requirements-docs-insiders.txt
-        env:
-          TOKEN: ${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}
       - uses: actions/cache@v4
         with:
           key: mkdocs-cards-${{ github.ref }}
similarity index 79%
rename from mkdocs.maybe-insiders.yml
rename to mkdocs.env.yml
index 07aefaaa9904c526c72cfcb92ddfb498be68f264..545d30a18cec93495328868463868efc1fccb7d8 100644 (file)
@@ -1,6 +1,5 @@
 # Define this here and not in the main mkdocs.yml file because that one could be auto
 # updated and written, and the script would remove the env var
-INHERIT: !ENV [INSIDERS_FILE, './mkdocs.no-insiders.yml']
 markdown_extensions:
   pymdownx.highlight:
     linenums: !ENV [LINENUMS, false]
diff --git a/mkdocs.insiders.yml b/mkdocs.insiders.yml
deleted file mode 100644 (file)
index 80d2d4b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-plugins:
-  typeset:
-markdown_extensions:
-  material.extensions.preview:
-    targets:
-      include:
-        - "*"
diff --git a/mkdocs.no-insiders.yml b/mkdocs.no-insiders.yml
deleted file mode 100644 (file)
index e69de29..0000000
index c59ccd245abf64c26fcac239bf55248347820cb1..b89516e0247bbef6f32c91d3a774f80f33f7dac9 100644 (file)
@@ -1,4 +1,4 @@
-INHERIT: ./mkdocs.maybe-insiders.yml
+INHERIT: ./mkdocs.env.yml
 site_name: SQLModel
 site_description: SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
 site_url: https://sqlmodel.tiangolo.com/
@@ -58,6 +58,7 @@ plugins:
   # Material for MkDocs
   search:
   social:
+  typeset:
   # Other plugins
   macros:
     include_yaml:
@@ -140,6 +141,11 @@ nav:
   - release-notes.md
 
 markdown_extensions:
+  # Material for MkDocs
+  material.extensions.preview:
+    targets:
+      include:
+        - "*"
   # Python Markdown
   abbr:
   attr_list:
diff --git a/requirements-docs-insiders.txt b/requirements-docs-insiders.txt
deleted file mode 100644 (file)
index d8d3c37..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-git+https://${TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git@9.5.30-insiders-4.53.11
-git+https://${TOKEN}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
-git+https://${TOKEN}@github.com/pawamoy-insiders/mkdocstrings-python.git
index a76936c73529b92bb1cb5c7b1b400cdbf06dcaeb..1bee2c6c72411bcd068be3b7f42cb7ba4cd5ca37 100644 (file)
@@ -10,8 +10,9 @@ pyyaml >=5.3.1,<7.0.0
 pillow==11.3.0
 # For image processing by Material for MkDocs
 cairosvg==2.8.2
-# mkdocstrings[python]==0.25.1
+mkdocstrings[python]==0.30.1
 griffe-typingdoc==0.3.0
+griffe-warnings-deprecated==1.1.0
 # For griffe, it formats with black
 typer == 0.20.0
 mkdocs-macros-plugin==1.5.0
index d018ace86fb4c6c0e251d00276471341f45c2aa0..a424f177b440a88716f361a963ac694b0a165bd2 100644 (file)
@@ -2,9 +2,7 @@ import logging
 import os
 import re
 import subprocess
-from functools import lru_cache
 from http.server import HTTPServer, SimpleHTTPRequestHandler
-from importlib import metadata
 from pathlib import Path
 
 import mkdocs.utils
@@ -19,17 +17,9 @@ en_docs_path = Path("")
 app = typer.Typer()
 
 
-@lru_cache
-def is_mkdocs_insiders() -> bool:
-    version = metadata.version("mkdocs-material")
-    return "insiders" in version
-
-
 @app.callback()
 def callback() -> None:
-    if is_mkdocs_insiders():
-        os.environ["INSIDERS_FILE"] = "./mkdocs.insiders.yml"
-    # For MacOS with insiders and Cairo
+    # For MacOS with Cairo
     os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib"
 
 
@@ -126,10 +116,6 @@ def build() -> None:
     """
     Build the docs.
     """
-    insiders_env_file = os.environ.get("INSIDERS_FILE")
-    print(f"Insiders file {insiders_env_file}")
-    if is_mkdocs_insiders():
-        print("Using insiders")
     print("Building docs")
     subprocess.run(["mkdocs", "build"], check=True)
     typer.secho("Successfully built docs", color=typer.colors.GREEN)