chore(docs): upgrade mkdocs-material to 9.8.2 and mkdocstrings (#5192)

Supersedes #5179 (which only bumped `mkdocs-material` to `9.7.7` in
`docs/requirements.txt`) by upgrading `mkdocs-material` to `9.8.2`
together with compatible `mkdocstrings` tooling across both the SDK
Pages workflow and the Python `docs` extra, while retaining external
type cross-references.

## Changes

- **`docs/requirements.txt`** (used by `.github/workflows/docs.yml`):
pin `mkdocs-material==9.8.2`, update `mkdocstrings[python]>=1.0.7,<2`
and `mkdocs-autorefs>=1.4`, remove the legacy `griffe>=0.40,<1.0`
constraint so the Python handler selects its compatible Griffe
dependency, and declare `pymdown-extensions>=11.0.1` explicitly (also
required by Material `9.8.2` and loaded directly by the site's Markdown
extensions).
- **`python/pyproject.toml` & `python/uv.lock`**: raise the `docs` extra
floors to `mkdocs-material>=9.8.2` and `mkdocstrings[python]>=1.0.7,<2`.
Only `mkdocs-material` (`9.7.6` -> `9.8.2`) and `mkdocstrings` (`1.0.4`
-> `1.0.7`) change in `python/uv.lock` (lock revision 3 preserved; other
extras unchanged).
- **`docs/mkdocs.yml`**: switch the `mkdocstrings` Python handler key
from `import` to `inventories` so external type links remain active with
`mkdocstrings-python` 2.x, and update the Pydantic inventory URL to the
canonical `https://pydantic.dev/docs/validation/latest/objects.inv`.

## Verification

- **SDK Pages workflow path (CPython 3.11.18)**: ran both `pip install`
steps from `.github/workflows/docs.yml` (resolving `mkdocs-material
9.8.2`, `mkdocstrings 1.0.8`, `mkdocstrings-python 2.0.11`,
`mkdocs-autorefs 1.4.5`, `griffelib 2.4.1`, `pymdown-extensions
13.1.2`), verified `python -m pip check`, and ran `PYTHONPATH=. mkdocs
build` from `docs/` (exit 0 in 9.65s).
- **Rendered HTML and links check**: inspected
`docs/site/python/python/index.html` (188 API directive headings, 1,881
rendered signatures, 2,121 highlighted blocks). Verified internal
cross-references for representative sync/async APIs and indices
(`lancedb.connect`, `lancedb.connect_async`,
`lancedb.table.Table.search`, `lancedb.table.AsyncTable.search`,
`lancedb.query.BooleanQuery`, `lancedb.schema.blob_array`,
`lancedb.index.FTS`), rendering of `lancedb.rerankers.TypeSafeReranker`,
and external inventory links in the generated HTML (193 Arrow links
including `pyarrow.Table`, 40 Pydantic links including
`pydantic.BaseModel`; all three configured inventories—Arrow, Pandas,
and Pydantic—loaded cleanly).
- **Locked Python `docs` extra (CPython 3.11.18)**: verified `uv lock
--check --python 3.11` and built docs in a separate `uv sync --locked
--no-install-project --extra docs` environment (`mkdocs-material 9.8.2`,
`mkdocstrings 1.0.7`, `mkdocstrings-python 2.0.5`, `pymdown-extensions
11.0.1`) with the Swagger and redirects plugins added; `uv pip check`,
`PYTHONPATH=. mkdocs build`, and the HTML API/external link checks
passed (188 headings, 1,880 signatures, 2,120 highlighted blocks, 197
Arrow and 40 Pydantic external links).
- **Warnings**: the build is not warning-free; both `mkdocs build` runs
exit 0 with pre-existing `mkdocs_autorefs` warnings for duplicate
TypeScript `list` anchors and several unresolved Python docstring
cross-references (and `uv lock --check` still reports the pre-existing
yanked-version warning for `charset-normalizer==3.4.8`).
This commit is contained in:
Xuanwo
2026-11-24 21:12:20 +08:00
committed by GitHub
parent 726a6f77a5
commit 5dd54822f4
4 changed files with 21 additions and 16 deletions
+2 -2
View File
@@ -72,11 +72,11 @@ plugins:
separate_signature: true
filters:
- "!^_"
import:
inventories:
# for cross references
- https://arrow.apache.org/docs/objects.inv
- https://pandas.pydata.org/docs/objects.inv
- https://docs.pydantic.dev/latest/objects.inv
- https://pydantic.dev/docs/validation/latest/objects.inv
- render_swagger:
allow_arbitrary_locations: true
# - redirects:
+4 -4
View File
@@ -1,9 +1,9 @@
mkdocs==1.6.1
mkdocs-jupyter==0.24.1
mkdocs-material==9.6.23
mkdocs-autorefs>=0.5,<=1.0
mkdocstrings[python]>=0.24,<1.0
griffe>=0.40,<1.0
mkdocs-material==9.8.2
mkdocs-autorefs>=1.4
mkdocstrings[python]>=1.0.7,<2
pymdown-extensions>=11.0.1
mkdocs-render-swagger-plugin>=0.1.0
pydantic>=2.7.4,<3
mkdocs-redirects>=1.2.0
+1 -1
View File
@@ -75,7 +75,7 @@ dev = [
"pyright>=1.1.350",
"maturin>=1.10",
]
docs = ["mkdocs", "mkdocs-jupyter", "mkdocs-material", "mkdocstrings-python"]
docs = ["mkdocs", "mkdocs-jupyter", "mkdocs-material>=9.8.2", "mkdocstrings[python]>=1.0.7,<2"]
clip = ["torch", "pillow>=13.0.0", "open-clip-torch"]
siglip = ["torch", "pillow>=13.0.0", "transformers>=4.41.0","sentencepiece"]
embeddings = [
+14 -9
View File
@@ -1813,7 +1813,7 @@ docs = [
{ name = "mkdocs" },
{ name = "mkdocs-jupyter" },
{ name = "mkdocs-material" },
{ name = "mkdocstrings-python" },
{ name = "mkdocstrings", extra = ["python"] },
]
embeddings = [
{ name = "awscli" },
@@ -1888,8 +1888,8 @@ requires-dist = [
{ name = "maturin", marker = "extra == 'dev'", specifier = ">=1.10" },
{ name = "mkdocs", marker = "extra == 'docs'" },
{ name = "mkdocs-jupyter", marker = "extra == 'docs'" },
{ name = "mkdocs-material", marker = "extra == 'docs'" },
{ name = "mkdocstrings-python", marker = "extra == 'docs'" },
{ name = "mkdocs-material", marker = "extra == 'docs'", specifier = ">=9.8.2" },
{ name = "mkdocstrings", extras = ["python"], marker = "extra == 'docs'", specifier = ">=1.0.7,<2" },
{ name = "numpy", specifier = ">=1.24.0" },
{ name = "oci", marker = "extra == 'embeddings'", specifier = ">=2.165.1" },
{ name = "ollama", marker = "extra == 'embeddings'", specifier = ">=0.3.0" },
@@ -2182,7 +2182,7 @@ wheels = [
[[package]]
name = "mkdocs-material"
version = "9.7.6"
version = "9.8.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "babel" },
@@ -2197,9 +2197,9 @@ dependencies = [
{ name = "pymdown-extensions" },
{ name = "requests" },
]
sdist = { url = "https://files.pythonhosted.org/packages/45/29/6d2bcf41ae40802c4beda2432396fff97b8456fb496371d1bc7aad6512ec/mkdocs_material-9.7.6.tar.gz", hash = "sha256:00bdde50574f776d328b1862fe65daeaf581ec309bd150f7bff345a098c64a69", size = 4097959, upload-time = "2026-03-19T15:41:58.161Z" }
sdist = { url = "https://files.pythonhosted.org/packages/99/bf/c47389fa622b513c2d115eb4c16075ef04a5f4d8156039f46cb26e5c70a9/mkdocs_material-9.8.2.tar.gz", hash = "sha256:005d942bdbfa22efa049f4818c31d42fb36bed6d362adb641dd7a2e948078f9d", size = 4160697, upload-time = "2026-11-19T19:52:25.799Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/2c/01/bc663630c510822c95c47a66af9fa7a443c295b47d5f041e5e6ae62ef659/mkdocs_material-9.7.6-py3-none-any.whl", hash = "sha256:71b84353921b8ea1ba84fe11c50912cc512da8fe0881038fcc9a0761c0e635ba", size = 9305470, upload-time = "2026-03-19T15:41:55.217Z" },
{ url = "https://files.pythonhosted.org/packages/18/86/9204441dd9e224f1dc3f1a32edf6a474e84696bfa493c7df067dcde36366/mkdocs_material-9.8.2-py3-none-any.whl", hash = "sha256:ef1414cab33d64fcc13387e972af5ba4620f55f93482d1842933399ed2c69b02", size = 9302480, upload-time = "2026-11-19T19:52:22.436Z" },
]
[[package]]
@@ -2213,7 +2213,7 @@ wheels = [
[[package]]
name = "mkdocstrings"
version = "1.0.4"
version = "1.0.7"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "jinja2" },
@@ -2223,9 +2223,14 @@ dependencies = [
{ name = "mkdocs-autorefs" },
{ name = "pymdown-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/1d/5d/f888d4d3eb31359b327bc9b17a212d6ef03fe0b0682fbb3fc2cb849fb12b/mkdocstrings-1.0.4.tar.gz", hash = "sha256:3969a6515b77db65fd097b53c1b7aa4ae840bd71a2ee62a6a3e89503446d7172", size = 100088, upload-time = "2026-04-15T09:16:53.376Z" }
sdist = { url = "https://files.pythonhosted.org/packages/f5/e8/445b19834bf9559ebbbaa76897e965665b83d2861461eed8d8de4d122057/mkdocstrings-1.0.7.tar.gz", hash = "sha256:0951b147f352118a45a3db85f0f3b660833d34cb5120a2751315b8d08dafd159", size = 103739, upload-time = "2026-10-10T13:50:59.957Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/6e/94/be70f8ee9c45f2f62b39a1f0e9303bc20e138a8f3b8e50ffd89498e177e1/mkdocstrings-1.0.4-py3-none-any.whl", hash = "sha256:63464b4b29053514f32a1dbbf604e52876d5e638111b0c295ab7ed3cac73ca9b", size = 35560, upload-time = "2026-04-15T09:16:51.436Z" },
{ url = "https://files.pythonhosted.org/packages/22/c3/9062531735ff1fd27f3a79c353c4cf4d822eeffd062fd90b2c553a96f4bb/mkdocstrings-1.0.7-py3-none-any.whl", hash = "sha256:9563828667eeb35256f87a6b61fe857676ac628ec1abbce9aea9839a502c9cb1", size = 41597, upload-time = "2026-10-10T13:50:58.43Z" },
]
[package.optional-dependencies]
python = [
{ name = "mkdocstrings-python" },
]
[[package]]