docs: bring docforge docstrings and wiki to GSDFC standard
- fix GSDFC spec contradictions in __init__ docstring (parenthesized types, fenced-block rule) and sync generated README - rewrite docstrings across loaders, models, nav, servers, renderers, cli; sync .pyi stubs - add pydoclint (google style) gate to dev extras and pyproject config - fix mcp nav resources doc:// -> docs:// - refresh docs/lib and docs/mcp, drop stale docforge/ duplicate group - update wiki pages and add GSDFC + MCP guides under 05_development
This commit is contained in:
@@ -4,6 +4,14 @@ MkDocs navigation emitter.
|
||||
This module provides the ``MkDocsNavEmitter`` class, which converts a
|
||||
``ResolvedNav`` instance into the navigation structure required by the
|
||||
MkDocs ``nav`` configuration.
|
||||
|
||||
---
|
||||
|
||||
Notes:
|
||||
- The emitted structure is a list of dictionaries, one per top-level nav
|
||||
entry, matching the MkDocs ``nav`` YAML format.
|
||||
|
||||
---
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
@@ -25,13 +33,15 @@ class MkDocsNavEmitter:
|
||||
Generate a navigation structure for ``mkdocs.yml``.
|
||||
|
||||
Args:
|
||||
nav: Resolved navigation data describing documentation groups
|
||||
nav (ResolvedNav):
|
||||
Resolved navigation data describing documentation groups
|
||||
and their associated Markdown files.
|
||||
|
||||
Returns:
|
||||
A list of dictionaries representing the MkDocs navigation layout.
|
||||
Each dictionary maps a navigation label to a page or a list of
|
||||
pages.
|
||||
list[dict[str, Any]]:
|
||||
A list of dictionaries representing the MkDocs navigation layout.
|
||||
Each dictionary maps a navigation label to a page or a list of
|
||||
pages.
|
||||
"""
|
||||
result: list[dict[str, Any]] = []
|
||||
|
||||
@@ -59,11 +69,14 @@ class MkDocsNavEmitter:
|
||||
resulting path is relative to the documentation root.
|
||||
|
||||
Args:
|
||||
path: Filesystem path to convert.
|
||||
docs_root: Root directory of the documentation sources.
|
||||
path (Path):
|
||||
Filesystem path to convert.
|
||||
docs_root (Path | None):
|
||||
Root directory of the documentation sources.
|
||||
|
||||
Returns:
|
||||
POSIX-style path relative to the documentation root.
|
||||
str:
|
||||
POSIX-style path relative to the documentation root.
|
||||
"""
|
||||
if docs_root and path.is_absolute():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user