Compare commits
10 Commits
0.0.8
...
de427dd350
| Author | SHA1 | Date | |
|---|---|---|---|
| de427dd350 | |||
| b86b5b0e85 | |||
| 2ae96f58de | |||
| 582b6809a0 | |||
| 8c6c46caf2 | |||
| bacf17b930 | |||
| 17e8628197 | |||
| a1c5f046d4 | |||
| d4b79cf95a | |||
| 0129268cd3 |
48
.drone.yml
48
.drone.yml
@@ -23,18 +23,13 @@ steps:
|
||||
commands:
|
||||
- PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
||||
- VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
||||
- echo "🔍 Checking if $PACKAGE_NAME==$VERSION exists on $PIP_REPO_URL ..."
|
||||
- |
|
||||
if [ "$DRONE_TAG" != "$VERSION" ]; then
|
||||
echo "Tag '$DRONE_TAG' does not match pyproject version '$VERSION'; refusing to publish."
|
||||
exit 1
|
||||
fi
|
||||
- echo "Checking if $PACKAGE_NAME==$VERSION exists on $PIP_REPO_URL ..."
|
||||
- |
|
||||
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then
|
||||
echo "$PACKAGE_NAME==$VERSION already exists; skipping build."
|
||||
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
|
||||
echo "✅ $PACKAGE_NAME==$VERSION already exists — skipping build."
|
||||
exit 78
|
||||
else
|
||||
echo "New version detected: $PACKAGE_NAME==$VERSION"
|
||||
echo "🆕 New version detected: $PACKAGE_NAME==$VERSION"
|
||||
fi
|
||||
|
||||
- name: quality-gate
|
||||
@@ -49,24 +44,19 @@ steps:
|
||||
commands:
|
||||
- pip install --upgrade pip build
|
||||
- |
|
||||
if [ -z "$PIP_REPO_URL" ] || [ -z "$PIP_USERNAME" ] || [ -z "$PIP_PASSWORD" ]; then
|
||||
echo "PIP_REPO_URL / PIP_USERNAME / PIP_PASSWORD are not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
- AUTH_URL="https://$PIP_USERNAME:$PIP_PASSWORD@$(echo "$PIP_REPO_URL" | sed -E 's|^[a-zA-Z]+://||; s|/*$||')/simple"
|
||||
- pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]" "pydoclint>=0.9.1"
|
||||
- echo "Running quality gate..."
|
||||
AUTH_URL="https://${PIP_USERNAME}:${PIP_PASSWORD}@$(echo "${PIP_REPO_URL#*://}" | sed 's:/*$::')/simple"
|
||||
pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]"
|
||||
- echo "🛡️ Running quality gate..."
|
||||
- python -m black --check .
|
||||
- python -m ruff check .
|
||||
- python -m mypy
|
||||
- pydoclint .
|
||||
- python -m pytest
|
||||
|
||||
- name: build-package
|
||||
image: python:3.13-slim
|
||||
commands:
|
||||
- pip install --upgrade pip build
|
||||
- echo "Building Python package..."
|
||||
- echo "📦 Building Python package..."
|
||||
- python -m build
|
||||
- ls -l dist
|
||||
|
||||
@@ -81,7 +71,7 @@ steps:
|
||||
from_secret: PIP_PASSWORD
|
||||
commands:
|
||||
- pip install --upgrade twine
|
||||
- echo "Uploading to private PyPI at $PIP_REPO_URL ..."
|
||||
- echo "🚀 Uploading to private PyPI at $PIP_REPO_URL ..."
|
||||
- |
|
||||
twine upload \
|
||||
--repository-url "$PIP_REPO_URL" \
|
||||
@@ -128,31 +118,25 @@ steps:
|
||||
set -e
|
||||
|
||||
PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | cut -d'"' -f2)
|
||||
echo "Package: $PACKAGE_NAME"
|
||||
echo "📦 Package: $PACKAGE_NAME"
|
||||
|
||||
for TAG in $(git tag --sort=version:refname); do
|
||||
VERSION="$TAG"
|
||||
echo "Version: $VERSION"
|
||||
echo "🔁 Version: $VERSION"
|
||||
|
||||
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \
|
||||
"$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then
|
||||
echo "Exists, skipping"
|
||||
"$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
|
||||
echo "⏭️ Exists, skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
git checkout --force "$TAG"
|
||||
|
||||
TAG_VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2)
|
||||
if [ "$TAG" != "$TAG_VERSION" ]; then
|
||||
echo "Tag $TAG != pyproject version $TAG_VERSION at that commit; skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Building $VERSION"
|
||||
echo "🏗️ Building $VERSION"
|
||||
rm -rf dist
|
||||
python -m build
|
||||
|
||||
echo "Uploading $VERSION"
|
||||
echo "⬆️ Uploading $VERSION"
|
||||
twine upload \
|
||||
--repository-url "$PIP_REPO_URL" \
|
||||
-u "$PIP_USERNAME" \
|
||||
@@ -162,4 +146,4 @@ steps:
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- custom
|
||||
- custom
|
||||
51
CHANGELOG.md
51
CHANGELOG.md
@@ -7,58 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.8] - 2026-10-17
|
||||
|
||||
### Added
|
||||
- `docforge-linkfix` MkDocs plugin (registered via the `mkdocs.plugins`
|
||||
entry point) that rebases cross-kind relative links — for example
|
||||
`../lib/...` written in a wiki page — to the repository root so they resolve
|
||||
to `/<repo>/<kind>/` under directory URLs.
|
||||
|
||||
### Changed
|
||||
- The wiki template (`mkdocs.wiki.yml`) now enables `docforge-linkfix`;
|
||||
regenerating a wiki config (or passing `--refresh`) propagates the fix.
|
||||
|
||||
### Fixed
|
||||
- Cross-kind links (`../lib/`, `../api/`, `../wiki/`) in generated wikis no
|
||||
longer resolve into a non-existent `<kind>/<kind>/` path.
|
||||
|
||||
## [0.0.7] - 2026-10-17
|
||||
|
||||
### Added
|
||||
- `py.typed` marker for PEP 561 type information.
|
||||
- `.drone.yml` CI with a quality-gate step (black, ruff, mypy, pytest).
|
||||
- MIT `LICENSE`.
|
||||
- `build --refresh` flag to rebaseline an existing `docs/mkdocs.{kind}.yml`
|
||||
from the packaged templates.
|
||||
- `wiki` build kind with navigation derived from the source file structure.
|
||||
- `--api` build mode rendering an OpenAPI reference under `docs/api` with
|
||||
lib-prefixed navigation.
|
||||
- Hand-written wiki, plus doc-forge-generated API reference under `docs/lib`
|
||||
and MCP bundle under `docs/mcp` (per-kind MkDocs configs).
|
||||
- MIT `LICENSE`.
|
||||
|
||||
### Changed
|
||||
- Adopted the standard Type A PyPI CI pipeline: a `tag == version` guard and a
|
||||
quality gate (black, ruff, mypy, pydoclint, pytest).
|
||||
- Standardized `pyproject.toml` (canonical packaging, lint tool config, extras).
|
||||
- Pinned the `mcp` extra to `mcp>=1.0.0,<2.0.0` to restore compatibility with
|
||||
the current MCP server API used by doc-forge.
|
||||
- Per-kind MkDocs configs (`docs/mkdocs.{lib,api,wiki}.yml`) are generated only
|
||||
when absent; an existing config is used verbatim (the file wins). Pass
|
||||
`--refresh` to regenerate it from the templates.
|
||||
- Per-kind MkDocs configs (`docs/mkdocs.{lib,api,wiki}.yml`) are now generated
|
||||
only when absent; an existing config is used verbatim (the file wins).
|
||||
Pass `--refresh` to regenerate it from the templates.
|
||||
- The wiki template now uses the mongo-ops look: horizontal `navigation.tabs`
|
||||
header, blue grey/teal palette, Roboto font, and additional material feature
|
||||
flags. The lib and api templates are unchanged.
|
||||
- Docstrings and wiki brought to the GSDFC (Google-style) standard.
|
||||
- The `dev` extra now includes the `mkdocs` and `mcp` extras so the
|
||||
quality-gate environment can install and run the full test suite.
|
||||
header, blue grey/teal palette, Roboto font, and additional material
|
||||
feature flags. The lib and api templates are unchanged.
|
||||
|
||||
### Fixed
|
||||
- Loader-generated signatures render cleanly and unresolvable aliases are
|
||||
dropped from generated models.
|
||||
- Stub fixes for typed API surfaces.
|
||||
- `import docforge` no longer requires the optional `mcp` dependency; the
|
||||
MCP server imports `mcp` lazily, matching the MkDocs backend.
|
||||
|
||||
[Unreleased]: https://git.aetoskia.com/aetos/doc-forge/compare/0.0.8...HEAD
|
||||
[0.0.8]: https://git.aetoskia.com/aetos/doc-forge/compare/0.0.7...0.0.8
|
||||
[0.0.7]: https://git.aetoskia.com/aetos/doc-forge/compare/0.0.6...0.0.7
|
||||
- Stub fixes for typed API surfaces.
|
||||
14
README.md
14
README.md
@@ -547,20 +547,6 @@ Example:
|
||||
|
||||
---
|
||||
|
||||
# Type parity (`.pyi` stubs and `py.typed`)
|
||||
|
||||
Documented APIs ship matching type information:
|
||||
|
||||
- Each `.py` module has a synchronized `.pyi` stub in the same package.
|
||||
- Packages expose a `py.typed` marker so type checkers (and consumers)
|
||||
use the authored signatures instead of `Any`.
|
||||
- When signatures change, update the `.py` implementation and its `.pyi`
|
||||
stub together.
|
||||
- Doc-forge documents the docstrings in `.py`; the `.pyi` stub is the
|
||||
machine-consumable signature surface.
|
||||
|
||||
---
|
||||
|
||||
# Parsing guarantees
|
||||
|
||||
GSDFC ensures doc-forge can deterministically extract:
|
||||
|
||||
@@ -546,20 +546,6 @@ Example:
|
||||
|
||||
---
|
||||
|
||||
# Type parity (`.pyi` stubs and `py.typed`)
|
||||
|
||||
Documented APIs ship matching type information:
|
||||
|
||||
- Each `.py` module has a synchronized `.pyi` stub in the same package.
|
||||
- Packages expose a `py.typed` marker so type checkers (and consumers)
|
||||
use the authored signatures instead of `Any`.
|
||||
- When signatures change, update the `.py` implementation and its `.pyi`
|
||||
stub together.
|
||||
- Doc-forge documents the docstrings in `.py`; the `.pyi` stub is the
|
||||
machine-consumable signature surface.
|
||||
|
||||
---
|
||||
|
||||
# Parsing guarantees
|
||||
|
||||
GSDFC ensures doc-forge can deterministically extract:
|
||||
|
||||
@@ -12,8 +12,6 @@ into doc-forge documentation models.
|
||||
Notes:
|
||||
- All analysis is static; analyzed modules are never executed.
|
||||
- Private members (names starting with `_`) are skipped during conversion.
|
||||
- Imported aliases that cannot be resolved (stdlib/third-party names) are
|
||||
skipped; aliases that resolve within the documented project are kept.
|
||||
|
||||
---
|
||||
"""
|
||||
@@ -234,8 +232,6 @@ class GriffeLoader:
|
||||
for name, member in obj.members.items():
|
||||
if name.startswith("_"):
|
||||
continue
|
||||
if not self._is_resolvable_alias(member):
|
||||
continue
|
||||
|
||||
module.add_object(self._convert_object(member))
|
||||
|
||||
@@ -272,8 +268,6 @@ class GriffeLoader:
|
||||
for name, member in obj.members.items():
|
||||
if name.startswith("_"):
|
||||
continue
|
||||
if not self._is_resolvable_alias(member):
|
||||
continue
|
||||
doc_obj.add_member(self._convert_object(member))
|
||||
except AliasResolutionError:
|
||||
pass
|
||||
@@ -305,53 +299,17 @@ class GriffeLoader:
|
||||
"""
|
||||
Safely extract the signature of a Griffe object.
|
||||
|
||||
Griffe exposes signatures as callables (``Object.signature``); the
|
||||
method is invoked and stringified to produce a clean, stable signature.
|
||||
Aliases that point outside the loaded project fail resolution and are
|
||||
reported as `None`.
|
||||
|
||||
Args:
|
||||
obj (Object):
|
||||
Griffe object to inspect.
|
||||
|
||||
Returns:
|
||||
str | None:
|
||||
Clean string representation of the object's signature if
|
||||
available, otherwise `None`.
|
||||
String representation of the object's signature if available, otherwise `None`.
|
||||
"""
|
||||
try:
|
||||
signature = getattr(obj, "signature", None)
|
||||
if signature is None:
|
||||
return None
|
||||
if callable(signature):
|
||||
signature = signature()
|
||||
if not signature:
|
||||
return None
|
||||
return str(signature).strip() or None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def _is_resolvable_alias(self, obj: Object) -> bool:
|
||||
"""
|
||||
Report whether an object is a resolvable part of the documented API.
|
||||
|
||||
Aliases that cannot be resolved (stdlib or third-party imports) are
|
||||
treated as noise and excluded from the model. Non-alias objects are
|
||||
always resolvable.
|
||||
|
||||
Args:
|
||||
obj (Object):
|
||||
Griffe object to test.
|
||||
|
||||
Returns:
|
||||
bool:
|
||||
True if the object should be kept, False if it is an
|
||||
unresolvable alias.
|
||||
"""
|
||||
if obj.kind.value != "alias":
|
||||
return True
|
||||
try:
|
||||
_ = obj.canonical_path
|
||||
if hasattr(obj, "signature") and obj.signature:
|
||||
return str(obj.signature)
|
||||
except AliasResolutionError:
|
||||
return False
|
||||
return True
|
||||
return None
|
||||
return None
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
"""
|
||||
# Summary
|
||||
|
||||
MkDocs plugin that fixes cross-kind relative links in generated wikis.
|
||||
|
||||
A repository served under ``/<repo>/<kind>/`` (for example a wiki at
|
||||
``/myrepo/wiki/`` and a library reference at ``/myrepo/lib/``) is built as
|
||||
two independent MkDocs sites. Authors naturally write links between them
|
||||
using source-relative paths such as ``../lib/01_build_recipe/``.
|
||||
|
||||
MkDocs only rewrites links whose target lives inside ``docs_dir``; anything
|
||||
pointing at a sibling site is emitted verbatim. When ``use_directory_urls``
|
||||
is enabled (the default) the rendered page sits one or more directory levels
|
||||
deeper than its source, so ``../lib/`` resolves to ``/<repo>/wiki/lib/`` and
|
||||
breaks.
|
||||
|
||||
`docforge-linkfix` rewrites such links at render time, prefixing them with
|
||||
enough ``../`` segments to climb back to the repository root so they resolve
|
||||
to ``/<repo>/<kind>/`` regardless of how deeply the page is nested.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mkdocs.plugins import BasePlugin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from mkdocs.config.defaults import MkDocsConfig
|
||||
from mkdocs.structure.files import Files
|
||||
from mkdocs.structure.pages import Page
|
||||
|
||||
__all__ = ["LinkFixPlugin"]
|
||||
|
||||
_CROSS_KIND_LINK = re.compile(r"\]\((?:\.\./)+(lib|api|wiki)/")
|
||||
"""Matches a Markdown link whose target climbs out of the current doc kind."""
|
||||
|
||||
|
||||
class LinkFixPlugin(BasePlugin): # type: ignore[no-untyped-call, type-arg]
|
||||
"""
|
||||
Rewrite cross-kind relative links so they survive directory URLs.
|
||||
"""
|
||||
|
||||
def on_page_markdown(
|
||||
self,
|
||||
markdown: str,
|
||||
/,
|
||||
*,
|
||||
page: Page,
|
||||
config: MkDocsConfig,
|
||||
files: Files,
|
||||
) -> str:
|
||||
"""
|
||||
Prefix cross-kind links with the depth required to reach the repo root.
|
||||
|
||||
Args:
|
||||
markdown (str): The raw Markdown source of the current page.
|
||||
page (Page): The page being rendered; its destination URI is used
|
||||
to determine how many directory levels the output sits below
|
||||
the site root.
|
||||
config (MkDocsConfig): The active MkDocs configuration.
|
||||
files (Files): The collection of files in the site.
|
||||
|
||||
Returns:
|
||||
str: The Markdown with cross-kind links rebased to the repo root.
|
||||
"""
|
||||
depth = page.file.dest_uri.count("/")
|
||||
prefix = "../" * (depth + 1)
|
||||
return _CROSS_KIND_LINK.sub(
|
||||
lambda match: f"]({prefix}{match.group(1)}/", markdown
|
||||
)
|
||||
@@ -23,6 +23,8 @@ import json
|
||||
from pathlib import Path
|
||||
from typing import Any, Literal
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
|
||||
class MCPServer:
|
||||
"""
|
||||
@@ -52,8 +54,6 @@ class MCPServer:
|
||||
name (str):
|
||||
Identifier used for the MCP server instance.
|
||||
"""
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
self.mcp_root = mcp_root
|
||||
self.app = FastMCP(name)
|
||||
|
||||
|
||||
@@ -22,5 +22,4 @@ theme:
|
||||
logo: material/database
|
||||
repo: fontawesome/brands/github
|
||||
plugins:
|
||||
- search
|
||||
- docforge-linkfix
|
||||
- search
|
||||
3
docs/lib/docforge/cli/api_utils.md
Normal file
3
docs/lib/docforge/cli/api_utils.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Api Utils
|
||||
|
||||
::: docforge.cli.api_utils
|
||||
3
docs/lib/docforge/cli/commands.md
Normal file
3
docs/lib/docforge/cli/commands.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Commands
|
||||
|
||||
::: docforge.cli.commands
|
||||
8
docs/lib/docforge/cli/index.md
Normal file
8
docs/lib/docforge/cli/index.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Cli
|
||||
|
||||
::: docforge.cli
|
||||
- [Api Utils](api_utils.md)
|
||||
- [Commands](commands.md)
|
||||
- [Main](main.md)
|
||||
- [Mcp Utils](mcp_utils.md)
|
||||
- [Mkdocs Utils](mkdocs_utils.md)
|
||||
3
docs/lib/docforge/cli/main.md
Normal file
3
docs/lib/docforge/cli/main.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Main
|
||||
|
||||
::: docforge.cli.main
|
||||
3
docs/lib/docforge/cli/mcp_utils.md
Normal file
3
docs/lib/docforge/cli/mcp_utils.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mcp Utils
|
||||
|
||||
::: docforge.cli.mcp_utils
|
||||
3
docs/lib/docforge/cli/mkdocs_utils.md
Normal file
3
docs/lib/docforge/cli/mkdocs_utils.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mkdocs Utils
|
||||
|
||||
::: docforge.cli.mkdocs_utils
|
||||
9
docs/lib/docforge/index.md
Normal file
9
docs/lib/docforge/index.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Docforge
|
||||
|
||||
::: docforge
|
||||
- [Cli](cli/)
|
||||
- [Loaders](loaders/)
|
||||
- [Models](models/)
|
||||
- [Nav](nav/)
|
||||
- [Renderers](renderers/)
|
||||
- [Servers](servers/)
|
||||
3
docs/lib/docforge/loaders/griffe_loader.md
Normal file
3
docs/lib/docforge/loaders/griffe_loader.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Griffe Loader
|
||||
|
||||
::: docforge.loaders.griffe_loader
|
||||
4
docs/lib/docforge/loaders/index.md
Normal file
4
docs/lib/docforge/loaders/index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Loaders
|
||||
|
||||
::: docforge.loaders
|
||||
- [Griffe Loader](griffe_loader.md)
|
||||
6
docs/lib/docforge/models/index.md
Normal file
6
docs/lib/docforge/models/index.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Models
|
||||
|
||||
::: docforge.models
|
||||
- [Module](module.md)
|
||||
- [Object](object.md)
|
||||
- [Project](project.md)
|
||||
3
docs/lib/docforge/models/module.md
Normal file
3
docs/lib/docforge/models/module.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Module
|
||||
|
||||
::: docforge.models.module
|
||||
3
docs/lib/docforge/models/object.md
Normal file
3
docs/lib/docforge/models/object.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Object
|
||||
|
||||
::: docforge.models.object
|
||||
3
docs/lib/docforge/models/project.md
Normal file
3
docs/lib/docforge/models/project.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Project
|
||||
|
||||
::: docforge.models.project
|
||||
7
docs/lib/docforge/nav/index.md
Normal file
7
docs/lib/docforge/nav/index.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Nav
|
||||
|
||||
::: docforge.nav
|
||||
- [Mkdocs](mkdocs.md)
|
||||
- [Resolver](resolver.md)
|
||||
- [Spec](spec.md)
|
||||
- [Wiki](wiki.md)
|
||||
3
docs/lib/docforge/nav/mkdocs.md
Normal file
3
docs/lib/docforge/nav/mkdocs.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mkdocs
|
||||
|
||||
::: docforge.nav.mkdocs
|
||||
3
docs/lib/docforge/nav/resolver.md
Normal file
3
docs/lib/docforge/nav/resolver.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Resolver
|
||||
|
||||
::: docforge.nav.resolver
|
||||
3
docs/lib/docforge/nav/spec.md
Normal file
3
docs/lib/docforge/nav/spec.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Spec
|
||||
|
||||
::: docforge.nav.spec
|
||||
3
docs/lib/docforge/nav/wiki.md
Normal file
3
docs/lib/docforge/nav/wiki.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Wiki
|
||||
|
||||
::: docforge.nav.wiki
|
||||
3
docs/lib/docforge/renderers/base.md
Normal file
3
docs/lib/docforge/renderers/base.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Base
|
||||
|
||||
::: docforge.renderers.base
|
||||
6
docs/lib/docforge/renderers/index.md
Normal file
6
docs/lib/docforge/renderers/index.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Renderers
|
||||
|
||||
::: docforge.renderers
|
||||
- [Base](base.md)
|
||||
- [Mcp Renderer](mcp_renderer.md)
|
||||
- [Mkdocs Renderer](mkdocs_renderer.md)
|
||||
3
docs/lib/docforge/renderers/mcp_renderer.md
Normal file
3
docs/lib/docforge/renderers/mcp_renderer.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mcp Renderer
|
||||
|
||||
::: docforge.renderers.mcp_renderer
|
||||
3
docs/lib/docforge/renderers/mkdocs_renderer.md
Normal file
3
docs/lib/docforge/renderers/mkdocs_renderer.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mkdocs Renderer
|
||||
|
||||
::: docforge.renderers.mkdocs_renderer
|
||||
4
docs/lib/docforge/servers/index.md
Normal file
4
docs/lib/docforge/servers/index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Servers
|
||||
|
||||
::: docforge.servers
|
||||
- [Mcp Server](mcp_server.md)
|
||||
3
docs/lib/docforge/servers/mcp_server.md
Normal file
3
docs/lib/docforge/servers/mcp_server.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Mcp Server
|
||||
|
||||
::: docforge.servers.mcp_server
|
||||
@@ -1,3 +1,4 @@
|
||||
# docforge
|
||||
|
||||
::: docforge
|
||||
- [Docforge](docforge/)
|
||||
|
||||
@@ -4,6 +4,34 @@
|
||||
"path": "docforge.cli.api_utils",
|
||||
"docstring": "# Summary\n\nUtilities for building API documentation from an OpenAPI specification.",
|
||||
"objects": {
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.api_utils.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"dataclass": {
|
||||
"name": "dataclass",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.api_utils.dataclass",
|
||||
"signature": "<bound method Alias.signature of Alias('dataclass', 'dataclasses.dataclass')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.api_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.api_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"SWAGGER_SPEC_FILENAME": {
|
||||
"name": "SWAGGER_SPEC_FILENAME",
|
||||
"kind": "attribute",
|
||||
@@ -15,7 +43,7 @@
|
||||
"name": "OpenAPIMetadata",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.api_utils.OpenAPIMetadata",
|
||||
"signature": "OpenAPIMetadata(site_name: str, site_description: str | None, site_author: str | None)",
|
||||
"signature": "<bound method Class.signature of Class('OpenAPIMetadata', 16, 30)>",
|
||||
"docstring": "Metadata derived from the ``info`` block of an OpenAPI specification.\n\nAttributes:\n site_name: Spec title, used as the MkDocs site name.\n site_description: Spec description, used as the site description.\n site_author: Contact name (fallback: contact email), used as the\n site author.",
|
||||
"members": {
|
||||
"site_name": {
|
||||
@@ -45,22 +73,29 @@
|
||||
"name": "load_openapi_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.api_utils.load_openapi_spec",
|
||||
"signature": "load_openapi_spec(spec_path: Path) -> dict[Any, Any]",
|
||||
"signature": "<bound method Function.signature of Function('load_openapi_spec', 33, 64)>",
|
||||
"docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid."
|
||||
},
|
||||
"derive_metadata": {
|
||||
"name": "derive_metadata",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.api_utils.derive_metadata",
|
||||
"signature": "derive_metadata(spec: dict[Any, Any]) -> OpenAPIMetadata",
|
||||
"signature": "<bound method Function.signature of Function('derive_metadata', 67, 91)>",
|
||||
"docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec."
|
||||
},
|
||||
"generate_api_sources": {
|
||||
"name": "generate_api_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.api_utils.generate_api_sources",
|
||||
"signature": "generate_api_sources(spec: dict[Any, Any], docs_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_api_sources', 94, 118)>",
|
||||
"docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written."
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.api_utils.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,46 +4,95 @@
|
||||
"path": "docforge.cli.commands",
|
||||
"docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.\n\n---\n\nNotes:\n - The `build` command validates requested modes before generating anything.\n - `--mkdocs`, `--api`, and `--wiki` each emit their own MkDocs config and\n build (`docs/mkdocs.{kind}.yml` into `site/{kind}`); `--mcp` generates a\n machine-readable bundle independently.\n\n---",
|
||||
"objects": {
|
||||
"os": {
|
||||
"name": "os",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.os",
|
||||
"signature": "<bound method Alias.signature of Alias('os', 'os')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"api_utils": {
|
||||
"name": "api_utils",
|
||||
"kind": "module",
|
||||
"path": "docforge.cli.commands.api_utils",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('api_utils', 'docforge.cli.api_utils')>",
|
||||
"docstring": "# Summary\n\nUtilities for building API documentation from an OpenAPI specification.",
|
||||
"members": {
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.api_utils.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'docforge.cli.api_utils.json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"dataclass": {
|
||||
"name": "dataclass",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.api_utils.dataclass",
|
||||
"signature": "<bound method Alias.signature of Alias('dataclass', 'docforge.cli.api_utils.dataclass')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.api_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'docforge.cli.api_utils.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.api_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'docforge.cli.api_utils.click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"SWAGGER_SPEC_FILENAME": {
|
||||
"name": "SWAGGER_SPEC_FILENAME",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.api_utils.SWAGGER_SPEC_FILENAME",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('SWAGGER_SPEC_FILENAME', 'docforge.cli.api_utils.SWAGGER_SPEC_FILENAME')>",
|
||||
"docstring": null
|
||||
},
|
||||
"OpenAPIMetadata": {
|
||||
"name": "OpenAPIMetadata",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata",
|
||||
"signature": "OpenAPIMetadata(site_name: str, site_description: str | None, site_author: str | None)",
|
||||
"signature": "<bound method Alias.signature of Alias('OpenAPIMetadata', 'docforge.cli.api_utils.OpenAPIMetadata')>",
|
||||
"docstring": "Metadata derived from the ``info`` block of an OpenAPI specification.\n\nAttributes:\n site_name: Spec title, used as the MkDocs site name.\n site_description: Spec description, used as the site description.\n site_author: Contact name (fallback: contact email), used as the\n site author.",
|
||||
"members": {
|
||||
"site_name": {
|
||||
"name": "site_name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('site_name', 'docforge.cli.api_utils.OpenAPIMetadata.site_name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"site_description": {
|
||||
"name": "site_description",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_description",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('site_description', 'docforge.cli.api_utils.OpenAPIMetadata.site_description')>",
|
||||
"docstring": null
|
||||
},
|
||||
"site_author": {
|
||||
"name": "site_author",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_author",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('site_author', 'docforge.cli.api_utils.OpenAPIMetadata.site_author')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
@@ -52,22 +101,29 @@
|
||||
"name": "load_openapi_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.api_utils.load_openapi_spec",
|
||||
"signature": "load_openapi_spec(spec_path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_openapi_spec', 'docforge.cli.api_utils.load_openapi_spec')>",
|
||||
"docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid."
|
||||
},
|
||||
"derive_metadata": {
|
||||
"name": "derive_metadata",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.api_utils.derive_metadata",
|
||||
"signature": "derive_metadata(spec: dict[Any, Any])",
|
||||
"signature": "<bound method Alias.signature of Alias('derive_metadata', 'docforge.cli.api_utils.derive_metadata')>",
|
||||
"docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec."
|
||||
},
|
||||
"generate_api_sources": {
|
||||
"name": "generate_api_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.api_utils.generate_api_sources",
|
||||
"signature": "generate_api_sources(spec: dict[Any, Any], docs_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_api_sources', 'docforge.cli.api_utils.generate_api_sources')>",
|
||||
"docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written."
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.api_utils.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'docforge.cli.api_utils.Any')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -75,28 +131,42 @@
|
||||
"name": "mcp_utils",
|
||||
"kind": "module",
|
||||
"path": "docforge.cli.commands.mcp_utils",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('mcp_utils', 'docforge.cli.mcp_utils')>",
|
||||
"docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---",
|
||||
"members": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mcp_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'docforge.cli.mcp_utils.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mcp_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'docforge.cli.mcp_utils.click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mcp_utils.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.cli.mcp_utils.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -105,28 +175,28 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.cli.mcp_utils.discover_module_paths')>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"MCPRenderer": {
|
||||
"name": "MCPRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MCPRenderer', 'docforge.cli.mcp_utils.MCPRenderer')>",
|
||||
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mcp_renderer.MCPRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mcp_renderer.MCPRenderer.generate_sources')>",
|
||||
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as `nav.json` and `index.json`.\n\nArgs:\n project (Project):\n Documentation project model to render.\n\n out_dir (Path):\n Directory where MCP resources will be written."
|
||||
}
|
||||
}
|
||||
@@ -135,28 +205,28 @@
|
||||
"name": "MCPServer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPServer",
|
||||
"signature": "MCPServer(mcp_root: Path, name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('MCPServer', 'docforge.cli.mcp_utils.MCPServer')>",
|
||||
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.",
|
||||
"members": {
|
||||
"mcp_root": {
|
||||
"name": "mcp_root",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPServer.mcp_root",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('mcp_root', 'docforge.servers.mcp_server.MCPServer.mcp_root')>",
|
||||
"docstring": null
|
||||
},
|
||||
"app": {
|
||||
"name": "app",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPServer.app",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('app', 'docforge.servers.mcp_server.MCPServer.app')>",
|
||||
"docstring": null
|
||||
},
|
||||
"run": {
|
||||
"name": "run",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.MCPServer.run",
|
||||
"signature": "run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http')",
|
||||
"signature": "<bound method Alias.signature of Alias('run', 'docforge.servers.mcp_server.MCPServer.run')>",
|
||||
"docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`."
|
||||
}
|
||||
}
|
||||
@@ -165,14 +235,14 @@
|
||||
"name": "generate_resources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.generate_resources",
|
||||
"signature": "generate_resources(module: str, project_name: str | None, out_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_resources', 'docforge.cli.mcp_utils.generate_resources')>",
|
||||
"docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written."
|
||||
},
|
||||
"serve": {
|
||||
"name": "serve",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mcp_utils.serve",
|
||||
"signature": "serve(module: str, mcp_root: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('serve', 'docforge.cli.mcp_utils.serve')>",
|
||||
"docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module (str):\n Python module import path used to identify the served\n documentation instance.\n\n mcp_root (Path):\n Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException:\n If the MCP documentation bundle is missing required files or directories."
|
||||
}
|
||||
}
|
||||
@@ -181,28 +251,77 @@
|
||||
"name": "mkdocs_utils",
|
||||
"kind": "module",
|
||||
"path": "docforge.cli.commands.mkdocs_utils",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('mkdocs_utils', 'docforge.cli.mkdocs_utils')>",
|
||||
"docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A separate `mkdocs.{kind}.yml` configuration and build is emitted per\n enabled kind (lib, api, wiki), each scoped to its own `docs_dir` and\n written into its own `site_dir` (`site/lib`, `site/api`, `site/wiki`).\n - Navigation blocks are re-rooted per kind: the wiki navigation drops its\n leading `wiki/` scope and the resolved nav spec drops its `lib/` scope.\n\n---",
|
||||
"members": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'docforge.cli.mkdocs_utils.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"resources": {
|
||||
"name": "resources",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.resources",
|
||||
"signature": "<bound method Alias.signature of Alias('resources', 'docforge.cli.mkdocs_utils.resources')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'docforge.cli.mkdocs_utils.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'docforge.cli.mkdocs_utils.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"cast": {
|
||||
"name": "cast",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.cast",
|
||||
"signature": "<bound method Alias.signature of Alias('cast', 'docforge.cli.mkdocs_utils.cast')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'docforge.cli.mkdocs_utils.click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"yaml": {
|
||||
"name": "yaml",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.yaml",
|
||||
"signature": "<bound method Alias.signature of Alias('yaml', 'docforge.cli.mkdocs_utils.yaml')>",
|
||||
"docstring": null
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.cli.mkdocs_utils.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -211,21 +330,21 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.cli.mkdocs_utils.discover_module_paths')>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"MkDocsNavEmitter": {
|
||||
"name": "MkDocsNavEmitter",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsNavEmitter', 'docforge.cli.mkdocs_utils.MkDocsNavEmitter')>",
|
||||
"docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.",
|
||||
"members": {
|
||||
"emit": {
|
||||
"name": "emit",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit",
|
||||
"signature": "emit(nav: ResolvedNav)",
|
||||
"signature": "<bound method Alias.signature of Alias('emit', 'docforge.nav.mkdocs.MkDocsNavEmitter.emit')>",
|
||||
"docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages."
|
||||
}
|
||||
}
|
||||
@@ -234,49 +353,49 @@
|
||||
"name": "build_wiki_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav",
|
||||
"signature": "build_wiki_nav(wiki_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('build_wiki_nav', 'docforge.cli.mkdocs_utils.build_wiki_nav')>",
|
||||
"docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist."
|
||||
},
|
||||
"load_nav_spec": {
|
||||
"name": "load_nav_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.load_nav_spec",
|
||||
"signature": "load_nav_spec(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_nav_spec', 'docforge.cli.mkdocs_utils.load_nav_spec')>",
|
||||
"docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid."
|
||||
},
|
||||
"resolve_nav": {
|
||||
"name": "resolve_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.resolve_nav",
|
||||
"signature": "resolve_nav(spec: NavSpec, docs_root: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('resolve_nav', 'docforge.cli.mkdocs_utils.resolve_nav')>",
|
||||
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
||||
},
|
||||
"MkDocsRenderer": {
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsRenderer', 'docforge.cli.mkdocs_utils.MkDocsRenderer')>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path, module_is_source: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources')>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme",
|
||||
"signature": "generate_readme(project: Project, docs_dir: Path, module_is_source: bool | None = None, readme_dir: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_readme', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme')>",
|
||||
"docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`."
|
||||
}
|
||||
}
|
||||
@@ -285,49 +404,49 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.generate_sources",
|
||||
"signature": "generate_sources(module: str, docs_dir: Path, project_name: str | None = None, module_is_source: bool | None = None, readme_dir: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.cli.mkdocs_utils.generate_sources')>",
|
||||
"docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``."
|
||||
},
|
||||
"build_lib_nav": {
|
||||
"name": "build_lib_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.build_lib_nav",
|
||||
"signature": "build_lib_nav(nav_file: Path, docs_root: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('build_lib_nav', 'docforge.cli.mkdocs_utils.build_lib_nav')>",
|
||||
"docstring": "Build the re-rooted navigation block for a lib site.\n\nThe navigation specification is resolved against the shared documentation\nroot and every resulting path is re-rooted relative to the ``lib``\nsubdirectory by stripping its leading ``lib/`` scope component.\n\nArgs:\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n docs_root (Path):\n Shared documentation root containing the ``lib`` sources.\n\nReturns:\n tuple[list[dict[str, Any]], dict[str, str] | None]:\n The re-rooted navigation block and the optional theme icon\n mapping from the specification.\n\nRaises:\n click.FileError:\n If the navigation specification cannot be found."
|
||||
},
|
||||
"build_wiki_nav_block": {
|
||||
"name": "build_wiki_nav_block",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav_block",
|
||||
"signature": "build_wiki_nav_block(wiki_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('build_wiki_nav_block', 'docforge.cli.mkdocs_utils.build_wiki_nav_block')>",
|
||||
"docstring": "Build the re-rooted navigation block for a wiki site.\n\nThe wiki navigation derived from the wiki file structure is re-rooted\nrelative to the wiki directory itself by stripping the leading ``wiki/``\nscope component.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries relative to the wiki directory.\n\nRaises:\n click.FileError:\n If the wiki directory does not exist."
|
||||
},
|
||||
"load_spec_icon": {
|
||||
"name": "load_spec_icon",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.load_spec_icon",
|
||||
"signature": "load_spec_icon(nav_file: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_spec_icon', 'docforge.cli.mkdocs_utils.load_spec_icon')>",
|
||||
"docstring": "Load the theme icon mapping from a navigation specification.\n\nArgs:\n nav_file (Path):\n Path to the navigation specification file.\n\nReturns:\n dict[str, str] | None:\n The icon mapping, or ``None`` when the specification file is\n absent or cannot be parsed."
|
||||
},
|
||||
"generate_site_config": {
|
||||
"name": "generate_site_config",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.generate_site_config",
|
||||
"signature": "generate_site_config(kind: str, kind_root: Path, nav_block: list[dict[str, Any]], out: Path, site_name: str, docs_dir: str, site_dir: str, template: Path | None = None, site_description: str | None = None, site_author: str | None = None, theme_icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_site_config', 'docforge.cli.mkdocs_utils.generate_site_config')>",
|
||||
"docstring": "Generate a per-kind `mkdocs.{kind}.yml` configuration file.\n\nThe configuration is created by merging the shared ``mkdocs.common.yml``\ntemplate with the fragment contributed by the kind (``lib``, ``api``, or\n``wiki``). Both ``docs_dir`` and ``site_dir`` are written relative to the\nconfiguration file's directory: the kind's sources when expressed as a\nsibling path (for example ``lib``) and the per-kind site output (for\nexample ``../site/lib``).\n\nArgs:\n kind (str):\n Documentation kind, one of ``lib``, ``api``, or ``wiki``.\n\n kind_root (Path):\n Directory scoped to the kind (for example ``docs/lib``) that\n serves as the MkDocs ``docs_dir``.\n\n nav_block (list[dict[str, Any]]):\n Re-rooted navigation entries for the kind's site.\n\n out (Path):\n Destination path where the generated ``mkdocs.{kind}.yml`` file\n is written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n docs_dir (str):\n MkDocs ``docs_dir`` value, relative to the configuration\n file's directory.\n\n site_dir (str):\n MkDocs ``site_dir`` value, relative to the configuration\n file's directory.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template\n that replaces the built-in templates entirely.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n theme_icon (dict[str, str] | None):\n Optional mapping of theme icon entries injected as\n ``theme.icon``."
|
||||
},
|
||||
"build_configs": {
|
||||
"name": "build_configs",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.build_configs",
|
||||
"signature": "build_configs(yml_paths: Iterable[Path])",
|
||||
"signature": "<bound method Alias.signature of Alias('build_configs', 'docforge.cli.mkdocs_utils.build_configs')>",
|
||||
"docstring": "Build the MkDocs documentation site for every given configuration.\n\nEach configuration file is loaded and built in turn, producing the\nper-kind static sites (``site/lib``, ``site/api``, ``site/wiki``).\n\nArgs:\n yml_paths (Iterable[Path]):\n Configuration files to build, in order.\n\nRaises:\n click.ClickException:\n If a configuration file does not exist."
|
||||
},
|
||||
"serve": {
|
||||
"name": "serve",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.mkdocs_utils.serve",
|
||||
"signature": "serve(mkdocs_yml: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('serve', 'docforge.cli.mkdocs_utils.serve')>",
|
||||
"docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist."
|
||||
}
|
||||
}
|
||||
@@ -336,21 +455,21 @@
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.loaders.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -359,70 +478,70 @@
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.commands.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.commands.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -438,22 +557,29 @@
|
||||
"name": "build",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.build",
|
||||
"signature": "build(mcp: bool, mkdocs: bool, api: bool, wiki: bool, refresh: bool, module_is_source: bool, module: str | None, openapi_spec: Path | None, project_name: str | None, site_name: str | None, docs_dir: Path, wiki_dir: Path, nav_file: Path, template: Path | None, out_dir: Path) -> None",
|
||||
"docstring": "Build documentation artifacts.\n\nThis command runs the full documentation pipeline: it loads Python\nmodules, generates renderer-specific documentation sources, and\noptionally builds the final output.\n\nDepending on the selected options, the build can target:\n\n- A lib MkDocs site (`--mkdocs`) for library reference docs\n- A swagger-enabled API MkDocs site (`--api`) built from an OpenAPI spec\n- A wiki MkDocs site (`--wiki`) built from hand-written markdown\n- MCP structured documentation resources (`--mcp`)\n\nEach enabled site kind produces its own MkDocs configuration\n(`docs/mkdocs.{kind}.yml`) and its own build (`site/{kind}`).\n\nNotes:\n - At least one of `--mcp`, `--mkdocs`, `--wiki`, or `--api` must be\n provided.\n - `--mkdocs`, `--api`, and `--wiki` emit independent MkDocs builds,\n while `--mcp` emits a machine-readable bundle.\n - Configuration files are generated only when absent; an existing\n `docs/mkdocs.{kind}.yml` is used as-is. Pass `--refresh` to\n rebaseline it from the templates.\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable the lib MkDocs documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n wiki (bool):\n Build a hand-written wiki directory as its own MkDocs site.\n\n refresh (bool):\n Regenerate ``docs/mkdocs.{kind}.yml`` from templates even when\n it already exists. By default, existing configs are used as-is.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (str | None):\n Python module import path to document.\n\n openapi_spec (Path | None):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (str | None):\n Optional override for the project name.\n\n site_name (str | None):\n Display name for the lib and wiki MkDocs sites.\n\n docs_dir (Path):\n Shared documentation root used for generated sources.\n wiki_dir (Path):\n Directory containing hand-written wiki markdown files.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Path | None):\n Optional custom MkDocs configuration template.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting."
|
||||
"signature": "<bound method Function.signature of Function('build', 40, 264)>",
|
||||
"docstring": "Build documentation artifacts.\n\nThis command runs the full documentation pipeline: it loads Python\nmodules, generates renderer-specific documentation sources, and\noptionally builds the final output.\n\nDepending on the selected options, the build can target:\n\n- A lib MkDocs site (`--mkdocs`) for library reference docs\n- A swagger-enabled API MkDocs site (`--api`) built from an OpenAPI spec\n- A wiki MkDocs site (`--wiki`) built from hand-written markdown\n- MCP structured documentation resources (`--mcp`)\n\nEach enabled site kind produces its own MkDocs configuration\n(`docs/mkdocs.{kind}.yml`) and its own build (`site/{kind}`).\n\nNotes:\n - At least one of `--mcp`, `--mkdocs`, `--wiki`, or `--api` must be\n provided.\n - `--mkdocs`, `--api`, and `--wiki` emit independent MkDocs builds,\n while `--mcp` emits a machine-readable bundle.\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable the lib MkDocs documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n wiki (bool):\n Build a hand-written wiki directory as its own MkDocs site.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (str | None):\n Python module import path to document.\n\n openapi_spec (Path | None):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (str | None):\n Optional override for the project name.\n\n site_name (str | None):\n Display name for the lib and wiki MkDocs sites.\n\n docs_dir (Path):\n Shared documentation root used for generated sources.\n wiki_dir (Path):\n Directory containing hand-written wiki markdown files.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Path | None):\n Optional custom MkDocs configuration template.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting."
|
||||
},
|
||||
"serve": {
|
||||
"name": "serve",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.serve",
|
||||
"signature": "serve(mcp: bool, mkdocs: bool, lib: bool, api: bool, wiki: bool, module: str | None, mkdocs_yml: Path, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('serve', 267, 367)>",
|
||||
"docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing a site, or\n- An MCP server exposing structured documentation resources\n\nThe kind flags (`--lib`, `--api`, `--wiki`) select the generated\nper-kind config (`docs/mkdocs.{kind}.yml`); `--mkdocs` serves the config\npassed via `--mkdocs-yml`.\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site from ``--mkdocs-yml``.\n\n lib (bool):\n Serve the lib MkDocs site.\n\n api (bool):\n Serve the API MkDocs site.\n\n wiki (bool):\n Serve the wiki MkDocs site.\n\n module (str | None):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided."
|
||||
},
|
||||
"tree": {
|
||||
"name": "tree",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.commands.tree",
|
||||
"signature": "tree(module: str, project_name: str | None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('tree', 370, 406)>",
|
||||
"docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (str | None):\n Optional name to display as the project root."
|
||||
},
|
||||
"Group": {
|
||||
"name": "Group",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.commands.Group",
|
||||
"signature": "<bound method Alias.signature of Alias('Group', 'click.core.Group')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,14 +8,14 @@
|
||||
"name": "cli",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.main.cli",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('cli', 'docforge.cli.commands.cli')>",
|
||||
"docstring": null
|
||||
},
|
||||
"main": {
|
||||
"name": "main",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.main.main",
|
||||
"signature": "main() -> None",
|
||||
"signature": "<bound method Function.signature of Function('main', 13, 21)>",
|
||||
"docstring": "Run the doc-forge command-line interface.\n\nThis function initializes and executes the Click CLI application.\nIt is used as the console entry point when invoking `doc-forge`\nfrom the command line."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,25 +4,39 @@
|
||||
"path": "docforge.cli.mcp_utils",
|
||||
"docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mcp_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mcp_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mcp_utils.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.loaders.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -31,28 +45,28 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.loaders.discover_module_paths')>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"MCPRenderer": {
|
||||
"name": "MCPRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mcp_utils.MCPRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MCPRenderer', 'docforge.renderers.MCPRenderer')>",
|
||||
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.mcp_utils.MCPRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mcp_renderer.MCPRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.MCPRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mcp_renderer.MCPRenderer.generate_sources')>",
|
||||
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as `nav.json` and `index.json`.\n\nArgs:\n project (Project):\n Documentation project model to render.\n\n out_dir (Path):\n Directory where MCP resources will be written."
|
||||
}
|
||||
}
|
||||
@@ -61,28 +75,28 @@
|
||||
"name": "MCPServer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mcp_utils.MCPServer",
|
||||
"signature": "MCPServer(mcp_root: Path, name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('MCPServer', 'docforge.servers.MCPServer')>",
|
||||
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.",
|
||||
"members": {
|
||||
"mcp_root": {
|
||||
"name": "mcp_root",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.mcp_utils.MCPServer.mcp_root",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('mcp_root', 'docforge.servers.mcp_server.MCPServer.mcp_root')>",
|
||||
"docstring": null
|
||||
},
|
||||
"app": {
|
||||
"name": "app",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.mcp_utils.MCPServer.app",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('app', 'docforge.servers.mcp_server.MCPServer.app')>",
|
||||
"docstring": null
|
||||
},
|
||||
"run": {
|
||||
"name": "run",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.MCPServer.run",
|
||||
"signature": "run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http')",
|
||||
"signature": "<bound method Alias.signature of Alias('run', 'docforge.servers.mcp_server.MCPServer.run')>",
|
||||
"docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`."
|
||||
}
|
||||
}
|
||||
@@ -91,14 +105,14 @@
|
||||
"name": "generate_resources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.generate_resources",
|
||||
"signature": "generate_resources(module: str, project_name: str | None, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_resources', 26, 52)>",
|
||||
"docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written."
|
||||
},
|
||||
"serve": {
|
||||
"name": "serve",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mcp_utils.serve",
|
||||
"signature": "serve(module: str, mcp_root: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('serve', 55, 92)>",
|
||||
"docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module (str):\n Python module import path used to identify the served\n documentation instance.\n\n mcp_root (Path):\n Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException:\n If the MCP documentation bundle is missing required files or directories."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,25 +4,74 @@
|
||||
"path": "docforge.cli.mkdocs_utils",
|
||||
"docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A separate `mkdocs.{kind}.yml` configuration and build is emitted per\n enabled kind (lib, api, wiki), each scoped to its own `docs_dir` and\n written into its own `site_dir` (`site/lib`, `site/api`, `site/wiki`).\n - Navigation blocks are re-rooted per kind: the wiki navigation drops its\n leading `wiki/` scope and the resolved nav spec drops its `lib/` scope.\n\n---",
|
||||
"objects": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"resources": {
|
||||
"name": "resources",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.resources",
|
||||
"signature": "<bound method Alias.signature of Alias('resources', 'importlib.resources')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"cast": {
|
||||
"name": "cast",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.cast",
|
||||
"signature": "<bound method Alias.signature of Alias('cast', 'typing.cast')>",
|
||||
"docstring": null
|
||||
},
|
||||
"click": {
|
||||
"name": "click",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.click",
|
||||
"signature": "<bound method Alias.signature of Alias('click', 'click')>",
|
||||
"docstring": null
|
||||
},
|
||||
"yaml": {
|
||||
"name": "yaml",
|
||||
"kind": "alias",
|
||||
"path": "docforge.cli.mkdocs_utils.yaml",
|
||||
"signature": "<bound method Alias.signature of Alias('yaml', 'yaml')>",
|
||||
"docstring": null
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mkdocs_utils.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.loaders.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -31,21 +80,21 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.loaders.discover_module_paths')>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"MkDocsNavEmitter": {
|
||||
"name": "MkDocsNavEmitter",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsNavEmitter', 'docforge.nav.MkDocsNavEmitter')>",
|
||||
"docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.",
|
||||
"members": {
|
||||
"emit": {
|
||||
"name": "emit",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit",
|
||||
"signature": "emit(nav: ResolvedNav)",
|
||||
"signature": "<bound method Alias.signature of Alias('emit', 'docforge.nav.mkdocs.MkDocsNavEmitter.emit')>",
|
||||
"docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages."
|
||||
}
|
||||
}
|
||||
@@ -54,49 +103,49 @@
|
||||
"name": "build_wiki_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.build_wiki_nav",
|
||||
"signature": "build_wiki_nav(wiki_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('build_wiki_nav', 'docforge.nav.build_wiki_nav')>",
|
||||
"docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist."
|
||||
},
|
||||
"load_nav_spec": {
|
||||
"name": "load_nav_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.load_nav_spec",
|
||||
"signature": "load_nav_spec(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_nav_spec', 'docforge.nav.load_nav_spec')>",
|
||||
"docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid."
|
||||
},
|
||||
"resolve_nav": {
|
||||
"name": "resolve_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.resolve_nav",
|
||||
"signature": "resolve_nav(spec: NavSpec, docs_root: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('resolve_nav', 'docforge.nav.resolve_nav')>",
|
||||
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
||||
},
|
||||
"MkDocsRenderer": {
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsRenderer', 'docforge.renderers.MkDocsRenderer')>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path, module_is_source: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources')>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme",
|
||||
"signature": "generate_readme(project: Project, docs_dir: Path, module_is_source: bool | None = None, readme_dir: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_readme', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme')>",
|
||||
"docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`."
|
||||
}
|
||||
}
|
||||
@@ -105,49 +154,49 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.generate_sources",
|
||||
"signature": "generate_sources(module: str, docs_dir: Path, project_name: str | None = None, module_is_source: bool | None = None, readme_dir: Path | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 36, 85)>",
|
||||
"docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``."
|
||||
},
|
||||
"build_lib_nav": {
|
||||
"name": "build_lib_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.build_lib_nav",
|
||||
"signature": "build_lib_nav(nav_file: Path, docs_root: Path) -> tuple[list[dict[str, Any]], dict[str, str] | None]",
|
||||
"signature": "<bound method Function.signature of Function('build_lib_nav', 88, 121)>",
|
||||
"docstring": "Build the re-rooted navigation block for a lib site.\n\nThe navigation specification is resolved against the shared documentation\nroot and every resulting path is re-rooted relative to the ``lib``\nsubdirectory by stripping its leading ``lib/`` scope component.\n\nArgs:\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n docs_root (Path):\n Shared documentation root containing the ``lib`` sources.\n\nReturns:\n tuple[list[dict[str, Any]], dict[str, str] | None]:\n The re-rooted navigation block and the optional theme icon\n mapping from the specification.\n\nRaises:\n click.FileError:\n If the navigation specification cannot be found."
|
||||
},
|
||||
"build_wiki_nav_block": {
|
||||
"name": "build_wiki_nav_block",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.build_wiki_nav_block",
|
||||
"signature": "build_wiki_nav_block(wiki_dir: Path) -> list[dict[str, Any]]",
|
||||
"signature": "<bound method Function.signature of Function('build_wiki_nav_block', 124, 147)>",
|
||||
"docstring": "Build the re-rooted navigation block for a wiki site.\n\nThe wiki navigation derived from the wiki file structure is re-rooted\nrelative to the wiki directory itself by stripping the leading ``wiki/``\nscope component.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries relative to the wiki directory.\n\nRaises:\n click.FileError:\n If the wiki directory does not exist."
|
||||
},
|
||||
"load_spec_icon": {
|
||||
"name": "load_spec_icon",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.load_spec_icon",
|
||||
"signature": "load_spec_icon(nav_file: Path) -> dict[str, str] | None",
|
||||
"signature": "<bound method Function.signature of Function('load_spec_icon', 150, 169)>",
|
||||
"docstring": "Load the theme icon mapping from a navigation specification.\n\nArgs:\n nav_file (Path):\n Path to the navigation specification file.\n\nReturns:\n dict[str, str] | None:\n The icon mapping, or ``None`` when the specification file is\n absent or cannot be parsed."
|
||||
},
|
||||
"generate_site_config": {
|
||||
"name": "generate_site_config",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.generate_site_config",
|
||||
"signature": "generate_site_config(kind: str, kind_root: Path, nav_block: list[dict[str, Any]], out: Path, site_name: str, docs_dir: str, site_dir: str, template: Path | None = None, site_description: str | None = None, site_author: str | None = None, theme_icon: dict[str, str] | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_site_config', 201, 282)>",
|
||||
"docstring": "Generate a per-kind `mkdocs.{kind}.yml` configuration file.\n\nThe configuration is created by merging the shared ``mkdocs.common.yml``\ntemplate with the fragment contributed by the kind (``lib``, ``api``, or\n``wiki``). Both ``docs_dir`` and ``site_dir`` are written relative to the\nconfiguration file's directory: the kind's sources when expressed as a\nsibling path (for example ``lib``) and the per-kind site output (for\nexample ``../site/lib``).\n\nArgs:\n kind (str):\n Documentation kind, one of ``lib``, ``api``, or ``wiki``.\n\n kind_root (Path):\n Directory scoped to the kind (for example ``docs/lib``) that\n serves as the MkDocs ``docs_dir``.\n\n nav_block (list[dict[str, Any]]):\n Re-rooted navigation entries for the kind's site.\n\n out (Path):\n Destination path where the generated ``mkdocs.{kind}.yml`` file\n is written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n docs_dir (str):\n MkDocs ``docs_dir`` value, relative to the configuration\n file's directory.\n\n site_dir (str):\n MkDocs ``site_dir`` value, relative to the configuration\n file's directory.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template\n that replaces the built-in templates entirely.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n theme_icon (dict[str, str] | None):\n Optional mapping of theme icon entries injected as\n ``theme.icon``."
|
||||
},
|
||||
"build_configs": {
|
||||
"name": "build_configs",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.build_configs",
|
||||
"signature": "build_configs(yml_paths: Iterable[Path]) -> None",
|
||||
"signature": "<bound method Function.signature of Function('build_configs', 409, 430)>",
|
||||
"docstring": "Build the MkDocs documentation site for every given configuration.\n\nEach configuration file is loaded and built in turn, producing the\nper-kind static sites (``site/lib``, ``site/api``, ``site/wiki``).\n\nArgs:\n yml_paths (Iterable[Path]):\n Configuration files to build, in order.\n\nRaises:\n click.ClickException:\n If a configuration file does not exist."
|
||||
},
|
||||
"serve": {
|
||||
"name": "serve",
|
||||
"kind": "function",
|
||||
"path": "docforge.cli.mkdocs_utils.serve",
|
||||
"signature": "serve(mkdocs_yml: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('serve', 433, 453)>",
|
||||
"docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist."
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,76 +2,118 @@
|
||||
"module": "docforge.loaders.griffe_loader",
|
||||
"content": {
|
||||
"path": "docforge.loaders.griffe_loader",
|
||||
"docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n - Imported aliases that cannot be resolved (stdlib/third-party names) are\n skipped; aliases that resolve within the documented project are kept.\n\n---",
|
||||
"docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n\n---",
|
||||
"objects": {
|
||||
"logging": {
|
||||
"name": "logging",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.logging",
|
||||
"signature": "<bound method Alias.signature of Alias('logging', 'logging')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"AliasResolutionError": {
|
||||
"name": "AliasResolutionError",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.AliasResolutionError",
|
||||
"signature": "<bound method Alias.signature of Alias('AliasResolutionError', 'griffe.AliasResolutionError')>",
|
||||
"docstring": null
|
||||
},
|
||||
"LinesCollection": {
|
||||
"name": "LinesCollection",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.LinesCollection",
|
||||
"signature": "<bound method Alias.signature of Alias('LinesCollection', 'griffe.LinesCollection')>",
|
||||
"docstring": null
|
||||
},
|
||||
"ModulesCollection": {
|
||||
"name": "ModulesCollection",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.ModulesCollection",
|
||||
"signature": "<bound method Alias.signature of Alias('ModulesCollection', 'griffe.ModulesCollection')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Object": {
|
||||
"name": "Object",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.Object",
|
||||
"signature": "<bound method Alias.signature of Alias('Object', 'griffe.Object')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -80,49 +122,49 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -131,49 +173,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -189,28 +231,28 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None) -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('discover_module_paths', 37, 89)>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Class.signature of Class('GriffeLoader', 92, 315)>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None) -> Project",
|
||||
"signature": "<bound method Function.signature of Function('load_project', 117, 171)>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str) -> Module",
|
||||
"signature": "<bound method Function.signature of Function('load_module', 173, 206)>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Alias.signature of Alias('GriffeLoader', 'docforge.loaders.griffe_loader.GriffeLoader')>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_project', 'docforge.loaders.griffe_loader.GriffeLoader.load_project')>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_module', 'docforge.loaders.griffe_loader.GriffeLoader.load_module')>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('discover_module_paths', 'docforge.loaders.griffe_loader.discover_module_paths')>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"griffe_loader": {
|
||||
@@ -39,76 +39,118 @@
|
||||
"kind": "module",
|
||||
"path": "docforge.loaders.griffe_loader",
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n - Imported aliases that cannot be resolved (stdlib/third-party names) are\n skipped; aliases that resolve within the documented project are kept.\n\n---",
|
||||
"docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n\n---",
|
||||
"members": {
|
||||
"logging": {
|
||||
"name": "logging",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.logging",
|
||||
"signature": "<bound method Alias.signature of Alias('logging', 'logging')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"AliasResolutionError": {
|
||||
"name": "AliasResolutionError",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.AliasResolutionError",
|
||||
"signature": "<bound method Alias.signature of Alias('AliasResolutionError', 'griffe.AliasResolutionError')>",
|
||||
"docstring": null
|
||||
},
|
||||
"LinesCollection": {
|
||||
"name": "LinesCollection",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.LinesCollection",
|
||||
"signature": "<bound method Alias.signature of Alias('LinesCollection', 'griffe.LinesCollection')>",
|
||||
"docstring": null
|
||||
},
|
||||
"ModulesCollection": {
|
||||
"name": "ModulesCollection",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.ModulesCollection",
|
||||
"signature": "<bound method Alias.signature of Alias('ModulesCollection', 'griffe.ModulesCollection')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Object": {
|
||||
"name": "Object",
|
||||
"kind": "alias",
|
||||
"path": "docforge.loaders.griffe_loader.Object",
|
||||
"signature": "<bound method Alias.signature of Alias('Object', 'griffe.Object')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -117,49 +159,49 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -168,49 +210,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.loaders.griffe_loader.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -226,28 +268,28 @@
|
||||
"name": "discover_module_paths",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.discover_module_paths",
|
||||
"signature": "discover_module_paths(module_name: str, project_root: Path | None = None) -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('discover_module_paths', 37, 89)>",
|
||||
"docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist."
|
||||
},
|
||||
"GriffeLoader": {
|
||||
"name": "GriffeLoader",
|
||||
"kind": "class",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader",
|
||||
"signature": "GriffeLoader()",
|
||||
"signature": "<bound method Class.signature of Class('GriffeLoader', 92, 315)>",
|
||||
"docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.",
|
||||
"members": {
|
||||
"load_project": {
|
||||
"name": "load_project",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_project",
|
||||
"signature": "load_project(module_paths: list[str], project_name: str | None = None, skip_import_errors: bool | None = None) -> Project",
|
||||
"signature": "<bound method Function.signature of Function('load_project', 117, 171)>",
|
||||
"docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False."
|
||||
},
|
||||
"load_module": {
|
||||
"name": "load_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_module",
|
||||
"signature": "load_module(path: str) -> Module",
|
||||
"signature": "<bound method Function.signature of Function('load_module', 173, 206)>",
|
||||
"docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,49 +8,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.project.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -59,49 +59,49 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.module.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -110,70 +110,70 @@
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.object.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -185,74 +185,81 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.\n\n---\n\nNotes:\n - Only public members are stored; private names are filtered by the loader.\n\n---",
|
||||
"members": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.module.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.module.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.object.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -261,7 +268,7 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.module.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('Module', 24, 98)>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
@@ -289,21 +296,21 @@
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_object', 62, 70)>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.get_object",
|
||||
"signature": "get_object(name: str) -> DocObject",
|
||||
"signature": "<bound method Function.signature of Function('get_object', 72, 88)>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.get_all_objects",
|
||||
"signature": "get_all_objects() -> Iterable[DocObject]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_objects', 90, 98)>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -317,11 +324,18 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.\n\n---\n\nNotes:\n - `DocObject` instances form a tree mirroring the Python import hierarchy.\n - Objects are renderer-agnostic and may be consumed by any renderer.\n\n---",
|
||||
"members": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.object.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.object.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('DocObject', 23, 124)>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -370,21 +384,21 @@
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_member', 85, 96)>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.get_member",
|
||||
"signature": "get_member(name: str) -> DocObject",
|
||||
"signature": "<bound method Function.signature of Function('get_member', 98, 114)>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.get_all_members",
|
||||
"signature": "get_all_members() -> Iterable[DocObject]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_members', 116, 124)>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -398,53 +412,60 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.\n\n---\n\nNotes:\n - Modules are keyed by their dotted import path.\n - Objects are renderer-agnostic; the same model feeds every renderer.\n\n---",
|
||||
"members": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.project.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Module": {
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.project.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.module.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -453,7 +474,7 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.project.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Class.signature of Class('Project', 24, 104)>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -474,28 +495,28 @@
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.add_module",
|
||||
"signature": "add_module(module: Module) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_module', 58, 66)>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_module",
|
||||
"signature": "get_module(path: str) -> Module",
|
||||
"signature": "<bound method Function.signature of Function('get_module', 68, 84)>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_all_modules",
|
||||
"signature": "get_all_modules() -> Iterable[Module]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_modules', 86, 94)>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_module_list",
|
||||
"signature": "get_module_list() -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('get_module_list', 96, 104)>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,74 +4,81 @@
|
||||
"path": "docforge.models.module",
|
||||
"docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.\n\n---\n\nNotes:\n - Only public members are stored; private names are filtered by the loader.\n\n---",
|
||||
"objects": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.module.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.module.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.object.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.module.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -80,7 +87,7 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.module.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('Module', 24, 98)>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
@@ -108,21 +115,21 @@
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_object', 62, 70)>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.get_object",
|
||||
"signature": "get_object(name: str) -> DocObject",
|
||||
"signature": "<bound method Function.signature of Function('get_object', 72, 88)>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.module.Module.get_all_objects",
|
||||
"signature": "get_all_objects() -> Iterable[DocObject]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_objects', 90, 98)>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,18 @@
|
||||
"path": "docforge.models.object",
|
||||
"docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.\n\n---\n\nNotes:\n - `DocObject` instances form a tree mirroring the Python import hierarchy.\n - Objects are renderer-agnostic and may be consumed by any renderer.\n\n---",
|
||||
"objects": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.object.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.object.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('DocObject', 23, 124)>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -57,21 +64,21 @@
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_member', 85, 96)>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.get_member",
|
||||
"signature": "get_member(name: str) -> DocObject",
|
||||
"signature": "<bound method Function.signature of Function('get_member', 98, 114)>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.object.DocObject.get_all_members",
|
||||
"signature": "get_all_members() -> Iterable[DocObject]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_members', 116, 124)>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,53 +4,60 @@
|
||||
"path": "docforge.models.project",
|
||||
"docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.\n\n---\n\nNotes:\n - Modules are keyed by their dotted import path.\n - Objects are renderer-agnostic; the same model feeds every renderer.\n\n---",
|
||||
"objects": {
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.models.project.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Module": {
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.project.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.module.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.models.project.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -59,7 +66,7 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.models.project.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Class.signature of Class('Project', 24, 104)>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -80,28 +87,28 @@
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.add_module",
|
||||
"signature": "add_module(module: Module) -> None",
|
||||
"signature": "<bound method Function.signature of Function('add_module', 58, 66)>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_module",
|
||||
"signature": "get_module(path: str) -> Module",
|
||||
"signature": "<bound method Function.signature of Function('get_module', 68, 84)>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_all_modules",
|
||||
"signature": "get_all_modules() -> Iterable[Module]",
|
||||
"signature": "<bound method Function.signature of Function('get_all_modules', 86, 94)>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.models.project.Project.get_module_list",
|
||||
"signature": "get_module_list() -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('get_module_list', 96, 104)>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,42 +8,42 @@
|
||||
"name": "NavSpec",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.NavSpec",
|
||||
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('NavSpec', 'docforge.nav.spec.NavSpec')>",
|
||||
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.NavSpec.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.NavSpec.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"icon": {
|
||||
"name": "icon",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.NavSpec.icon",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
|
||||
"docstring": null
|
||||
},
|
||||
"load": {
|
||||
"name": "load",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.NavSpec.load",
|
||||
"signature": "load(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load', 'docforge.nav.spec.NavSpec.load')>",
|
||||
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
||||
},
|
||||
"all_patterns": {
|
||||
"name": "all_patterns",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.NavSpec.all_patterns",
|
||||
"signature": "all_patterns()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_patterns', 'docforge.nav.spec.NavSpec.all_patterns')>",
|
||||
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
||||
}
|
||||
}
|
||||
@@ -52,35 +52,35 @@
|
||||
"name": "load_nav_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.load_nav_spec",
|
||||
"signature": "load_nav_spec(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load_nav_spec', 'docforge.nav.spec.load_nav_spec')>",
|
||||
"docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid."
|
||||
},
|
||||
"ResolvedNav": {
|
||||
"name": "ResolvedNav",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.ResolvedNav",
|
||||
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('ResolvedNav', 'docforge.nav.resolver.ResolvedNav')>",
|
||||
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.ResolvedNav.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.ResolvedNav.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"all_files": {
|
||||
"name": "all_files",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.ResolvedNav.all_files",
|
||||
"signature": "all_files()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_files', 'docforge.nav.resolver.ResolvedNav.all_files')>",
|
||||
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
||||
}
|
||||
}
|
||||
@@ -89,21 +89,21 @@
|
||||
"name": "resolve_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolve_nav",
|
||||
"signature": "resolve_nav(spec: NavSpec, docs_root: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('resolve_nav', 'docforge.nav.resolver.resolve_nav')>",
|
||||
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
||||
},
|
||||
"MkDocsNavEmitter": {
|
||||
"name": "MkDocsNavEmitter",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.MkDocsNavEmitter",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsNavEmitter', 'docforge.nav.mkdocs.MkDocsNavEmitter')>",
|
||||
"docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.",
|
||||
"members": {
|
||||
"emit": {
|
||||
"name": "emit",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.MkDocsNavEmitter.emit",
|
||||
"signature": "emit(nav: ResolvedNav)",
|
||||
"signature": "<bound method Alias.signature of Alias('emit', 'docforge.nav.mkdocs.MkDocsNavEmitter.emit')>",
|
||||
"docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages."
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@
|
||||
"name": "build_wiki_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.build_wiki_nav",
|
||||
"signature": "build_wiki_nav(wiki_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('build_wiki_nav', 'docforge.nav.wiki.build_wiki_nav')>",
|
||||
"docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist."
|
||||
},
|
||||
"mkdocs": {
|
||||
@@ -122,32 +122,46 @@
|
||||
"signature": null,
|
||||
"docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.\n\n---\n\nNotes:\n - The emitted structure is a list of dictionaries, one per top-level nav\n entry, matching the MkDocs ``nav`` YAML format.\n\n---",
|
||||
"members": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.mkdocs.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.mkdocs.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"ResolvedNav": {
|
||||
"name": "ResolvedNav",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav",
|
||||
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('ResolvedNav', 'docforge.nav.resolver.ResolvedNav')>",
|
||||
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"all_files": {
|
||||
"name": "all_files",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.all_files",
|
||||
"signature": "all_files()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_files', 'docforge.nav.resolver.ResolvedNav.all_files')>",
|
||||
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
||||
}
|
||||
}
|
||||
@@ -156,14 +170,14 @@
|
||||
"name": "MkDocsNavEmitter",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.mkdocs.MkDocsNavEmitter",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MkDocsNavEmitter', 23, 94)>",
|
||||
"docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.",
|
||||
"members": {
|
||||
"emit": {
|
||||
"name": "emit",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit",
|
||||
"signature": "emit(nav: ResolvedNav) -> list[dict[str, Any]]",
|
||||
"signature": "<bound method Function.signature of Function('emit', 31, 61)>",
|
||||
"docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages."
|
||||
}
|
||||
}
|
||||
@@ -177,46 +191,67 @@
|
||||
"signature": null,
|
||||
"docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---",
|
||||
"members": {
|
||||
"glob": {
|
||||
"name": "glob",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.glob",
|
||||
"signature": "<bound method Alias.signature of Alias('glob', 'glob')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"NavSpec": {
|
||||
"name": "NavSpec",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.resolver.NavSpec",
|
||||
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('NavSpec', 'docforge.nav.spec.NavSpec')>",
|
||||
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"icon": {
|
||||
"name": "icon",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.icon",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
|
||||
"docstring": null
|
||||
},
|
||||
"load": {
|
||||
"name": "load",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.NavSpec.load",
|
||||
"signature": "load(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load', 'docforge.nav.spec.NavSpec.load')>",
|
||||
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
||||
},
|
||||
"all_patterns": {
|
||||
"name": "all_patterns",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.NavSpec.all_patterns",
|
||||
"signature": "all_patterns()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_patterns', 'docforge.nav.spec.NavSpec.all_patterns')>",
|
||||
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
||||
}
|
||||
}
|
||||
@@ -225,7 +260,7 @@
|
||||
"name": "ResolvedNav",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.resolver.ResolvedNav",
|
||||
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('ResolvedNav', 23, 76)>",
|
||||
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
||||
"members": {
|
||||
"home": {
|
||||
@@ -246,7 +281,7 @@
|
||||
"name": "all_files",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.ResolvedNav.all_files",
|
||||
"signature": "all_files() -> Iterable[Path]",
|
||||
"signature": "<bound method Function.signature of Function('all_files', 57, 76)>",
|
||||
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
||||
}
|
||||
}
|
||||
@@ -255,7 +290,7 @@
|
||||
"name": "resolve_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.resolve_nav",
|
||||
"signature": "resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav",
|
||||
"signature": "<bound method Function.signature of Function('resolve_nav', 79, 150)>",
|
||||
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
||||
}
|
||||
}
|
||||
@@ -267,11 +302,32 @@
|
||||
"signature": null,
|
||||
"docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).\n\n---\n\nNotes:\n - The spec file supports an optional ``icon`` mapping for MkDocs theme\n customization.\n - All file references in ``groups`` are relative to the documentation root.\n\n---",
|
||||
"members": {
|
||||
"annotations": {
|
||||
"name": "annotations",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.annotations",
|
||||
"signature": "<bound method Alias.signature of Alias('annotations', '__future__.annotations')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"yaml": {
|
||||
"name": "yaml",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.yaml",
|
||||
"signature": "<bound method Alias.signature of Alias('yaml', 'yaml')>",
|
||||
"docstring": null
|
||||
},
|
||||
"NavSpec": {
|
||||
"name": "NavSpec",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.spec.NavSpec",
|
||||
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('NavSpec', 25, 136)>",
|
||||
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
||||
"members": {
|
||||
"home": {
|
||||
@@ -299,14 +355,14 @@
|
||||
"name": "load",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.NavSpec.load",
|
||||
"signature": "load(path: Path) -> NavSpec",
|
||||
"signature": "<bound method Function.signature of Function('load', 65, 117)>",
|
||||
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
||||
},
|
||||
"all_patterns": {
|
||||
"name": "all_patterns",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.NavSpec.all_patterns",
|
||||
"signature": "all_patterns() -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('all_patterns', 119, 136)>",
|
||||
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
||||
}
|
||||
}
|
||||
@@ -315,7 +371,7 @@
|
||||
"name": "load_nav_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.load_nav_spec",
|
||||
"signature": "load_nav_spec(path: Path) -> NavSpec",
|
||||
"signature": "<bound method Function.signature of Function('load_nav_spec', 139, 170)>",
|
||||
"docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid."
|
||||
}
|
||||
}
|
||||
@@ -327,11 +383,39 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nWiki navigation derivation.\n\nThis module provides ``build_wiki_nav``, which derives an MkDocs-ready\nnavigation block from the file structure of a hand-written wiki directory\n(typically ``docs/wiki``). wiki content is authored by hand and is never\nmodified by doc-forge; only the navigation layout is inferred.\n\n# Notes\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.",
|
||||
"members": {
|
||||
"re": {
|
||||
"name": "re",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.re",
|
||||
"signature": "<bound method Alias.signature of Alias('re', 're')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Callable": {
|
||||
"name": "Callable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Callable",
|
||||
"signature": "<bound method Alias.signature of Alias('Callable', 'collections.abc.Callable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"build_wiki_nav": {
|
||||
"name": "build_wiki_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.wiki.build_wiki_nav",
|
||||
"signature": "build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]",
|
||||
"signature": "<bound method Function.signature of Function('build_wiki_nav', 28, 76)>",
|
||||
"docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,32 +4,46 @@
|
||||
"path": "docforge.nav.mkdocs",
|
||||
"docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.\n\n---\n\nNotes:\n - The emitted structure is a list of dictionaries, one per top-level nav\n entry, matching the MkDocs ``nav`` YAML format.\n\n---",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.mkdocs.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.mkdocs.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"ResolvedNav": {
|
||||
"name": "ResolvedNav",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav",
|
||||
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('ResolvedNav', 'docforge.nav.resolver.ResolvedNav')>",
|
||||
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"all_files": {
|
||||
"name": "all_files",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.mkdocs.ResolvedNav.all_files",
|
||||
"signature": "all_files()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_files', 'docforge.nav.resolver.ResolvedNav.all_files')>",
|
||||
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
||||
}
|
||||
}
|
||||
@@ -38,14 +52,14 @@
|
||||
"name": "MkDocsNavEmitter",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.mkdocs.MkDocsNavEmitter",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MkDocsNavEmitter', 23, 94)>",
|
||||
"docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.",
|
||||
"members": {
|
||||
"emit": {
|
||||
"name": "emit",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit",
|
||||
"signature": "emit(nav: ResolvedNav) -> list[dict[str, Any]]",
|
||||
"signature": "<bound method Function.signature of Function('emit', 31, 61)>",
|
||||
"docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,46 +4,67 @@
|
||||
"path": "docforge.nav.resolver",
|
||||
"docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---",
|
||||
"objects": {
|
||||
"glob": {
|
||||
"name": "glob",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.glob",
|
||||
"signature": "<bound method Alias.signature of Alias('glob', 'glob')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Iterable": {
|
||||
"name": "Iterable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.Iterable",
|
||||
"signature": "<bound method Alias.signature of Alias('Iterable', 'collections.abc.Iterable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.resolver.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"NavSpec": {
|
||||
"name": "NavSpec",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.resolver.NavSpec",
|
||||
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('NavSpec', 'docforge.nav.spec.NavSpec')>",
|
||||
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
||||
"members": {
|
||||
"home": {
|
||||
"name": "home",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.home",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
|
||||
"docstring": null
|
||||
},
|
||||
"groups": {
|
||||
"name": "groups",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.groups",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
|
||||
"docstring": null
|
||||
},
|
||||
"icon": {
|
||||
"name": "icon",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.nav.resolver.NavSpec.icon",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
|
||||
"docstring": null
|
||||
},
|
||||
"load": {
|
||||
"name": "load",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.NavSpec.load",
|
||||
"signature": "load(path: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('load', 'docforge.nav.spec.NavSpec.load')>",
|
||||
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
||||
},
|
||||
"all_patterns": {
|
||||
"name": "all_patterns",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.NavSpec.all_patterns",
|
||||
"signature": "all_patterns()",
|
||||
"signature": "<bound method Alias.signature of Alias('all_patterns', 'docforge.nav.spec.NavSpec.all_patterns')>",
|
||||
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
||||
}
|
||||
}
|
||||
@@ -52,7 +73,7 @@
|
||||
"name": "ResolvedNav",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.resolver.ResolvedNav",
|
||||
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('ResolvedNav', 23, 76)>",
|
||||
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
||||
"members": {
|
||||
"home": {
|
||||
@@ -73,7 +94,7 @@
|
||||
"name": "all_files",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.ResolvedNav.all_files",
|
||||
"signature": "all_files() -> Iterable[Path]",
|
||||
"signature": "<bound method Function.signature of Function('all_files', 57, 76)>",
|
||||
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
||||
}
|
||||
}
|
||||
@@ -82,7 +103,7 @@
|
||||
"name": "resolve_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.resolver.resolve_nav",
|
||||
"signature": "resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav",
|
||||
"signature": "<bound method Function.signature of Function('resolve_nav', 79, 150)>",
|
||||
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,32 @@
|
||||
"path": "docforge.nav.spec",
|
||||
"docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).\n\n---\n\nNotes:\n - The spec file supports an optional ``icon`` mapping for MkDocs theme\n customization.\n - All file references in ``groups`` are relative to the documentation root.\n\n---",
|
||||
"objects": {
|
||||
"annotations": {
|
||||
"name": "annotations",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.annotations",
|
||||
"signature": "<bound method Alias.signature of Alias('annotations', '__future__.annotations')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"yaml": {
|
||||
"name": "yaml",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.spec.yaml",
|
||||
"signature": "<bound method Alias.signature of Alias('yaml', 'yaml')>",
|
||||
"docstring": null
|
||||
},
|
||||
"NavSpec": {
|
||||
"name": "NavSpec",
|
||||
"kind": "class",
|
||||
"path": "docforge.nav.spec.NavSpec",
|
||||
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
||||
"signature": "<bound method Class.signature of Class('NavSpec', 25, 136)>",
|
||||
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
||||
"members": {
|
||||
"home": {
|
||||
@@ -36,14 +57,14 @@
|
||||
"name": "load",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.NavSpec.load",
|
||||
"signature": "load(path: Path) -> NavSpec",
|
||||
"signature": "<bound method Function.signature of Function('load', 65, 117)>",
|
||||
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
||||
},
|
||||
"all_patterns": {
|
||||
"name": "all_patterns",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.NavSpec.all_patterns",
|
||||
"signature": "all_patterns() -> list[str]",
|
||||
"signature": "<bound method Function.signature of Function('all_patterns', 119, 136)>",
|
||||
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
||||
}
|
||||
}
|
||||
@@ -52,7 +73,7 @@
|
||||
"name": "load_nav_spec",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.spec.load_nav_spec",
|
||||
"signature": "load_nav_spec(path: Path) -> NavSpec",
|
||||
"signature": "<bound method Function.signature of Function('load_nav_spec', 139, 170)>",
|
||||
"docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,39 @@
|
||||
"path": "docforge.nav.wiki",
|
||||
"docstring": "# Summary\n\nWiki navigation derivation.\n\nThis module provides ``build_wiki_nav``, which derives an MkDocs-ready\nnavigation block from the file structure of a hand-written wiki directory\n(typically ``docs/wiki``). wiki content is authored by hand and is never\nmodified by doc-forge; only the navigation layout is inferred.\n\n# Notes\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.",
|
||||
"objects": {
|
||||
"re": {
|
||||
"name": "re",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.re",
|
||||
"signature": "<bound method Alias.signature of Alias('re', 're')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Callable": {
|
||||
"name": "Callable",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Callable",
|
||||
"signature": "<bound method Alias.signature of Alias('Callable', 'collections.abc.Callable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.nav.wiki.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"build_wiki_nav": {
|
||||
"name": "build_wiki_nav",
|
||||
"kind": "function",
|
||||
"path": "docforge.nav.wiki.build_wiki_nav",
|
||||
"signature": "build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]",
|
||||
"signature": "<bound method Function.signature of Function('build_wiki_nav', 28, 76)>",
|
||||
"docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,53 +4,67 @@
|
||||
"path": "docforge.renderers.base",
|
||||
"docstring": "# Summary\n\nRenderer base interfaces and configuration models.\n\nThis module defines the base protocol and configuration container used by\ndoc-forge renderers. Concrete renderer implementations should implement the\n`DocRenderer` protocol.",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.base.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Protocol": {
|
||||
"name": "Protocol",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.base.Protocol",
|
||||
"signature": "<bound method Alias.signature of Alias('Protocol', 'typing.Protocol')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Project": {
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.base.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.base.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -59,7 +73,7 @@
|
||||
"name": "RendererConfig",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.RendererConfig",
|
||||
"signature": "RendererConfig(out_dir: Path, project: Project)",
|
||||
"signature": "<bound method Class.signature of Class('RendererConfig', 17, 44)>",
|
||||
"docstring": "Configuration container for documentation renderers.\n\nA `RendererConfig` instance groups together the project model and the\noutput directory used during rendering.\n\nAttributes:\n out_dir (Path):\n Directory where generated documentation files will be written.\n\n project (Project):\n Documentation project model to be rendered.",
|
||||
"members": {
|
||||
"out_dir": {
|
||||
@@ -82,7 +96,7 @@
|
||||
"name": "DocRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.DocRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('DocRenderer', 47, 72)>",
|
||||
"docstring": "Protocol defining the interface for documentation renderers.\n\nImplementations of this protocol are responsible for transforming a\n`Project` model into renderer-specific documentation sources.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -96,7 +110,7 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.DocRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 57, 72)>",
|
||||
"docstring": "Generate renderer-specific documentation sources.\n\nArgs:\n project (Project):\n Project model containing modules and documentation objects.\n\n out_dir (Path):\n Directory where generated documentation sources should be written."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,28 +8,28 @@
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.MkDocsRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MkDocsRenderer', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer')>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.MkDocsRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.MkDocsRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path, module_is_source: bool | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources')>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.MkDocsRenderer.generate_readme",
|
||||
"signature": "generate_readme(project: Project, docs_dir: Path, module_is_source: bool | None = None, readme_dir: Path | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_readme', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme')>",
|
||||
"docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`."
|
||||
}
|
||||
}
|
||||
@@ -38,21 +38,21 @@
|
||||
"name": "MCPRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.MCPRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('MCPRenderer', 'docforge.renderers.mcp_renderer.MCPRenderer')>",
|
||||
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.MCPRenderer.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mcp_renderer.MCPRenderer.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"generate_sources": {
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.MCPRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path)",
|
||||
"signature": "<bound method Alias.signature of Alias('generate_sources', 'docforge.renderers.mcp_renderer.MCPRenderer.generate_sources')>",
|
||||
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as `nav.json` and `index.json`.\n\nArgs:\n project (Project):\n Documentation project model to render.\n\n out_dir (Path):\n Directory where MCP resources will be written."
|
||||
}
|
||||
}
|
||||
@@ -64,53 +64,67 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nRenderer base interfaces and configuration models.\n\nThis module defines the base protocol and configuration container used by\ndoc-forge renderers. Concrete renderer implementations should implement the\n`DocRenderer` protocol.",
|
||||
"members": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.base.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Protocol": {
|
||||
"name": "Protocol",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.base.Protocol",
|
||||
"signature": "<bound method Alias.signature of Alias('Protocol', 'typing.Protocol')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Project": {
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.base.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.base.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -119,7 +133,7 @@
|
||||
"name": "RendererConfig",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.RendererConfig",
|
||||
"signature": "RendererConfig(out_dir: Path, project: Project)",
|
||||
"signature": "<bound method Class.signature of Class('RendererConfig', 17, 44)>",
|
||||
"docstring": "Configuration container for documentation renderers.\n\nA `RendererConfig` instance groups together the project model and the\noutput directory used during rendering.\n\nAttributes:\n out_dir (Path):\n Directory where generated documentation files will be written.\n\n project (Project):\n Documentation project model to be rendered.",
|
||||
"members": {
|
||||
"out_dir": {
|
||||
@@ -142,7 +156,7 @@
|
||||
"name": "DocRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.base.DocRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('DocRenderer', 47, 72)>",
|
||||
"docstring": "Protocol defining the interface for documentation renderers.\n\nImplementations of this protocol are responsible for transforming a\n`Project` model into renderer-specific documentation sources.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -156,7 +170,7 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.base.DocRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 57, 72)>",
|
||||
"docstring": "Generate renderer-specific documentation sources.\n\nArgs:\n project (Project):\n Project model containing modules and documentation objects.\n\n out_dir (Path):\n Directory where generated documentation sources should be written."
|
||||
}
|
||||
}
|
||||
@@ -170,74 +184,88 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nMCP renderer implementation.\n\nThis module defines the `MCPRenderer` class, which generates documentation\nresources compatible with the Model Context Protocol (MCP).",
|
||||
"members": {
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -246,49 +274,49 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -297,49 +325,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -348,7 +376,7 @@
|
||||
"name": "MCPRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.MCPRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MCPRenderer', 16, 159)>",
|
||||
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -362,10 +390,17 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 27, 73)>",
|
||||
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as `nav.json` and `index.json`.\n\nArgs:\n project (Project):\n Documentation project model to render.\n\n out_dir (Path):\n Directory where MCP resources will be written."
|
||||
}
|
||||
}
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -376,53 +411,60 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nMkDocs renderer implementation.\n\nThis module defines the `MkDocsRenderer` class, which generates Markdown\ndocumentation sources compatible with MkDocs Material and the mkdocstrings\nplugin.\n\nThe renderer ensures a consistent documentation structure by:\n\n- Creating a root `index.md` if one does not exist\n- Generating package index pages automatically\n- Linking child modules within parent package pages\n- Optionally generating `README.md` from the root package docstring",
|
||||
"members": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Module": {
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -431,49 +473,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -482,7 +524,7 @@
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MkDocsRenderer', 23, 306)>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -496,14 +538,14 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path, module_is_source: bool | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 37, 78)>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme",
|
||||
"signature": "generate_readme(project: Project, docs_dir: Path, module_is_source: bool | None = None, readme_dir: Path | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_readme', 80, 144)>",
|
||||
"docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,74 +4,88 @@
|
||||
"path": "docforge.renderers.mcp_renderer",
|
||||
"docstring": "# Summary\n\nMCP renderer implementation.\n\nThis module defines the `MCPRenderer` class, which generates documentation\nresources compatible with the Model Context Protocol (MCP).",
|
||||
"objects": {
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"DocObject": {
|
||||
"name": "DocObject",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject",
|
||||
"signature": "DocObject(name: str, kind: str, path: str, signature: str | None = None, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('DocObject', 'docforge.models.DocObject')>",
|
||||
"docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.kind",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
|
||||
"docstring": null
|
||||
},
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"signature": {
|
||||
"name": "signature",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.signature",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_member": {
|
||||
"name": "add_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.add_member",
|
||||
"signature": "add_member(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_member', 'docforge.models.object.DocObject.add_member')>",
|
||||
"docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member."
|
||||
},
|
||||
"get_member": {
|
||||
"name": "get_member",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.get_member",
|
||||
"signature": "get_member(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_member', 'docforge.models.object.DocObject.get_member')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist."
|
||||
},
|
||||
"get_all_members": {
|
||||
"name": "get_all_members",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.DocObject.get_all_members",
|
||||
"signature": "get_all_members()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_members', 'docforge.models.object.DocObject.get_all_members')>",
|
||||
"docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
|
||||
}
|
||||
}
|
||||
@@ -80,49 +94,49 @@
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -131,49 +145,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -182,7 +196,7 @@
|
||||
"name": "MCPRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mcp_renderer.MCPRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MCPRenderer', 16, 159)>",
|
||||
"docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -196,10 +210,17 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 27, 73)>",
|
||||
"docstring": "Generate MCP documentation resources for a project.\n\nThe renderer serializes each module into a JSON resource and produces\nsupporting metadata files such as `nav.json` and `index.json`.\n\nArgs:\n project (Project):\n Documentation project model to render.\n\n out_dir (Path):\n Directory where MCP resources will be written."
|
||||
}
|
||||
}
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mcp_renderer.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,53 +4,60 @@
|
||||
"path": "docforge.renderers.mkdocs_renderer",
|
||||
"docstring": "# Summary\n\nMkDocs renderer implementation.\n\nThis module defines the `MkDocsRenderer` class, which generates Markdown\ndocumentation sources compatible with MkDocs Material and the mkdocstrings\nplugin.\n\nThe renderer ensures a consistent documentation structure by:\n\n- Creating a root `index.md` if one does not exist\n- Generating package index pages automatically\n- Linking child modules within parent package pages\n- Optionally generating `README.md` from the root package docstring",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Module": {
|
||||
"name": "Module",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module",
|
||||
"signature": "Module(path: str, docstring: str | None = None)",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.path",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"docstring": {
|
||||
"name": "docstring",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.docstring",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
||||
"docstring": null
|
||||
},
|
||||
"members": {
|
||||
"name": "members",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.members",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_object": {
|
||||
"name": "add_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.add_object",
|
||||
"signature": "add_object(obj: DocObject)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_object",
|
||||
"signature": "get_object(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects",
|
||||
"signature": "get_all_objects()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
||||
}
|
||||
}
|
||||
@@ -59,49 +66,49 @@
|
||||
"name": "Project",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project",
|
||||
"signature": "Project(name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.name",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
||||
"docstring": null
|
||||
},
|
||||
"modules": {
|
||||
"name": "modules",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.modules",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
||||
"docstring": null
|
||||
},
|
||||
"add_module": {
|
||||
"name": "add_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.add_module",
|
||||
"signature": "add_module(module: Module)",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
||||
},
|
||||
"get_module": {
|
||||
"name": "get_module",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_module",
|
||||
"signature": "get_module(path: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
||||
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
||||
},
|
||||
"get_all_modules": {
|
||||
"name": "get_all_modules",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules",
|
||||
"signature": "get_all_modules()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
||||
},
|
||||
"get_module_list": {
|
||||
"name": "get_module_list",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.get_module_list",
|
||||
"signature": "get_module_list()",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
@@ -110,7 +117,7 @@
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer",
|
||||
"signature": null,
|
||||
"signature": "<bound method Class.signature of Class('MkDocsRenderer', 23, 306)>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
@@ -124,14 +131,14 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources",
|
||||
"signature": "generate_sources(project: Project, out_dir: Path, module_is_source: bool | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 37, 78)>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme",
|
||||
"signature": "generate_readme(project: Project, docs_dir: Path, module_is_source: bool | None = None, readme_dir: Path | None = None) -> None",
|
||||
"signature": "<bound method Function.signature of Function('generate_readme', 80, 144)>",
|
||||
"docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,28 +8,28 @@
|
||||
"name": "MCPServer",
|
||||
"kind": "class",
|
||||
"path": "docforge.servers.MCPServer",
|
||||
"signature": "MCPServer(mcp_root: Path, name: str)",
|
||||
"signature": "<bound method Alias.signature of Alias('MCPServer', 'docforge.servers.mcp_server.MCPServer')>",
|
||||
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.",
|
||||
"members": {
|
||||
"mcp_root": {
|
||||
"name": "mcp_root",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.servers.MCPServer.mcp_root",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('mcp_root', 'docforge.servers.mcp_server.MCPServer.mcp_root')>",
|
||||
"docstring": null
|
||||
},
|
||||
"app": {
|
||||
"name": "app",
|
||||
"kind": "attribute",
|
||||
"path": "docforge.servers.MCPServer.app",
|
||||
"signature": null,
|
||||
"signature": "<bound method Alias.signature of Alias('app', 'docforge.servers.mcp_server.MCPServer.app')>",
|
||||
"docstring": null
|
||||
},
|
||||
"run": {
|
||||
"name": "run",
|
||||
"kind": "function",
|
||||
"path": "docforge.servers.MCPServer.run",
|
||||
"signature": "run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http')",
|
||||
"signature": "<bound method Alias.signature of Alias('run', 'docforge.servers.mcp_server.MCPServer.run')>",
|
||||
"docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`."
|
||||
}
|
||||
}
|
||||
@@ -41,11 +41,53 @@
|
||||
"signature": null,
|
||||
"docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).\n\n---\n\nNotes:\n - The served bundle is generated offline by `MCPRenderer`.\n - Missing resources are reported as structured error dictionaries rather\n than raising exceptions.\n - The server exposes read-only resources and a single health-check tool.\n\n---",
|
||||
"members": {
|
||||
"annotations": {
|
||||
"name": "annotations",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.annotations",
|
||||
"signature": "<bound method Alias.signature of Alias('annotations', '__future__.annotations')>",
|
||||
"docstring": null
|
||||
},
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Literal": {
|
||||
"name": "Literal",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Literal",
|
||||
"signature": "<bound method Alias.signature of Alias('Literal', 'typing.Literal')>",
|
||||
"docstring": null
|
||||
},
|
||||
"FastMCP": {
|
||||
"name": "FastMCP",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.FastMCP",
|
||||
"signature": "<bound method Alias.signature of Alias('FastMCP', 'mcp.server.fastmcp.FastMCP')>",
|
||||
"docstring": null
|
||||
},
|
||||
"MCPServer": {
|
||||
"name": "MCPServer",
|
||||
"kind": "class",
|
||||
"path": "docforge.servers.mcp_server.MCPServer",
|
||||
"signature": "MCPServer(mcp_root: Path, name: str)",
|
||||
"signature": "<bound method Class.signature of Class('MCPServer', 29, 152)>",
|
||||
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.",
|
||||
"members": {
|
||||
"mcp_root": {
|
||||
@@ -66,7 +108,7 @@
|
||||
"name": "run",
|
||||
"kind": "function",
|
||||
"path": "docforge.servers.mcp_server.MCPServer.run",
|
||||
"signature": "run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http') -> None",
|
||||
"signature": "<bound method Function.signature of Function('run', 140, 152)>",
|
||||
"docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,53 @@
|
||||
"path": "docforge.servers.mcp_server",
|
||||
"docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).\n\n---\n\nNotes:\n - The served bundle is generated offline by `MCPRenderer`.\n - Missing resources are reported as structured error dictionaries rather\n than raising exceptions.\n - The server exposes read-only resources and a single health-check tool.\n\n---",
|
||||
"objects": {
|
||||
"annotations": {
|
||||
"name": "annotations",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.annotations",
|
||||
"signature": "<bound method Alias.signature of Alias('annotations', '__future__.annotations')>",
|
||||
"docstring": null
|
||||
},
|
||||
"json": {
|
||||
"name": "json",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.json",
|
||||
"signature": "<bound method Alias.signature of Alias('json', 'json')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Path",
|
||||
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Literal": {
|
||||
"name": "Literal",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.Literal",
|
||||
"signature": "<bound method Alias.signature of Alias('Literal', 'typing.Literal')>",
|
||||
"docstring": null
|
||||
},
|
||||
"FastMCP": {
|
||||
"name": "FastMCP",
|
||||
"kind": "alias",
|
||||
"path": "docforge.servers.mcp_server.FastMCP",
|
||||
"signature": "<bound method Alias.signature of Alias('FastMCP', 'mcp.server.fastmcp.FastMCP')>",
|
||||
"docstring": null
|
||||
},
|
||||
"MCPServer": {
|
||||
"name": "MCPServer",
|
||||
"kind": "class",
|
||||
"path": "docforge.servers.mcp_server.MCPServer",
|
||||
"signature": "MCPServer(mcp_root: Path, name: str)",
|
||||
"signature": "<bound method Class.signature of Class('MCPServer', 29, 152)>",
|
||||
"docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.",
|
||||
"members": {
|
||||
"mcp_root": {
|
||||
@@ -29,7 +71,7 @@
|
||||
"name": "run",
|
||||
"kind": "function",
|
||||
"path": "docforge.servers.mcp_server.MCPServer.run",
|
||||
"signature": "run(transport: Literal['stdio', 'sse', 'streamable-http'] = 'streamable-http') -> None",
|
||||
"signature": "<bound method Function.signature of Function('run', 140, 152)>",
|
||||
"docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,19 +56,18 @@ extra_css:
|
||||
- https://unpkg.com/dracula-prism/dist/css/dracula-prism.css
|
||||
plugins:
|
||||
- search
|
||||
- docforge-linkfix
|
||||
site_name: doc-forge
|
||||
docs_dir: wiki
|
||||
site_dir: ../site/wiki
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Overview: 01_overview.md
|
||||
- Components: 02_components.md
|
||||
- Architecture: 02_architecture.md
|
||||
- Conventions: 03_conventions.md
|
||||
- Iterative Workflow: 04_iterative_workflow.md
|
||||
- Development:
|
||||
- Environment: 05_development/01_environment.md
|
||||
- Quality Gates: 05_development/02_quality_gates.md
|
||||
- GSDFC Guide: 05_development/03_gsdfc_guide.md
|
||||
- MCP Guide: 05_development/04_mcp_guide.md
|
||||
- MkDocs Configs: 05_development/05_mkdocs_configs.md
|
||||
- Gsdfc Guide: 05_development/03_gsdfc_guide.md
|
||||
- Mcp Guide: 05_development/04_mcp_guide.md
|
||||
- Mkdocs Configs: 05_development/05_mkdocs_configs.md
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# Library Overview
|
||||
# Overview
|
||||
|
||||
`docforge` turns GSDFC-compliant Python docstrings into maintainable reference
|
||||
documentation. It never edits source docstrings; it reads them, renders them,
|
||||
and assembles documentation sites from all available material.
|
||||
|
||||
---
|
||||
|
||||
## 🧭 Which Build Should You Use?
|
||||
## What it generates
|
||||
|
||||
| Kind | Source | Output |
|
||||
|-----------|----------------------------|---------------------------------|
|
||||
@@ -15,9 +13,7 @@ and assembles documentation sites from all available material.
|
||||
| `wiki` | Hand-written markdown | `docs/wiki/**` (unchanged) |
|
||||
| `mcp` | GSDFC docstrings + renderers | `docs/mcp/**` structured JSON |
|
||||
|
||||
---
|
||||
|
||||
## 🏗️ Architecture
|
||||
## Per-kind MkDocs builds
|
||||
|
||||
Each enabled site kind produces its own MkDocs configuration and build:
|
||||
|
||||
@@ -29,15 +25,8 @@ Every site is self-contained (own theme assets and search index) with
|
||||
navigation derived or scoped to that kind. Hand-written wiki content is never
|
||||
overwritten or regenerated — only its navigation is derived automatically.
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Lifecycle Rules
|
||||
## MCP bundle
|
||||
|
||||
`docs/mcp/**` is a self-contained, machine-readable reference generated from
|
||||
docforge's own GSDFC docstrings. `doc-forge serve --mcp --module docforge`
|
||||
serves it over MCP. See the [MCP Guide](05_development/04_mcp_guide.md).
|
||||
|
||||
---
|
||||
|
||||
## ➡️ Read Next
|
||||
- [02 – Components](02_components.md) · [03 – Conventions](03_conventions.md)
|
||||
serves it over MCP. See the [MCP Guide](05_development/04_mcp_guide.md).
|
||||
@@ -1,45 +1,35 @@
|
||||
# Components
|
||||
# Architecture
|
||||
|
||||
`docforge` is split into four horizontal layers. Everything flows top to
|
||||
bottom through the CLI.
|
||||
|
||||
---
|
||||
|
||||
## 1. Loaders & Models
|
||||
## Loaders → Models
|
||||
|
||||
The `docforge/loaders` package wraps `griffe` to extract modules, functions,
|
||||
classes, and Google-style docstring sections. Loaded data is normalized into
|
||||
the object model under `docforge/models` (`Project`, `Module`, `DocObject`).
|
||||
|
||||
---
|
||||
|
||||
## 2. Navigation
|
||||
## Navigation
|
||||
|
||||
`docforge/nav` parses `docforge.nav.yml` specs (`NavSpec`, `Resolver`, and the
|
||||
MkDocs nav emitter) and, since the wiki kind, derives wiki navigation from the
|
||||
file structure via `build_wiki_nav`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Renderers
|
||||
## Renderers
|
||||
|
||||
`docforge/renderers` turn model data into artifacts:
|
||||
|
||||
- `MkDocsRenderer` → `docs/lib/**` reference markdown
|
||||
- `MCPRenderer` → `docs/mcp/**` structured documentation
|
||||
|
||||
---
|
||||
|
||||
## 4. Servers
|
||||
## Servers
|
||||
|
||||
`docforge/servers` serves generated artifacts over live protocols:
|
||||
|
||||
- `MCPServer` → serves a pre-generated `docs/mcp/**` bundle through MCP
|
||||
resources (`docs://index`, `docs://nav`, `docs://modules/{module}`)
|
||||
|
||||
---
|
||||
|
||||
## 5. CLI
|
||||
## CLI
|
||||
|
||||
`docforge/cli` wires it all together:
|
||||
|
||||
@@ -47,9 +37,4 @@ file structure via `build_wiki_nav`.
|
||||
/ `--mcp` modes
|
||||
- `mkdocs_utils.py` — per-kind config generation (`docs/mkdocs.{lib,api,wiki}.yml`)
|
||||
with navigation re-rooted to each kind's `docs_dir`
|
||||
- `api_utils.py` — OpenAPI loading and API docs generation
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [01 – Overview](01_overview.md) · [03 – Conventions](03_conventions.md)
|
||||
- `api_utils.py` — OpenAPI loading and API docs generation
|
||||
@@ -1,7 +1,5 @@
|
||||
# Conventions
|
||||
|
||||
---
|
||||
|
||||
## GSDFC docstrings
|
||||
|
||||
All documented source uses the Google-Styled Doc-Forge Convention (GSDFC):
|
||||
@@ -14,45 +12,31 @@ package docstring, which is exported verbatim into
|
||||
|
||||
Key rules:
|
||||
|
||||
1. Use parenthesized types in prose entries (`name (Type):`) that match the
|
||||
signature types.
|
||||
2. Use `# Summary`, `# Examples`, and `# Notes` sections at module level.
|
||||
3. Use `Args:`, `Returns:`, `Raises:`, `Yields:`, `Notes:`, and `Example:`
|
||||
sections at function and method level.
|
||||
4. Always update the matching `.pyi` stub alongside the `.py` implementation.
|
||||
5. Every distributable package ships a `py.typed` marker so type checkers
|
||||
consume the authored signatures instead of `Any`.
|
||||
- Use parenthesized types in prose entries (`name (Type):`) that match the
|
||||
signature types.
|
||||
- Use `# Summary`, `# Examples`, and `# Notes` sections at module level.
|
||||
- Use `Args:`, `Returns:`, `Raises:`, `Yields:`, `Notes:`, and `Example:`
|
||||
sections at function and method level.
|
||||
- Always update the matching `.pyi` stub alongside the `.py` implementation.
|
||||
|
||||
---
|
||||
|
||||
## `.pyi` stubs and `py.typed`
|
||||
## `.pyi` stubs
|
||||
|
||||
Every module ships a matching `.pyi` stub kept in sync with the `.py`
|
||||
implementation. When signatures change, update both files. Packages expose a
|
||||
`py.typed` marker so consumers and type checkers use the authored signatures.
|
||||
|
||||
---
|
||||
implementation. When signatures change, update both files.
|
||||
|
||||
## Wiki pages
|
||||
|
||||
1. Hand-written markdown lives in `docs/wiki/**` and is never generated.
|
||||
2. File names use a numeric prefix: `01_overview.md`, `02_components.md`.
|
||||
3. Nested directories become nested navigation groups:
|
||||
`05_development/01_environment.md` → group *Development*.
|
||||
4. `index.md` is the site `Home` at the root, and a section root inside a
|
||||
directory.
|
||||
5. Navigation labels are derived by stripping the numeric prefix and applying
|
||||
title case on the remaining words.
|
||||
|
||||
---
|
||||
- Hand-written markdown lives in `docs/wiki/**` and is never generated.
|
||||
- File names use a numeric prefix: `01_overview.md`, `02_architecture.md`.
|
||||
- Nested directories become nested navigation groups:
|
||||
`05_development/01_environment.md` → group *Development*.
|
||||
- `index.md` is the site `Home` at the root, and a section root inside a
|
||||
directory.
|
||||
- Navigation labels are derived by stripping the numeric prefix and applying
|
||||
title case on the remaining words.
|
||||
|
||||
## Templates
|
||||
|
||||
MkDocs config fragments live in `docforge/templates`. The `mkdocs.wiki.yml`
|
||||
fragment carries only the `search` plugin, since wiki pages contain no
|
||||
mkdocstrings directives.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [02 – Components](02_components.md) · [04 – Iterative Workflow](04_iterative_workflow.md)
|
||||
mkdocstrings directives.
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
A docs build runs through the CLI in a single pass.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Build commands
|
||||
## Build commands
|
||||
|
||||
```bash
|
||||
# Library reference only
|
||||
@@ -20,9 +18,7 @@ doc-forge build --wiki --site-name docforge
|
||||
doc-forge build --mcp --module docforge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔄 What a build does
|
||||
## What a build does
|
||||
|
||||
1. Validates the requested modes (`--mkdocs`, `--api`, `--wiki`, `--mcp`).
|
||||
2. Generates library sources under `docs/lib/**` with `MkDocsRenderer`.
|
||||
@@ -33,9 +29,7 @@ doc-forge build --mcp --module docforge
|
||||
6. Runs `mkdocs build` once per config, emitting self-contained sites
|
||||
`site/lib/`, `site/api/`, and `site/wiki/`.
|
||||
|
||||
---
|
||||
|
||||
## 🧭 Explore the sites
|
||||
## Explore the sites
|
||||
|
||||
```bash
|
||||
doc-forge build --wiki --mkdocs --module docforge
|
||||
@@ -46,16 +40,9 @@ doc-forge serve --api
|
||||
doc-forge serve --mkdocs --mkdocs-yml docs/mkdocs.wiki.yml
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📦 Serve the MCP bundle
|
||||
## Serve the MCP bundle
|
||||
|
||||
```bash
|
||||
doc-forge build --mcp --module docforge
|
||||
doc-forge serve --mcp --module docforge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [03 – Conventions](03_conventions.md) · [01 – Environment](05_development/01_environment.md)
|
||||
```
|
||||
@@ -1,8 +1,6 @@
|
||||
# Environment Setup
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Create the environment
|
||||
## Create the environment
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
@@ -12,9 +10,7 @@ pip install -e .
|
||||
|
||||
Requires Python 3.10+ (per `pyproject.toml`).
|
||||
|
||||
---
|
||||
|
||||
## 📦 Dependencies
|
||||
## Dependencies
|
||||
|
||||
Development extras include:
|
||||
|
||||
@@ -22,9 +18,4 @@ Development extras include:
|
||||
- `ruff` — lint and format checking
|
||||
- `black` — auto-formatting
|
||||
- `mypy` — strict typing checks
|
||||
- `pydoclint` — docstring ↔ signature consistency checks
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [04 – Iterative Workflow](../04_iterative_workflow.md) · [02 – Quality Gates](02_quality_gates.md)
|
||||
- `pydoclint` — docstring ↔ signature consistency checks
|
||||
@@ -2,10 +2,6 @@
|
||||
|
||||
Run all checks before pushing:
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Commands
|
||||
|
||||
```bash
|
||||
.venv\Scripts\python.exe -m pytest
|
||||
.venv\Scripts\python.exe -m ruff check docforge tests
|
||||
@@ -14,9 +10,7 @@ Run all checks before pushing:
|
||||
.venv\Scripts\pydoclint.exe docforge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📁 Test layout
|
||||
## Test layout
|
||||
|
||||
| Path | Covers |
|
||||
|--------------------------|------------------------------------|
|
||||
@@ -26,9 +20,4 @@ Run all checks before pushing:
|
||||
|
||||
CLI tests use the `cli_runner` fixture with `mock_mkdocs_build` and
|
||||
`mock_mkdocs_load_config` so they exercise the full flow without invoking a
|
||||
real MkDocs build.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [01 – Environment](01_environment.md) · [03 – GSDFC Guide](03_gsdfc_guide.md)
|
||||
real MkDocs build.
|
||||
@@ -5,9 +5,7 @@ in the `docforge/__init__.py` package docstring. It describes how to write
|
||||
docstrings that render correctly in MkDocs and stay machine-parseable by
|
||||
doc-forge, MkDocs, and MCP clients.
|
||||
|
||||
---
|
||||
|
||||
## 🧭 Overview
|
||||
## Overview
|
||||
|
||||
- Docstrings are the single source of truth.
|
||||
- `doc-forge` compiles docstrings but never rewrites them.
|
||||
@@ -15,9 +13,7 @@ doc-forge, MkDocs, and MCP clients.
|
||||
- Type hints live in signatures; prose entries repeat the type in
|
||||
parentheses and must match the signature.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Module docstrings
|
||||
## Module docstrings
|
||||
|
||||
Modules use Markdown headings and `---` separators.
|
||||
|
||||
@@ -27,9 +23,7 @@ Recommended sections:
|
||||
- `# Examples` — a representative usage snippet
|
||||
- `# Notes` — guarantees, lifecycle, and thread-safety notes
|
||||
|
||||
---
|
||||
|
||||
## 📦 Class docstrings
|
||||
## Class docstrings
|
||||
|
||||
Recommended sections, in order:
|
||||
|
||||
@@ -38,9 +32,7 @@ Recommended sections, in order:
|
||||
- `Notes:` — grouped subsections such as **Guarantees**, **Lifecycle**
|
||||
- `Example:` — indented `python` code block
|
||||
|
||||
---
|
||||
|
||||
## 📦 Function and method docstrings
|
||||
## Function and method docstrings
|
||||
|
||||
Recommended section order:
|
||||
|
||||
@@ -61,16 +53,12 @@ Formatting rules:
|
||||
- Fenced `python` blocks are allowed inside `Example:` sections, indented
|
||||
four spaces.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Property docstrings
|
||||
## Property docstrings
|
||||
|
||||
Properties document their return values with a `Returns:` section and, when
|
||||
meaningful, an `Example:`.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Example
|
||||
## Example
|
||||
|
||||
```python
|
||||
def process(foo: Foo, multiplier: int) -> int:
|
||||
@@ -102,17 +90,13 @@ def process(foo: Foo, multiplier: int) -> int:
|
||||
"""
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Keeping stubs in sync
|
||||
## Keeping stubs in sync
|
||||
|
||||
Every `.py` module ships a matching `.pyi` stub. When a signature or a public
|
||||
symbol changes, update both files. Signature annotations in the stub must
|
||||
match the implementation.
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ Enforcement
|
||||
## Enforcement
|
||||
|
||||
`pydoclint` (Google style) runs in CI and verifies that `Args:`/`Returns:`
|
||||
sections match function signatures, including types.
|
||||
@@ -121,9 +105,4 @@ sections match function signatures, including types.
|
||||
- `skip-checking-raises = true` — `Raises:` sections are descriptive and are
|
||||
not required to map to literal `raise` statements.
|
||||
- `check-class-attributes = false` — `Attributes:` sections document instance
|
||||
attributes without class-level annotations.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [02 – Quality Gates](02_quality_gates.md) · [04 – MCP Guide](04_mcp_guide.md)
|
||||
attributes without class-level annotations.
|
||||
@@ -5,9 +5,7 @@ GSDFC docstrings and serve that bundle over the Model Context Protocol (MCP).
|
||||
The bundle is self-contained: readers can derive the full API reference —
|
||||
signatures, docstrings, and structure — for the documented project.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Building the bundle
|
||||
## Building the bundle
|
||||
|
||||
```bash
|
||||
doc-forge build --mcp --module docforge
|
||||
@@ -19,9 +17,7 @@ This writes structured JSON into `docs/mcp/`:
|
||||
- `nav.json` — module list with `docs://modules/{module}` resource URIs
|
||||
- `modules/{dotted.path}.json` — per-module serialized documentation
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Serving the bundle
|
||||
## Serving the bundle
|
||||
|
||||
```bash
|
||||
doc-forge serve --mcp --module docforge
|
||||
@@ -40,9 +36,7 @@ Missing resources are returned as structured error dictionaries rather than
|
||||
exceptions. The default transport is `streamable-http`; `stdio` and `sse` are
|
||||
supported via `MCPServer.run`.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Bundle contents
|
||||
## Bundle contents
|
||||
|
||||
Each module resource contains:
|
||||
|
||||
@@ -54,9 +48,4 @@ Each module resource contains:
|
||||
Because the bundle is generated from docstrings, the quality of the bundle
|
||||
equals the quality of the project's GSDFC docstrings. For docforge itself,
|
||||
the GSDFC specification is carried in `modules/docforge.json` via the
|
||||
`docforge/__init__.py` package docstring, making the bundle self-documenting.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [03 – GSDFC Guide](03_gsdfc_guide.md) · [05 – MkDocs Configs](05_mkdocs_configs.md)
|
||||
`docforge/__init__.py` package docstring, making the bundle self-documenting.
|
||||
@@ -5,9 +5,7 @@ repo that documents kind `{kind}` carries a config at `docs/mkdocs.{kind}.yml`
|
||||
that sets `docs_dir` to the kind's source directory and `site_dir` to
|
||||
`../site/{kind}`.
|
||||
|
||||
---
|
||||
|
||||
## 📄 File wins
|
||||
## File wins
|
||||
|
||||
`docs/mkdocs.{kind}.yml` is a repo-owned file, not a build byproduct:
|
||||
|
||||
@@ -21,9 +19,7 @@ that sets `docs_dir` to the kind's source directory and `site_dir` to
|
||||
Because a present file is never rewritten, rerunning a build is a no-op for
|
||||
versioned configs: the working tree stays clean.
|
||||
|
||||
---
|
||||
|
||||
## 🧩 Templates
|
||||
## Templates
|
||||
|
||||
The built-in defaults live in `docforge/templates/`:
|
||||
|
||||
@@ -40,9 +36,7 @@ kind fragment, then filling in generation-time values (`site_name`,
|
||||
theme `icon` from `docforge.nav.yml`). Pass `--template <path>` to replace the
|
||||
built-in templates entirely.
|
||||
|
||||
---
|
||||
|
||||
## 🏗️ Supported layouts
|
||||
## Supported layouts
|
||||
|
||||
- **Per-kind config** — the standard layout; each kind builds to
|
||||
`site/{kind}` and is served under `/<repo>/{kind}/`.
|
||||
@@ -51,24 +45,4 @@ built-in templates entirely.
|
||||
doc-forge never reads or writes root `mkdocs.yml`; the docs service maps the
|
||||
kind to the root `site/` dir in this case.
|
||||
|
||||
Commit `docs/mkdocs.{kind}.yml` so served docs are reproducible from source.
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Cross-kind links
|
||||
|
||||
Kinds are separate MkDocs sites served side by side under `/<repo>/<kind>/`,
|
||||
so a wiki page may link to the library reference with a source-relative path
|
||||
such as `../lib/13_library_registry/`. MkDocs only rewrites links that point
|
||||
inside `docs_dir`; anything reaching a sibling kind is emitted verbatim and,
|
||||
under `use_directory_urls`, resolves into `<kind>/<kind>/` and breaks.
|
||||
|
||||
The `docforge-linkfix` plugin (part of doc-forge, enabled in the wiki
|
||||
template) fixes this at render time: it rewrites `../lib/`, `../api/`, and
|
||||
`../wiki/` links to climb to the repository root, so they resolve correctly
|
||||
however deeply the page is nested.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
- [04 – MCP Guide](04_mcp_guide.md)
|
||||
Commit `docs/mkdocs.{kind}.yml` so served docs are reproducible from source.
|
||||
@@ -1,10 +1,9 @@
|
||||
# 🧩 docforge — Docstring-Driven Documentation Forge
|
||||
# 🔨 docforge — Docstring-Driven Documentation Forge
|
||||
|
||||
`docforge` is an internal documentation tool that generates reference documentation from Google-Styled Doc-Forge Convention (GSDFC) docstrings and assembles it into per-kind MkDocs sites, alongside hand-written wiki pages and OpenAPI-based API docs.
|
||||
|
||||
> **Doc model:** this wiki is written for humans — how‑to guides, examples,
|
||||
> and testing recipes. The authoritative API contracts live in the code
|
||||
> (docstrings) and the machine‑readable bundle under `docs/mcp/`.
|
||||
`docforge` is an internal documentation tool that generates reference
|
||||
documentation from Google-Styled Doc-Forge Convention (GSDFC) docstrings and
|
||||
assembles it into per-kind MkDocs sites, alongside hand-written wiki pages and
|
||||
OpenAPI-based API docs.
|
||||
|
||||
---
|
||||
|
||||
@@ -18,308 +17,26 @@
|
||||
|
||||
---
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
```bash
|
||||
# Internal PyPI (TBD)
|
||||
pip install docforge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📁 Documentation Structure
|
||||
|
||||
| Section | Description |
|
||||
|----------------------------------------------| -------------------------------------------------- |
|
||||
| [Overview](01_overview.md) | What docforge is and how it fits the pipeline |
|
||||
| [Components](02_components.md) | Loaders, models, nav, renderers, CLI, servers |
|
||||
| [Architecture](02_architecture.md) | Loaders, models, nav, renderers, CLI, servers |
|
||||
| [Conventions](03_conventions.md) | GSDFC, `.pyi` stubs, and template conventions |
|
||||
| [Iterative Workflow](04_iterative_workflow.md) | How a docs build runs end to end |
|
||||
| [Environment](05_development/01_environment.md) | Environment setup |
|
||||
| [Quality Gates](05_development/02_quality_gates.md) | Test layout and quality checks |
|
||||
| [GSDFC Guide](05_development/03_gsdfc_guide.md) | How to write GSDFC-conformant docstrings |
|
||||
| [Development](05_development/01_environment.md) | Environment setup and quality gates |
|
||||
| [Docstring Guide](05_development/03_gsdfc_guide.md) | How to write GSDFC-conformant docstrings |
|
||||
| [MCP Guide](05_development/04_mcp_guide.md) | Building, serving, and consuming the MCP bundle |
|
||||
| [MkDocs Configs](05_development/05_mkdocs_configs.md) | MkDocs config generation and templates |
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Related Resources
|
||||
|
||||
- **Source Code:** the `doc-forge` repository
|
||||
- **Wiki Kind:** hand-written content lives in `docs/wiki/`
|
||||
- **MCP Bundle:** generated by `doc-forge build --mcp --module docforge` into `docs/mcp/`
|
||||
- **Wiki Kind:** hand-written content lives in `docs/wiki/`; use the prompt in the
|
||||
wiki-related resource below
|
||||
````markdown
|
||||
# AGENTS.md — Wiki Authoring Guide (Aetoskia)
|
||||
|
||||
This file instructs AI agents how to create, extend, and maintain the wiki
|
||||
(`docs/wiki/**`) for any Aetoskia repository.
|
||||
|
||||
> **Workflow:** this prompt covers **phase 2 only**. Phase 1 — writing GSDFC docstrings
|
||||
> (plus `.pyi` stubs and `py.typed`) — is done by the agent using the doc-forge MCP
|
||||
> bundle: `doc://modules/docforge` carries the full GSDFC spec. Write the wiki only
|
||||
> after docstrings exist and `doc-forge build --mcp --module <pkg>` produced the
|
||||
> repo's own bundle.
|
||||
|
||||
---
|
||||
|
||||
## 1. Doc model — know the two sources of truth
|
||||
|
||||
Every repo keeps two distinct kinds of documentation that must **not** bleed
|
||||
into each other:
|
||||
|
||||
| Kind | Source | Where | Audience |
|
||||
|-------------------|-----------------------|------------------------------------------|------------------------------------|
|
||||
| **Wiki** | Hand-written markdown | `docs/wiki/**` | Humans (how-to, examples, testing) |
|
||||
| **API reference** | Docstrings (GSDFC) | Generated → `docs/lib/**`, `docs/mcp/**` | Consumers (exact contracts) |
|
||||
|
||||
Rules:
|
||||
|
||||
- The wiki is written **for humans** — how-to guides, recipes, and testing
|
||||
patterns. It is never generated.
|
||||
- API contracts (signatures, parameter types, exact behavior) live in the
|
||||
docstrings and the machine-readable bundle under `docs/mcp/`. **Never**
|
||||
duplicate full API documentation in the wiki — link to the lib site instead.
|
||||
- If a page starts to drift into contract territory, cut it down to usage and
|
||||
point at `docs/lib/`.
|
||||
- This doc model is stated on every index page as a blockquote; keep it there:
|
||||
> **Doc model:** this wiki is written for humans — how‑to guides, examples,
|
||||
> and testing recipes. The authoritative API contracts live in the code
|
||||
> (docstrings) and the machine‑readable bundle under `docs/mcp/`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Directory layout & file naming
|
||||
|
||||
```
|
||||
docs/wiki/
|
||||
├── index.md # site Home
|
||||
├── 01_overview.md
|
||||
├── 02_components.md
|
||||
├── 03_use_cases/ # nested directory → nav group
|
||||
│ ├── 01_basic_crud.md
|
||||
│ ├── 02_custom_repo.md
|
||||
│ └── ...
|
||||
├── 04_best_practices.md
|
||||
├── 06_error_handling.md
|
||||
└── 07_testing_example.md
|
||||
```
|
||||
|
||||
- Location: `docs/wiki/` (hand-written only).
|
||||
- File names: `NN_snake_case_name.md` with a **zero-padded two-digit** numeric
|
||||
prefix. e.g. `01_overview.md`, `03_use_cases/07_caching.md`.
|
||||
- Top-level pages use `NN_name.md` directly. High-volume sections get their own
|
||||
directory, e.g. `03_use_cases/NN_name.md` (nav group "Use Cases").
|
||||
- **No frontmatter.** Every file opens directly with an H1 `# Title`.
|
||||
- Navigation labels are short human titles set explicitly in
|
||||
`docs/mkdocs.wiki.yml` (title case) — often **shorter** than the page H1.
|
||||
Example: nav label `Basic CRUD` vs page H1 `Use Case 1: Basic FastAPI CRUD API`.
|
||||
Never use the raw filename slug as the label.
|
||||
- Renumbering: prefixes order pages. When inserting a page, pick the next
|
||||
number in the relevant group (subgroup numbers stay grouped).
|
||||
|
||||
---
|
||||
|
||||
## 3. Navigation — `docs/mkdocs.wiki.yml` is the source of truth
|
||||
|
||||
Every wiki page **must** be wired into the nav defined in
|
||||
`docs/mkdocs.wiki.yml`. If a page is not in the nav, it is orphaned.
|
||||
|
||||
- The `nav:` block mirrors the directory tree; directories become nested
|
||||
groups.
|
||||
- When a section has many pages, group them **by theme** into nested
|
||||
subgroups. mongo-ops groups its use cases into:
|
||||
`Getting Started`, `Data & Queries`, `Caching`, `Population`,
|
||||
`Advanced Usage`.
|
||||
- Keep `index.md`'s **Documentation Structure** table in sync with the nav —
|
||||
it is the human-facing version of the same TOC. Every nav entry needs a row
|
||||
(or nested bullet group) there.
|
||||
- Nav label = human title (title case), not the filename slug.
|
||||
|
||||
---
|
||||
|
||||
## 4. Page anatomy
|
||||
|
||||
### 4.1 `index.md` (Home)
|
||||
|
||||
```
|
||||
# 🧩 <package> — <slogan>
|
||||
<one-paragraph pitch>
|
||||
|
||||
> **Doc model:** … (see §1)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Key Features (bullet list, emoji per feature)
|
||||
## 📦 Installation (code blocks: internal PyPI, extras, local source)
|
||||
## 📁 Documentation Structure (table = TOC, mirrors nav exactly)
|
||||
## 🔗 Related Resources (bullets: source repo, internal PyPI, CI)
|
||||
---
|
||||
© Aetoskia Internal — `<package>` <version>
|
||||
```
|
||||
|
||||
### 4.2 Overview page (`01_*`)
|
||||
|
||||
- Opens with `# Library Overview`, one sentence about what the library does,
|
||||
then a line stating the page builds the mental model.
|
||||
- Sections: `## 🏗️ Architecture` (ASCII diagram + numbered layer list),
|
||||
`## 🔄 Lifecycle Rules` (table: step / call / why),
|
||||
`## 🧭 Which … Should You Use?` (decision table).
|
||||
- Ends with `## ➡️ Read Next` (cross-links to the next pages to read).
|
||||
|
||||
### 4.3 Components page (`02_*`)
|
||||
|
||||
- Validated reference for the public API surface — describes what each
|
||||
component is for and how the pieces wire together. Keep it usage-level;
|
||||
exact signatures belong in `docs/lib/`.
|
||||
- Anatomy: numbered sections, one per component (`## 1. MongoConnectionManager`,
|
||||
`## 2. BaseDocument`, …), with `### 8.1`-style sub-numbering for related
|
||||
types under a component (e.g. the cache layer's backend / stats / config /
|
||||
in-memory / redis implementations). Ends with `## Related`.
|
||||
|
||||
### 4.4 Use-case page (the most common)
|
||||
|
||||
Standard anatomy, in this order:
|
||||
|
||||
```
|
||||
# Use Case N: <Human Title>
|
||||
|
||||
**Scenario:** <one sentence: the problem this recipe solves>
|
||||
|
||||
---
|
||||
|
||||
## 📦 What's New? (table: Component | Description — new API used here)
|
||||
## 🚀 Example (languaged code block, complete runnable-looking snippet)
|
||||
## 💡 Tips (bullets: gotchas, ordering, common mistakes)
|
||||
## Related (§5)
|
||||
```
|
||||
|
||||
### 4.5 Deep-dive / worked-example page
|
||||
|
||||
For intricate flows (population shapes, cache round-trips), use numbered
|
||||
depth-first sections and comparison tables:
|
||||
|
||||
```
|
||||
## 1. <Write path> (### 1a., ### 1b., … per sub-case)
|
||||
## 2. <Read path>
|
||||
## 3. <Round trip / tricky bit>
|
||||
## 4. When to use which (comparison table)
|
||||
## Related
|
||||
```
|
||||
|
||||
### 4.6 Best Practices page (`04_*`)
|
||||
|
||||
- Flat themed `##` sections (e.g. Layering, Lifecycle, Data & Performance,
|
||||
Transactions & Errors, Testing), each a short list of numbered conventions.
|
||||
- Pure prose — no large code blocks.
|
||||
|
||||
### 4.7 Error Handling (`06_*`) / Testing pages
|
||||
|
||||
- **Error Handling:** an exceptions table (`Exception | Source | Meaning / fix`),
|
||||
a `> ` note on which failures are by design, a `## 🚀 FastAPI Mapping Example`
|
||||
code block, then `## 💡 Tips` bullets, then `## Related`.
|
||||
- **Testing example (`07_*`):** `## 🚀 Mock-Based Quickstart` (focused code
|
||||
block), `## 💡 Notes` tip list, `## Related`.
|
||||
|
||||
Common to all pages: no frontmatter, `---` between every major section, and a
|
||||
`## Related` (or variant) footer as the **last** section.
|
||||
|
||||
---
|
||||
|
||||
## 5. The `## Related` footer
|
||||
|
||||
Every page ends with a cross-link footer. Rules:
|
||||
|
||||
- Always the **last** section, always preceded by a `---`.
|
||||
- Standard heading: `## Related` (no emoji).
|
||||
- One bullet line; links separated by ` · ` (middle dot plus spaces).
|
||||
- Link label format: `[NN – Title](relative_path)` — en-dash, page number, title.
|
||||
- Paths are **relative**: same directory → `02_custom_repo.md`; parent →
|
||||
`../01_overview.md`; child → `03_use_cases/01_basic_crud.md`.
|
||||
- Link order follows nav order (each `Related` points to related next/sibling
|
||||
pages, plus the overview/components anchor).
|
||||
|
||||
Examples (from mongo-ops):
|
||||
|
||||
```
|
||||
## Related
|
||||
- [02 – Custom repository](02_custom_repo.md) · [04 – Pagination](04_pagination.md) · [Overview](../01_overview.md)
|
||||
```
|
||||
|
||||
Variants:
|
||||
|
||||
- `## ➡️ Read Next` — used on the overview page (linear reading order).
|
||||
- `## 🔗 Related Resources` — only on `index.md`, one bullet per external resource.
|
||||
|
||||
---
|
||||
|
||||
## 6. Tone & formatting rules
|
||||
|
||||
- **Written for humans**: short sentences, concrete examples, plain words.
|
||||
- Emoji-prefixed H2 headings for recognizable section types
|
||||
(`📦 What's New?`, `🚀 Example`, `💡 Tips`, `🚀 Key Features`).
|
||||
- `---` horizontal rule between every major section.
|
||||
- Code blocks always declare a language (```python, ```bash, etc.).
|
||||
- Use tables for comparisons and structured decisions; bullets for lists;
|
||||
ASCII diagrams for architecture.
|
||||
- Bold key terms inline. Use `inline code` for symbols/APIs.
|
||||
- Keep pages focused: one recipe/purpose per page. If a page balloons past
|
||||
~10 KB, split it (add a numbered deep-dive page instead).
|
||||
- Match tone of existing pages in the repo before writing new ones.
|
||||
- Ground every `## 🚀 Example`, `💡 Tips`, and `📦 What's New?` row in the
|
||||
library's actual source, tests, and its `docs/mcp` bundle — never invent
|
||||
APIs or behavior. Signatures and exceptions come from the code; gotchas
|
||||
come from the tests.
|
||||
|
||||
---
|
||||
|
||||
## 7. Build & verify workflow
|
||||
|
||||
After creating or editing wiki pages:
|
||||
|
||||
```bash
|
||||
# 1. Build the wiki (from the repo root)
|
||||
doc-forge build --wiki # wiki only
|
||||
doc-forge build --wiki --mkdocs --module <pkg> # wiki + lib together
|
||||
|
||||
# 2. Preview locally
|
||||
doc-forge serve --wiki
|
||||
|
||||
# 3. Collect into the hub (run from the docs/ service repo)
|
||||
python collect.py # copies site, regenerates index + nginx.conf
|
||||
python collect.py --dry-run # preview without writing
|
||||
```
|
||||
|
||||
Verification checklist:
|
||||
|
||||
- `doc-forge build --wiki` completes with no warnings about missing files.
|
||||
- Every new page is present in `docs/mkdocs.wiki.yml` **and** in the index
|
||||
Documentation Structure table.
|
||||
- Every page ends with a `## Related` block and no dead links (paths resolve).
|
||||
- After `collect.py`: the hub card links to both `/wiki/` and `/lib/` and the
|
||||
pages render (spot-check with the served site).
|
||||
- If code/docstrings changed (no change when wiki-only), run the repo gates:
|
||||
`black`, `ruff`, `mypy`, `pytest`.
|
||||
|
||||
---
|
||||
|
||||
## 8. Before/after checklist
|
||||
|
||||
**Before creating a page:**
|
||||
|
||||
- [ ] Confirm it is genuinely wiki material (how-to) and not API contract.
|
||||
- [ ] Find the right filename (`NN_snake_case.md`) and directory for its theme.
|
||||
- [ ] Outline the sections per §4 anatomy that fits the content.
|
||||
|
||||
**After creating/editing a page:**
|
||||
|
||||
- [ ] Page wired into `docs/mkdocs.wiki.yml` nav (themed subgroup if needed).
|
||||
- [ ] `index.md` Documentation Structure table updated.
|
||||
- [ ] `## Related` footer present, relative links, nav order.
|
||||
- [ ] `---` separators consistent; no frontmatter; emoji headings where apt.
|
||||
- [ ] Build passes; collect run; hub shows `/wiki/` + `/lib/` links.
|
||||
- [ ] No orphaned files, no dead links.
|
||||
````
|
||||
---
|
||||
|
||||
© Aetoskia Internal — `docforge` 1.0
|
||||
© Aetoskia Internal
|
||||
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "doc-forge"
|
||||
version = "0.0.8"
|
||||
version = "0.0.6"
|
||||
description = "A renderer-agnostic Python documentation compiler"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
@@ -56,9 +56,6 @@ dependencies = [
|
||||
[project.scripts]
|
||||
doc-forge = "docforge.cli.main:main"
|
||||
|
||||
[project.entry-points."mkdocs.plugins"]
|
||||
docforge-linkfix = "docforge.mkdocs_links:LinkFixPlugin"
|
||||
|
||||
[project.optional-dependencies]
|
||||
mkdocs = [
|
||||
"mkdocs==1.6.1",
|
||||
@@ -90,7 +87,6 @@ dev = [
|
||||
"build>=1.0.0",
|
||||
"twine>=4.0.0",
|
||||
"pre-commit>=3.4.0",
|
||||
"doc-forge[mkdocs,mcp]",
|
||||
]
|
||||
docs = [
|
||||
"doc-forge[mkdocs]",
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
from types import SimpleNamespace
|
||||
|
||||
from docforge.mkdocs_links import LinkFixPlugin
|
||||
|
||||
|
||||
def _page(dest_uri: str):
|
||||
return SimpleNamespace(file=SimpleNamespace(dest_uri=dest_uri))
|
||||
|
||||
|
||||
def _fix(markdown: str, dest_uri: str) -> str:
|
||||
return LinkFixPlugin().on_page_markdown(
|
||||
markdown,
|
||||
page=_page(dest_uri),
|
||||
config=SimpleNamespace(),
|
||||
files=SimpleNamespace(),
|
||||
)
|
||||
|
||||
|
||||
def test_root_page_keeps_single_parent():
|
||||
src = "[lib](../lib/pkg/index.md)"
|
||||
assert _fix(src, "index.html") == src
|
||||
|
||||
|
||||
def test_nested_page_adds_directory_depth():
|
||||
assert _fix("[lib](../lib/pkg/index.md)", "01_overview/index.html") == (
|
||||
"[lib](../../lib/pkg/index.md)"
|
||||
)
|
||||
|
||||
|
||||
def test_deeply_nested_page_adds_two_levels():
|
||||
src = "[lib](../lib/pkg/index.md)"
|
||||
got = _fix(src, "04_development/02_releasing/index.html")
|
||||
assert got == "[lib](../../../lib/pkg/index.md)"
|
||||
|
||||
|
||||
def test_multiple_cross_kind_links_are_rebased():
|
||||
src = "See [a](../lib/a) and [b](../api/b)."
|
||||
got = _fix(src, "01_overview/index.html")
|
||||
assert got == "See [a](../../lib/a) and [b](../../api/b)."
|
||||
|
||||
|
||||
def test_wiki_kind_is_rebased():
|
||||
assert _fix("[w](../wiki/index.md)", "01_overview/index.html") == (
|
||||
"[w](../../wiki/index.md)"
|
||||
)
|
||||
|
||||
|
||||
def test_relative_within_kind_untouched():
|
||||
src = "[next](02_install.md) and [prev](../index.md)"
|
||||
assert _fix(src, "01_overview/index.html") == src
|
||||
|
||||
|
||||
def test_absolute_and_url_links_untouched():
|
||||
src = "[site](https://example.com/lib/x) and [root](/lib/x) and [r](lib/x)"
|
||||
assert _fix(src, "a/index.html") == src
|
||||
@@ -1,73 +0,0 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from docforge import MCPRenderer
|
||||
from docforge.loaders import GriffeLoader, discover_module_paths
|
||||
|
||||
|
||||
def _load_docforge_bundle(tmp_path: Path) -> Path:
|
||||
project_root = Path(__file__).resolve().parents[3]
|
||||
loader = GriffeLoader()
|
||||
paths = discover_module_paths("docforge", project_root=project_root)
|
||||
project = loader.load_project(paths)
|
||||
|
||||
out_dir = tmp_path / "mcp"
|
||||
MCPRenderer().generate_sources(project, out_dir)
|
||||
return out_dir
|
||||
|
||||
|
||||
def test_mcp_signatures_are_clean(tmp_path: Path) -> None:
|
||||
out_dir = _load_docforge_bundle(tmp_path)
|
||||
|
||||
object_payload = json.loads(
|
||||
(out_dir / "modules" / "docforge.models.object.json").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
)
|
||||
|
||||
cls = object_payload["content"]["objects"]["DocObject"]
|
||||
assert isinstance(cls["signature"], str)
|
||||
assert "bound method" not in cls["signature"]
|
||||
assert cls["signature"].startswith("DocObject(")
|
||||
|
||||
renderer_payload = json.loads(
|
||||
(out_dir / "modules" / "docforge.renderers.mcp_renderer.json").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
)
|
||||
|
||||
method = renderer_payload["content"]["objects"]["MCPRenderer"]["members"][
|
||||
"generate_sources"
|
||||
]
|
||||
assert isinstance(method["signature"], str)
|
||||
assert "bound method" not in method["signature"]
|
||||
assert method["signature"].startswith("generate_sources(")
|
||||
|
||||
|
||||
def test_mcp_skips_unresolvable_import_aliases(tmp_path: Path) -> None:
|
||||
out_dir = _load_docforge_bundle(tmp_path)
|
||||
|
||||
renderer_payload = json.loads(
|
||||
(out_dir / "modules" / "docforge.renderers.mcp_renderer.json").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
)
|
||||
|
||||
object_names = set(renderer_payload["content"]["objects"])
|
||||
assert "json" not in object_names
|
||||
assert "Path" not in object_names
|
||||
|
||||
|
||||
def test_mcp_keeps_resolvable_package_reexports(tmp_path: Path) -> None:
|
||||
out_dir = _load_docforge_bundle(tmp_path)
|
||||
|
||||
root_payload = json.loads(
|
||||
(out_dir / "modules" / "docforge.json").read_text(encoding="utf-8")
|
||||
)
|
||||
|
||||
discover = root_payload["content"]["objects"]["discover_module_paths"]
|
||||
assert discover["name"] == "discover_module_paths"
|
||||
assert isinstance(discover["signature"], str)
|
||||
assert "bound method" not in discover["signature"]
|
||||
assert discover["signature"].startswith("discover_module_paths(")
|
||||
assert discover["docstring"] is not None
|
||||
Reference in New Issue
Block a user