10 Commits

Author SHA1 Message Date
de427dd350 feat: use file-wins mkdocs configs with --refresh; wiki template in mongo-ops style 2026-09-13 18:11:42 +05:30
b86b5b0e85 fix: resolve mkdocstrings search path against repo root in lib builds 2026-09-12 14:57:34 +05:30
2ae96f58de feat: build each doc kind with its own MkDocs config and site 2026-09-12 14:23:22 +05:30
582b6809a0 docs: bring docforge docstrings and wiki to GSDFC standard
- fix GSDFC spec contradictions in __init__ docstring (parenthesized types, fenced-block rule) and sync generated README
- rewrite docstrings across loaders, models, nav, servers, renderers, cli; sync .pyi stubs
- add pydoclint (google style) gate to dev extras and pyproject config
- fix mcp nav resources doc:// -> docs://
- refresh docs/lib and docs/mcp, drop stale docforge/ duplicate group
- update wiki pages and add GSDFC + MCP guides under 05_development
2026-09-12 13:12:51 +05:30
8c6c46caf2 feat: add wiki build kind with file-structure-derived navigation
- add build_wiki_nav deriving MkDocs nav from docs/wiki file structure
  (index.md -> Home, numeric prefixes stripped and title-cased, nested
  dirs become groups, natural ordering)
- add --wiki / --wiki-dir to build; wiki-only builds need no --module
- merge wiki nav before generated lib/api nav; wiki Home replaces the
  nav spec Home entry
- add mkdocs.wiki.yml template fragment and nav/cli tests
- dogfood doc-forge's own docs/wiki and regenerate site output
2026-09-11 23:38:23 +05:30
bacf17b930 feat: add --api OpenAPI build mode with docs/api scheme and lib-prefixed nav 2026-09-11 05:37:56 +05:30
17e8628197 docs: nest generated docs under docs/lib and docs/mcp 2026-09-10 21:15:11 +05:30
a1c5f046d4 docs: output generated sources under docs/lib and docs/mcp 2026-09-10 21:11:30 +05:30
d4b79cf95a ignore coverage.xml test artifact 2026-09-10 20:21:23 +05:30
0129268cd3 standardize packaging, tooling, docs, CI, and licensing 2026-09-10 18:49:04 +05:30
68 changed files with 2388 additions and 1506 deletions

View File

@@ -23,18 +23,13 @@ steps:
commands: commands:
- PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | head -1 | cut -d'"' -f2) - 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) - 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 if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
echo "Tag '$DRONE_TAG' does not match pyproject version '$VERSION'; refusing to publish." echo "✅ $PACKAGE_NAME==$VERSION already exists — skipping build."
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."
exit 78 exit 78
else else
echo "New version detected: $PACKAGE_NAME==$VERSION" echo "🆕 New version detected: $PACKAGE_NAME==$VERSION"
fi fi
- name: quality-gate - name: quality-gate
@@ -49,24 +44,19 @@ steps:
commands: commands:
- pip install --upgrade pip build - pip install --upgrade pip build
- | - |
if [ -z "$PIP_REPO_URL" ] || [ -z "$PIP_USERNAME" ] || [ -z "$PIP_PASSWORD" ]; then AUTH_URL="https://${PIP_USERNAME}:${PIP_PASSWORD}@$(echo "${PIP_REPO_URL#*://}" | sed 's:/*$::')/simple"
echo "PIP_REPO_URL / PIP_USERNAME / PIP_PASSWORD are not set" >&2 pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]"
exit 1 - echo "🛡️ Running quality gate..."
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..."
- python -m black --check . - python -m black --check .
- python -m ruff check . - python -m ruff check .
- python -m mypy - python -m mypy
- pydoclint .
- python -m pytest - python -m pytest
- name: build-package - name: build-package
image: python:3.13-slim image: python:3.13-slim
commands: commands:
- pip install --upgrade pip build - pip install --upgrade pip build
- echo "Building Python package..." - echo "📦 Building Python package..."
- python -m build - python -m build
- ls -l dist - ls -l dist
@@ -81,7 +71,7 @@ steps:
from_secret: PIP_PASSWORD from_secret: PIP_PASSWORD
commands: commands:
- pip install --upgrade twine - pip install --upgrade twine
- echo "Uploading to private PyPI at $PIP_REPO_URL ..." - echo "🚀 Uploading to private PyPI at $PIP_REPO_URL ..."
- | - |
twine upload \ twine upload \
--repository-url "$PIP_REPO_URL" \ --repository-url "$PIP_REPO_URL" \
@@ -128,31 +118,25 @@ steps:
set -e set -e
PACKAGE_NAME=$(grep -E '^name\s*=' pyproject.toml | cut -d'"' -f2) 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 for TAG in $(git tag --sort=version:refname); do
VERSION="$TAG" VERSION="$TAG"
echo "Version: $VERSION" echo "🔁 Version: $VERSION"
if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \ if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \
"$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then
echo "Exists, skipping" echo "⏭️ Exists, skipping"
continue continue
fi fi
git checkout --force "$TAG" git checkout --force "$TAG"
TAG_VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2) echo "🏗️ Building $VERSION"
if [ "$TAG" != "$TAG_VERSION" ]; then
echo "Tag $TAG != pyproject version $TAG_VERSION at that commit; skipping"
continue
fi
echo "Building $VERSION"
rm -rf dist rm -rf dist
python -m build python -m build
echo "Uploading $VERSION" echo "⬆️ Uploading $VERSION"
twine upload \ twine upload \
--repository-url "$PIP_REPO_URL" \ --repository-url "$PIP_REPO_URL" \
-u "$PIP_USERNAME" \ -u "$PIP_USERNAME" \
@@ -162,4 +146,4 @@ steps:
trigger: trigger:
event: event:
- custom - custom

View File

@@ -7,41 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.7] - 2026-10-17
### Added ### Added
- `py.typed` marker for PEP 561 type information. - `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` - `build --refresh` flag to rebaseline an existing `docs/mkdocs.{kind}.yml`
from the packaged templates. 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 ### 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). - 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 - 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. the current MCP server API used by doc-forge.
- Per-kind MkDocs configs (`docs/mkdocs.{lib,api,wiki}.yml`) are generated only - Per-kind MkDocs configs (`docs/mkdocs.{lib,api,wiki}.yml`) are now generated
when absent; an existing config is used verbatim (the file wins). Pass only when absent; an existing config is used verbatim (the file wins).
`--refresh` to regenerate it from the templates. Pass `--refresh` to regenerate it from the templates.
- The wiki template now uses the mongo-ops look: horizontal `navigation.tabs` - The wiki template now uses the mongo-ops look: horizontal `navigation.tabs`
header, blue grey/teal palette, Roboto font, and additional material feature header, blue grey/teal palette, Roboto font, and additional material
flags. The lib and api templates are unchanged. 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.
### Fixed ### Fixed
- Loader-generated signatures render cleanly and unresolvable aliases are - Stub fixes for typed API surfaces.
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.7...HEAD
[0.0.7]: https://git.aetoskia.com/aetos/doc-forge/compare/0.0.6...0.0.7

View File

@@ -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 # Parsing guarantees
GSDFC ensures doc-forge can deterministically extract: GSDFC ensures doc-forge can deterministically extract:

View File

@@ -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 # Parsing guarantees
GSDFC ensures doc-forge can deterministically extract: GSDFC ensures doc-forge can deterministically extract:

View File

@@ -12,8 +12,6 @@ into doc-forge documentation models.
Notes: Notes:
- All analysis is static; analyzed modules are never executed. - All analysis is static; analyzed modules are never executed.
- Private members (names starting with `_`) are skipped during conversion. - 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(): for name, member in obj.members.items():
if name.startswith("_"): if name.startswith("_"):
continue continue
if not self._is_resolvable_alias(member):
continue
module.add_object(self._convert_object(member)) module.add_object(self._convert_object(member))
@@ -272,8 +268,6 @@ class GriffeLoader:
for name, member in obj.members.items(): for name, member in obj.members.items():
if name.startswith("_"): if name.startswith("_"):
continue continue
if not self._is_resolvable_alias(member):
continue
doc_obj.add_member(self._convert_object(member)) doc_obj.add_member(self._convert_object(member))
except AliasResolutionError: except AliasResolutionError:
pass pass
@@ -305,53 +299,17 @@ class GriffeLoader:
""" """
Safely extract the signature of a Griffe object. 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: Args:
obj (Object): obj (Object):
Griffe object to inspect. Griffe object to inspect.
Returns: Returns:
str | None: str | None:
Clean string representation of the object's signature if String representation of the object's signature if available, otherwise `None`.
available, otherwise `None`.
""" """
try: try:
signature = getattr(obj, "signature", None) if hasattr(obj, "signature") and obj.signature:
if signature is None: return str(obj.signature)
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
except AliasResolutionError: except AliasResolutionError:
return False return None
return True return None

View File

@@ -23,6 +23,8 @@ import json
from pathlib import Path from pathlib import Path
from typing import Any, Literal from typing import Any, Literal
from mcp.server.fastmcp import FastMCP
class MCPServer: class MCPServer:
""" """
@@ -52,8 +54,6 @@ class MCPServer:
name (str): name (str):
Identifier used for the MCP server instance. Identifier used for the MCP server instance.
""" """
from mcp.server.fastmcp import FastMCP
self.mcp_root = mcp_root self.mcp_root = mcp_root
self.app = FastMCP(name) self.app = FastMCP(name)

View File

@@ -0,0 +1,3 @@
# Api Utils
::: docforge.cli.api_utils

View File

@@ -0,0 +1,3 @@
# Commands
::: docforge.cli.commands

View 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)

View File

@@ -0,0 +1,3 @@
# Main
::: docforge.cli.main

View File

@@ -0,0 +1,3 @@
# Mcp Utils
::: docforge.cli.mcp_utils

View File

@@ -0,0 +1,3 @@
# Mkdocs Utils
::: docforge.cli.mkdocs_utils

View File

@@ -0,0 +1,9 @@
# Docforge
::: docforge
- [Cli](cli/)
- [Loaders](loaders/)
- [Models](models/)
- [Nav](nav/)
- [Renderers](renderers/)
- [Servers](servers/)

View File

@@ -0,0 +1,3 @@
# Griffe Loader
::: docforge.loaders.griffe_loader

View File

@@ -0,0 +1,4 @@
# Loaders
::: docforge.loaders
- [Griffe Loader](griffe_loader.md)

View File

@@ -0,0 +1,6 @@
# Models
::: docforge.models
- [Module](module.md)
- [Object](object.md)
- [Project](project.md)

View File

@@ -0,0 +1,3 @@
# Module
::: docforge.models.module

View File

@@ -0,0 +1,3 @@
# Object
::: docforge.models.object

View File

@@ -0,0 +1,3 @@
# Project
::: docforge.models.project

View File

@@ -0,0 +1,7 @@
# Nav
::: docforge.nav
- [Mkdocs](mkdocs.md)
- [Resolver](resolver.md)
- [Spec](spec.md)
- [Wiki](wiki.md)

View File

@@ -0,0 +1,3 @@
# Mkdocs
::: docforge.nav.mkdocs

View File

@@ -0,0 +1,3 @@
# Resolver
::: docforge.nav.resolver

View File

@@ -0,0 +1,3 @@
# Spec
::: docforge.nav.spec

View File

@@ -0,0 +1,3 @@
# Wiki
::: docforge.nav.wiki

View File

@@ -0,0 +1,3 @@
# Base
::: docforge.renderers.base

View File

@@ -0,0 +1,6 @@
# Renderers
::: docforge.renderers
- [Base](base.md)
- [Mcp Renderer](mcp_renderer.md)
- [Mkdocs Renderer](mkdocs_renderer.md)

View File

@@ -0,0 +1,3 @@
# Mcp Renderer
::: docforge.renderers.mcp_renderer

View File

@@ -0,0 +1,3 @@
# Mkdocs Renderer
::: docforge.renderers.mkdocs_renderer

View File

@@ -0,0 +1,4 @@
# Servers
::: docforge.servers
- [Mcp Server](mcp_server.md)

View File

@@ -0,0 +1,3 @@
# Mcp Server
::: docforge.servers.mcp_server

View File

@@ -1,3 +1,4 @@
# docforge # docforge
::: docforge ::: docforge
- [Docforge](docforge/)

View File

@@ -4,6 +4,34 @@
"path": "docforge.cli.api_utils", "path": "docforge.cli.api_utils",
"docstring": "# Summary\n\nUtilities for building API documentation from an OpenAPI specification.", "docstring": "# Summary\n\nUtilities for building API documentation from an OpenAPI specification.",
"objects": { "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": { "SWAGGER_SPEC_FILENAME": {
"name": "SWAGGER_SPEC_FILENAME", "name": "SWAGGER_SPEC_FILENAME",
"kind": "attribute", "kind": "attribute",
@@ -15,7 +43,7 @@
"name": "OpenAPIMetadata", "name": "OpenAPIMetadata",
"kind": "class", "kind": "class",
"path": "docforge.cli.api_utils.OpenAPIMetadata", "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.", "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": { "members": {
"site_name": { "site_name": {
@@ -45,22 +73,29 @@
"name": "load_openapi_spec", "name": "load_openapi_spec",
"kind": "function", "kind": "function",
"path": "docforge.cli.api_utils.load_openapi_spec", "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." "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": { "derive_metadata": {
"name": "derive_metadata", "name": "derive_metadata",
"kind": "function", "kind": "function",
"path": "docforge.cli.api_utils.derive_metadata", "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." "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": { "generate_api_sources": {
"name": "generate_api_sources", "name": "generate_api_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.api_utils.generate_api_sources", "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." "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
} }
} }
} }

View File

@@ -4,46 +4,95 @@
"path": "docforge.cli.commands", "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---", "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": { "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": { "api_utils": {
"name": "api_utils", "name": "api_utils",
"kind": "module", "kind": "module",
"path": "docforge.cli.commands.api_utils", "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.", "docstring": "# Summary\n\nUtilities for building API documentation from an OpenAPI specification.",
"members": { "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": { "SWAGGER_SPEC_FILENAME": {
"name": "SWAGGER_SPEC_FILENAME", "name": "SWAGGER_SPEC_FILENAME",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.api_utils.SWAGGER_SPEC_FILENAME", "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 "docstring": null
}, },
"OpenAPIMetadata": { "OpenAPIMetadata": {
"name": "OpenAPIMetadata", "name": "OpenAPIMetadata",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata", "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.", "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": { "members": {
"site_name": { "site_name": {
"name": "site_name", "name": "site_name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_name", "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 "docstring": null
}, },
"site_description": { "site_description": {
"name": "site_description", "name": "site_description",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_description", "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 "docstring": null
}, },
"site_author": { "site_author": {
"name": "site_author", "name": "site_author",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.api_utils.OpenAPIMetadata.site_author", "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 "docstring": null
} }
} }
@@ -52,22 +101,29 @@
"name": "load_openapi_spec", "name": "load_openapi_spec",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.api_utils.load_openapi_spec", "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." "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": { "derive_metadata": {
"name": "derive_metadata", "name": "derive_metadata",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.api_utils.derive_metadata", "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." "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": { "generate_api_sources": {
"name": "generate_api_sources", "name": "generate_api_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.api_utils.generate_api_sources", "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." "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", "name": "mcp_utils",
"kind": "module", "kind": "module",
"path": "docforge.cli.commands.mcp_utils", "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---", "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": { "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mcp_utils.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "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 ```" "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.discover_module_paths", "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." "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": { "MCPRenderer": {
"name": "MCPRenderer", "name": "MCPRenderer",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mcp_utils.MCPRenderer", "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).", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.mcp_utils.MCPRenderer.name", "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 "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.MCPRenderer.generate_sources", "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." "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", "name": "MCPServer",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mcp_utils.MCPServer", "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.", "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": { "members": {
"mcp_root": { "mcp_root": {
"name": "mcp_root", "name": "mcp_root",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.mcp_utils.MCPServer.mcp_root", "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 "docstring": null
}, },
"app": { "app": {
"name": "app", "name": "app",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.mcp_utils.MCPServer.app", "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 "docstring": null
}, },
"run": { "run": {
"name": "run", "name": "run",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.MCPServer.run", "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`." "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", "name": "generate_resources",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.generate_resources", "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." "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": { "serve": {
"name": "serve", "name": "serve",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mcp_utils.serve", "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." "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", "name": "mkdocs_utils",
"kind": "module", "kind": "module",
"path": "docforge.cli.commands.mkdocs_utils", "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---", "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": { "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "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 ```" "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "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." "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": { "MkDocsNavEmitter": {
"name": "MkDocsNavEmitter", "name": "MkDocsNavEmitter",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", "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.", "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": { "members": {
"emit": { "emit": {
"name": "emit", "name": "emit",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "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." "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", "name": "build_wiki_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav", "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." "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": { "load_nav_spec": {
"name": "load_nav_spec", "name": "load_nav_spec",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "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." "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": { "resolve_nav": {
"name": "resolve_nav", "name": "resolve_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "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." "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": { "MkDocsRenderer": {
"name": "MkDocsRenderer", "name": "MkDocsRenderer",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", "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 "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", "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." "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": { "generate_readme": {
"name": "generate_readme", "name": "generate_readme",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", "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`." "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", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.generate_sources", "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``." "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": { "build_lib_nav": {
"name": "build_lib_nav", "name": "build_lib_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.build_lib_nav", "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." "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": { "build_wiki_nav_block": {
"name": "build_wiki_nav_block", "name": "build_wiki_nav_block",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav_block", "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." "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": { "load_spec_icon": {
"name": "load_spec_icon", "name": "load_spec_icon",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.load_spec_icon", "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." "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": { "generate_site_config": {
"name": "generate_site_config", "name": "generate_site_config",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.generate_site_config", "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``." "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": { "build_configs": {
"name": "build_configs", "name": "build_configs",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.build_configs", "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." "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": { "serve": {
"name": "serve", "name": "serve",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.mkdocs_utils.serve", "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." "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", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.GriffeLoader.load_module", "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 ```" "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", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.cli.commands.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.name", "path": "docforge.cli.commands.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.kind", "path": "docforge.cli.commands.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.path", "path": "docforge.cli.commands.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.signature", "path": "docforge.cli.commands.DocObject.signature",
"signature": null, "signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.docstring", "path": "docforge.cli.commands.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.commands.DocObject.members", "path": "docforge.cli.commands.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.DocObject.get_all_members", "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." "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", "name": "build",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.build", "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", "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 - 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." "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": { "serve": {
"name": "serve", "name": "serve",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.serve", "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." "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": { "tree": {
"name": "tree", "name": "tree",
"kind": "function", "kind": "function",
"path": "docforge.cli.commands.tree", "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." "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

View File

@@ -8,14 +8,14 @@
"name": "cli", "name": "cli",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.main.cli", "path": "docforge.cli.main.cli",
"signature": null, "signature": "<bound method Alias.signature of Alias('cli', 'docforge.cli.commands.cli')>",
"docstring": null "docstring": null
}, },
"main": { "main": {
"name": "main", "name": "main",
"kind": "function", "kind": "function",
"path": "docforge.cli.main.main", "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." "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."
} }
} }

View File

@@ -4,25 +4,39 @@
"path": "docforge.cli.mcp_utils", "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---", "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": { "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.cli.mcp_utils.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "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 ```" "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.discover_module_paths", "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." "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": { "MCPRenderer": {
"name": "MCPRenderer", "name": "MCPRenderer",
"kind": "class", "kind": "class",
"path": "docforge.cli.mcp_utils.MCPRenderer", "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).", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.mcp_utils.MCPRenderer.name", "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 "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.MCPRenderer.generate_sources", "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." "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", "name": "MCPServer",
"kind": "class", "kind": "class",
"path": "docforge.cli.mcp_utils.MCPServer", "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.", "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": { "members": {
"mcp_root": { "mcp_root": {
"name": "mcp_root", "name": "mcp_root",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.mcp_utils.MCPServer.mcp_root", "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 "docstring": null
}, },
"app": { "app": {
"name": "app", "name": "app",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.mcp_utils.MCPServer.app", "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 "docstring": null
}, },
"run": { "run": {
"name": "run", "name": "run",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.MCPServer.run", "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`." "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", "name": "generate_resources",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.generate_resources", "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." "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": { "serve": {
"name": "serve", "name": "serve",
"kind": "function", "kind": "function",
"path": "docforge.cli.mcp_utils.serve", "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." "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."
} }
} }

View File

@@ -4,25 +4,74 @@
"path": "docforge.cli.mkdocs_utils", "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---", "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": { "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.cli.mkdocs_utils.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "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 ```" "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.discover_module_paths", "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." "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": { "MkDocsNavEmitter": {
"name": "MkDocsNavEmitter", "name": "MkDocsNavEmitter",
"kind": "class", "kind": "class",
"path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", "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.", "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": { "members": {
"emit": { "emit": {
"name": "emit", "name": "emit",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "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." "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", "name": "build_wiki_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.build_wiki_nav", "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." "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": { "load_nav_spec": {
"name": "load_nav_spec", "name": "load_nav_spec",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.load_nav_spec", "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." "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": { "resolve_nav": {
"name": "resolve_nav", "name": "resolve_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.resolve_nav", "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." "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": { "MkDocsRenderer": {
"name": "MkDocsRenderer", "name": "MkDocsRenderer",
"kind": "class", "kind": "class",
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.name", "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 "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources", "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." "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": { "generate_readme": {
"name": "generate_readme", "name": "generate_readme",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "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`." "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", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.generate_sources", "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``." "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": { "build_lib_nav": {
"name": "build_lib_nav", "name": "build_lib_nav",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.build_lib_nav", "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." "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": { "build_wiki_nav_block": {
"name": "build_wiki_nav_block", "name": "build_wiki_nav_block",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.build_wiki_nav_block", "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." "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": { "load_spec_icon": {
"name": "load_spec_icon", "name": "load_spec_icon",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.load_spec_icon", "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." "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": { "generate_site_config": {
"name": "generate_site_config", "name": "generate_site_config",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.generate_site_config", "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``." "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": { "build_configs": {
"name": "build_configs", "name": "build_configs",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.build_configs", "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." "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": { "serve": {
"name": "serve", "name": "serve",
"kind": "function", "kind": "function",
"path": "docforge.cli.mkdocs_utils.serve", "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." "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

View File

@@ -2,76 +2,118 @@
"module": "docforge.loaders.griffe_loader", "module": "docforge.loaders.griffe_loader",
"content": { "content": {
"path": "docforge.loaders.griffe_loader", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.name", "path": "docforge.loaders.griffe_loader.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.kind", "path": "docforge.loaders.griffe_loader.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.path", "path": "docforge.loaders.griffe_loader.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.signature", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.docstring", "path": "docforge.loaders.griffe_loader.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.members", "path": "docforge.loaders.griffe_loader.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.docstring", "path": "docforge.loaders.griffe_loader.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.members", "path": "docforge.loaders.griffe_loader.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Project.name", "path": "docforge.loaders.griffe_loader.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Project.modules", "path": "docforge.loaders.griffe_loader.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_module_list", "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." "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.discover_module_paths", "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." "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", "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 ```" "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 ```"
} }
} }

View File

@@ -8,21 +8,21 @@
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.loaders.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.loaders.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.GriffeLoader.load_module", "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 ```" "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.loaders.discover_module_paths", "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." "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": { "griffe_loader": {
@@ -39,76 +39,118 @@
"kind": "module", "kind": "module",
"path": "docforge.loaders.griffe_loader", "path": "docforge.loaders.griffe_loader",
"signature": null, "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.name", "path": "docforge.loaders.griffe_loader.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.kind", "path": "docforge.loaders.griffe_loader.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.path", "path": "docforge.loaders.griffe_loader.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.signature", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.docstring", "path": "docforge.loaders.griffe_loader.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.DocObject.members", "path": "docforge.loaders.griffe_loader.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.docstring", "path": "docforge.loaders.griffe_loader.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Module.members", "path": "docforge.loaders.griffe_loader.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Project.name", "path": "docforge.loaders.griffe_loader.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.loaders.griffe_loader.Project.modules", "path": "docforge.loaders.griffe_loader.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.Project.get_module_list", "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." "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", "name": "discover_module_paths",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.discover_module_paths", "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." "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": { "GriffeLoader": {
"name": "GriffeLoader", "name": "GriffeLoader",
"kind": "class", "kind": "class",
"path": "docforge.loaders.griffe_loader.GriffeLoader", "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.", "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": { "members": {
"load_project": { "load_project": {
"name": "load_project", "name": "load_project",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", "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." "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": { "load_module": {
"name": "load_module", "name": "load_module",
"kind": "function", "kind": "function",
"path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", "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 ```" "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 ```"
} }
} }

View File

@@ -8,49 +8,49 @@
"name": "Project", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.models.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.Project.name", "path": "docforge.models.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.Project.modules", "path": "docforge.models.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.models.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.models.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.models.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.models.Project.get_module_list", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.models.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.Module.path", "path": "docforge.models.Module.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.Module.docstring", "path": "docforge.models.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.Module.members", "path": "docforge.models.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.models.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.models.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.models.Module.get_all_objects", "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." "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", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.models.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.name", "path": "docforge.models.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.kind", "path": "docforge.models.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.path", "path": "docforge.models.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.signature", "path": "docforge.models.DocObject.signature",
"signature": null, "signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.docstring", "path": "docforge.models.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.DocObject.members", "path": "docforge.models.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.models.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.models.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.models.DocObject.get_all_members", "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." "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, "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---", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.models.module.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.name", "path": "docforge.models.module.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.kind", "path": "docforge.models.module.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.path", "path": "docforge.models.module.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.signature", "path": "docforge.models.module.DocObject.signature",
"signature": null, "signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.docstring", "path": "docforge.models.module.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.members", "path": "docforge.models.module.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.models.module.Module", "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.", "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": { "members": {
"path": { "path": {
@@ -289,21 +296,21 @@
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.get_all_objects", "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." "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, "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---", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.models.object.DocObject", "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.", "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": { "members": {
"name": { "name": {
@@ -370,21 +384,21 @@
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.get_all_members", "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." "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, "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---", "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": { "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": { "Module": {
"name": "Module", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.models.project.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.path", "path": "docforge.models.project.Module.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.docstring", "path": "docforge.models.project.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.members", "path": "docforge.models.project.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.models.project.Project", "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.", "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": { "members": {
"name": { "name": {
@@ -474,28 +495,28 @@
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_module_list", "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." "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."
} }
} }

View File

@@ -4,74 +4,81 @@
"path": "docforge.models.module", "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---", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.models.module.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.name", "path": "docforge.models.module.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.kind", "path": "docforge.models.module.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.path", "path": "docforge.models.module.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.signature", "path": "docforge.models.module.DocObject.signature",
"signature": null, "signature": "<bound method Alias.signature of Alias('signature', 'docforge.models.object.DocObject.signature')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.docstring", "path": "docforge.models.module.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.module.DocObject.members", "path": "docforge.models.module.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.models.module.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.models.module.Module", "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.", "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": { "members": {
"path": { "path": {
@@ -108,21 +115,21 @@
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.models.module.Module.get_all_objects", "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." "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."
} }
} }

View File

@@ -4,11 +4,18 @@
"path": "docforge.models.object", "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---", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.models.object.DocObject", "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.", "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": { "members": {
"name": { "name": {
@@ -57,21 +64,21 @@
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.models.object.DocObject.get_all_members", "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." "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members."
} }
} }

View File

@@ -4,53 +4,60 @@
"path": "docforge.models.project", "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---", "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": { "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": { "Module": {
"name": "Module", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.models.project.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.path", "path": "docforge.models.project.Module.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
"docstring": null "docstring": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.docstring", "path": "docforge.models.project.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.models.project.Module.members", "path": "docforge.models.project.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.models.project.Project", "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.", "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": { "members": {
"name": { "name": {
@@ -80,28 +87,28 @@
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.models.project.Project.get_module_list", "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." "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."
} }
} }

View File

@@ -8,42 +8,42 @@
"name": "NavSpec", "name": "NavSpec",
"kind": "class", "kind": "class",
"path": "docforge.nav.NavSpec", "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``.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.NavSpec.home", "path": "docforge.nav.NavSpec.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.NavSpec.groups", "path": "docforge.nav.NavSpec.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
"docstring": null "docstring": null
}, },
"icon": { "icon": {
"name": "icon", "name": "icon",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.NavSpec.icon", "path": "docforge.nav.NavSpec.icon",
"signature": null, "signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
"docstring": null "docstring": null
}, },
"load": { "load": {
"name": "load", "name": "load",
"kind": "function", "kind": "function",
"path": "docforge.nav.NavSpec.load", "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." "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": { "all_patterns": {
"name": "all_patterns", "name": "all_patterns",
"kind": "function", "kind": "function",
"path": "docforge.nav.NavSpec.all_patterns", "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." "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", "name": "load_nav_spec",
"kind": "function", "kind": "function",
"path": "docforge.nav.load_nav_spec", "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." "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": { "ResolvedNav": {
"name": "ResolvedNav", "name": "ResolvedNav",
"kind": "class", "kind": "class",
"path": "docforge.nav.ResolvedNav", "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.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.ResolvedNav.home", "path": "docforge.nav.ResolvedNav.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.ResolvedNav.groups", "path": "docforge.nav.ResolvedNav.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
"docstring": null "docstring": null
}, },
"all_files": { "all_files": {
"name": "all_files", "name": "all_files",
"kind": "function", "kind": "function",
"path": "docforge.nav.ResolvedNav.all_files", "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." "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", "name": "resolve_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolve_nav", "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." "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": { "MkDocsNavEmitter": {
"name": "MkDocsNavEmitter", "name": "MkDocsNavEmitter",
"kind": "class", "kind": "class",
"path": "docforge.nav.MkDocsNavEmitter", "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.", "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": { "members": {
"emit": { "emit": {
"name": "emit", "name": "emit",
"kind": "function", "kind": "function",
"path": "docforge.nav.MkDocsNavEmitter.emit", "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." "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", "name": "build_wiki_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.build_wiki_nav", "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." "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": { "mkdocs": {
@@ -122,32 +122,46 @@
"signature": null, "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---", "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": { "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": { "ResolvedNav": {
"name": "ResolvedNav", "name": "ResolvedNav",
"kind": "class", "kind": "class",
"path": "docforge.nav.mkdocs.ResolvedNav", "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.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.mkdocs.ResolvedNav.home", "path": "docforge.nav.mkdocs.ResolvedNav.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.mkdocs.ResolvedNav.groups", "path": "docforge.nav.mkdocs.ResolvedNav.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
"docstring": null "docstring": null
}, },
"all_files": { "all_files": {
"name": "all_files", "name": "all_files",
"kind": "function", "kind": "function",
"path": "docforge.nav.mkdocs.ResolvedNav.all_files", "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." "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", "name": "MkDocsNavEmitter",
"kind": "class", "kind": "class",
"path": "docforge.nav.mkdocs.MkDocsNavEmitter", "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.", "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": { "members": {
"emit": { "emit": {
"name": "emit", "name": "emit",
"kind": "function", "kind": "function",
"path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", "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." "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, "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---", "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": { "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": { "NavSpec": {
"name": "NavSpec", "name": "NavSpec",
"kind": "class", "kind": "class",
"path": "docforge.nav.resolver.NavSpec", "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``.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.home", "path": "docforge.nav.resolver.NavSpec.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.groups", "path": "docforge.nav.resolver.NavSpec.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
"docstring": null "docstring": null
}, },
"icon": { "icon": {
"name": "icon", "name": "icon",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.icon", "path": "docforge.nav.resolver.NavSpec.icon",
"signature": null, "signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
"docstring": null "docstring": null
}, },
"load": { "load": {
"name": "load", "name": "load",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.NavSpec.load", "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." "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": { "all_patterns": {
"name": "all_patterns", "name": "all_patterns",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.NavSpec.all_patterns", "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." "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", "name": "ResolvedNav",
"kind": "class", "kind": "class",
"path": "docforge.nav.resolver.ResolvedNav", "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.", "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": { "members": {
"home": { "home": {
@@ -246,7 +281,7 @@
"name": "all_files", "name": "all_files",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.ResolvedNav.all_files", "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." "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", "name": "resolve_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.resolve_nav", "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." "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, "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---", "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": { "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": { "NavSpec": {
"name": "NavSpec", "name": "NavSpec",
"kind": "class", "kind": "class",
"path": "docforge.nav.spec.NavSpec", "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``.", "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": { "members": {
"home": { "home": {
@@ -299,14 +355,14 @@
"name": "load", "name": "load",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.NavSpec.load", "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." "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": { "all_patterns": {
"name": "all_patterns", "name": "all_patterns",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.NavSpec.all_patterns", "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." "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", "name": "load_nav_spec",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.load_nav_spec", "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." "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, "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.", "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": { "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": { "build_wiki_nav": {
"name": "build_wiki_nav", "name": "build_wiki_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.wiki.build_wiki_nav", "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." "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."
} }
} }

View File

@@ -4,32 +4,46 @@
"path": "docforge.nav.mkdocs", "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---", "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": { "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": { "ResolvedNav": {
"name": "ResolvedNav", "name": "ResolvedNav",
"kind": "class", "kind": "class",
"path": "docforge.nav.mkdocs.ResolvedNav", "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.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.mkdocs.ResolvedNav.home", "path": "docforge.nav.mkdocs.ResolvedNav.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.resolver.ResolvedNav.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.mkdocs.ResolvedNav.groups", "path": "docforge.nav.mkdocs.ResolvedNav.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.resolver.ResolvedNav.groups')>",
"docstring": null "docstring": null
}, },
"all_files": { "all_files": {
"name": "all_files", "name": "all_files",
"kind": "function", "kind": "function",
"path": "docforge.nav.mkdocs.ResolvedNav.all_files", "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." "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", "name": "MkDocsNavEmitter",
"kind": "class", "kind": "class",
"path": "docforge.nav.mkdocs.MkDocsNavEmitter", "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.", "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": { "members": {
"emit": { "emit": {
"name": "emit", "name": "emit",
"kind": "function", "kind": "function",
"path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", "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." "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."
} }
} }

View File

@@ -4,46 +4,67 @@
"path": "docforge.nav.resolver", "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---", "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": { "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": { "NavSpec": {
"name": "NavSpec", "name": "NavSpec",
"kind": "class", "kind": "class",
"path": "docforge.nav.resolver.NavSpec", "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``.", "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": { "members": {
"home": { "home": {
"name": "home", "name": "home",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.home", "path": "docforge.nav.resolver.NavSpec.home",
"signature": null, "signature": "<bound method Alias.signature of Alias('home', 'docforge.nav.spec.NavSpec.home')>",
"docstring": null "docstring": null
}, },
"groups": { "groups": {
"name": "groups", "name": "groups",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.groups", "path": "docforge.nav.resolver.NavSpec.groups",
"signature": null, "signature": "<bound method Alias.signature of Alias('groups', 'docforge.nav.spec.NavSpec.groups')>",
"docstring": null "docstring": null
}, },
"icon": { "icon": {
"name": "icon", "name": "icon",
"kind": "attribute", "kind": "attribute",
"path": "docforge.nav.resolver.NavSpec.icon", "path": "docforge.nav.resolver.NavSpec.icon",
"signature": null, "signature": "<bound method Alias.signature of Alias('icon', 'docforge.nav.spec.NavSpec.icon')>",
"docstring": null "docstring": null
}, },
"load": { "load": {
"name": "load", "name": "load",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.NavSpec.load", "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." "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": { "all_patterns": {
"name": "all_patterns", "name": "all_patterns",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.NavSpec.all_patterns", "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." "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", "name": "ResolvedNav",
"kind": "class", "kind": "class",
"path": "docforge.nav.resolver.ResolvedNav", "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.", "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": { "members": {
"home": { "home": {
@@ -73,7 +94,7 @@
"name": "all_files", "name": "all_files",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.ResolvedNav.all_files", "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." "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", "name": "resolve_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.resolver.resolve_nav", "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." "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."
} }
} }

View File

@@ -4,11 +4,32 @@
"path": "docforge.nav.spec", "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---", "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": { "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": { "NavSpec": {
"name": "NavSpec", "name": "NavSpec",
"kind": "class", "kind": "class",
"path": "docforge.nav.spec.NavSpec", "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``.", "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": { "members": {
"home": { "home": {
@@ -36,14 +57,14 @@
"name": "load", "name": "load",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.NavSpec.load", "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." "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": { "all_patterns": {
"name": "all_patterns", "name": "all_patterns",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.NavSpec.all_patterns", "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." "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", "name": "load_nav_spec",
"kind": "function", "kind": "function",
"path": "docforge.nav.spec.load_nav_spec", "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." "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."
} }
} }

View File

@@ -4,11 +4,39 @@
"path": "docforge.nav.wiki", "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.", "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": { "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": { "build_wiki_nav": {
"name": "build_wiki_nav", "name": "build_wiki_nav",
"kind": "function", "kind": "function",
"path": "docforge.nav.wiki.build_wiki_nav", "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." "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."
} }
} }

View File

@@ -4,53 +4,67 @@
"path": "docforge.renderers.base", "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.", "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": { "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": { "Project": {
"name": "Project", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.base.Project.name", "path": "docforge.renderers.base.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.base.Project.modules", "path": "docforge.renderers.base.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_module_list", "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." "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", "name": "RendererConfig",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.RendererConfig", "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.", "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": { "members": {
"out_dir": { "out_dir": {
@@ -82,7 +96,7 @@
"name": "DocRenderer", "name": "DocRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.DocRenderer", "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.", "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": { "members": {
"name": { "name": {
@@ -96,7 +110,7 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.DocRenderer.generate_sources", "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." "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."
} }
} }

View File

@@ -8,28 +8,28 @@
"name": "MkDocsRenderer", "name": "MkDocsRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.MkDocsRenderer", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.MkDocsRenderer.name", "path": "docforge.renderers.MkDocsRenderer.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mkdocs_renderer.MkDocsRenderer.name')>",
"docstring": null "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.MkDocsRenderer.generate_sources", "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." "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": { "generate_readme": {
"name": "generate_readme", "name": "generate_readme",
"kind": "function", "kind": "function",
"path": "docforge.renderers.MkDocsRenderer.generate_readme", "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`." "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", "name": "MCPRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.MCPRenderer", "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).", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.MCPRenderer.name", "path": "docforge.renderers.MCPRenderer.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.renderers.mcp_renderer.MCPRenderer.name')>",
"docstring": null "docstring": null
}, },
"generate_sources": { "generate_sources": {
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.MCPRenderer.generate_sources", "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." "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, "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.", "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": { "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": { "Project": {
"name": "Project", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.base.Project.name", "path": "docforge.renderers.base.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.base.Project.modules", "path": "docforge.renderers.base.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.Project.get_module_list", "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." "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", "name": "RendererConfig",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.RendererConfig", "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.", "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": { "members": {
"out_dir": { "out_dir": {
@@ -142,7 +156,7 @@
"name": "DocRenderer", "name": "DocRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.base.DocRenderer", "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.", "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": { "members": {
"name": { "name": {
@@ -156,7 +170,7 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.base.DocRenderer.generate_sources", "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." "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, "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).", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.name", "path": "docforge.renderers.mcp_renderer.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.kind", "path": "docforge.renderers.mcp_renderer.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.path", "path": "docforge.renderers.mcp_renderer.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.signature", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.docstring", "path": "docforge.renderers.mcp_renderer.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.members", "path": "docforge.renderers.mcp_renderer.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.docstring", "path": "docforge.renderers.mcp_renderer.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.members", "path": "docforge.renderers.mcp_renderer.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Project.name", "path": "docforge.renderers.mcp_renderer.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Project.modules", "path": "docforge.renderers.mcp_renderer.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_module_list", "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." "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", "name": "MCPRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.MCPRenderer", "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).", "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": { "members": {
"name": { "name": {
@@ -362,10 +390,17 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", "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." "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, "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", "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": { "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": { "Module": {
"name": "Module", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.docstring", "path": "docforge.renderers.mkdocs_renderer.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.members", "path": "docforge.renderers.mkdocs_renderer.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Project.name", "path": "docforge.renderers.mkdocs_renderer.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Project.modules", "path": "docforge.renderers.mkdocs_renderer.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", "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." "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", "name": "MkDocsRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", "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.", "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": { "members": {
"name": { "name": {
@@ -496,14 +538,14 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "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." "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": { "generate_readme": {
"name": "generate_readme", "name": "generate_readme",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", "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`." "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`."
} }
} }

View File

@@ -4,74 +4,88 @@
"path": "docforge.renderers.mcp_renderer", "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).", "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": { "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": { "DocObject": {
"name": "DocObject", "name": "DocObject",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.DocObject", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.name", "path": "docforge.renderers.mcp_renderer.DocObject.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.object.DocObject.name')>",
"docstring": null "docstring": null
}, },
"kind": { "kind": {
"name": "kind", "name": "kind",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.kind", "path": "docforge.renderers.mcp_renderer.DocObject.kind",
"signature": null, "signature": "<bound method Alias.signature of Alias('kind', 'docforge.models.object.DocObject.kind')>",
"docstring": null "docstring": null
}, },
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.path", "path": "docforge.renderers.mcp_renderer.DocObject.path",
"signature": null, "signature": "<bound method Alias.signature of Alias('path', 'docforge.models.object.DocObject.path')>",
"docstring": null "docstring": null
}, },
"signature": { "signature": {
"name": "signature", "name": "signature",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.signature", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.docstring", "path": "docforge.renderers.mcp_renderer.DocObject.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.object.DocObject.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.DocObject.members", "path": "docforge.renderers.mcp_renderer.DocObject.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.object.DocObject.members')>",
"docstring": null "docstring": null
}, },
"add_member": { "add_member": {
"name": "add_member", "name": "add_member",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.add_member", "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." "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": { "get_member": {
"name": "get_member", "name": "get_member",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.get_member", "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." "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": { "get_all_members": {
"name": "get_all_members", "name": "get_all_members",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.DocObject.get_all_members", "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." "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", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.docstring", "path": "docforge.renderers.mcp_renderer.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Module.members", "path": "docforge.renderers.mcp_renderer.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Project.name", "path": "docforge.renderers.mcp_renderer.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mcp_renderer.Project.modules", "path": "docforge.renderers.mcp_renderer.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.Project.get_module_list", "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." "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", "name": "MCPRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mcp_renderer.MCPRenderer", "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).", "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": { "members": {
"name": { "name": {
@@ -196,10 +210,17 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", "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." "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
} }
} }
} }

View File

@@ -4,53 +4,60 @@
"path": "docforge.renderers.mkdocs_renderer", "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", "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": { "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": { "Module": {
"name": "Module", "name": "Module",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.Module", "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.", "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": { "members": {
"path": { "path": {
"name": "path", "name": "path",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.path", "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": null
}, },
"docstring": { "docstring": {
"name": "docstring", "name": "docstring",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.docstring", "path": "docforge.renderers.mkdocs_renderer.Module.docstring",
"signature": null, "signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
"docstring": null "docstring": null
}, },
"members": { "members": {
"name": "members", "name": "members",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Module.members", "path": "docforge.renderers.mkdocs_renderer.Module.members",
"signature": null, "signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
"docstring": null "docstring": null
}, },
"add_object": { "add_object": {
"name": "add_object", "name": "add_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.add_object", "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." "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": { "get_object": {
"name": "get_object", "name": "get_object",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.get_object", "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." "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": { "get_all_objects": {
"name": "get_all_objects", "name": "get_all_objects",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects", "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." "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", "name": "Project",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.Project", "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.", "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": { "members": {
"name": { "name": {
"name": "name", "name": "name",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Project.name", "path": "docforge.renderers.mkdocs_renderer.Project.name",
"signature": null, "signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
"docstring": null "docstring": null
}, },
"modules": { "modules": {
"name": "modules", "name": "modules",
"kind": "attribute", "kind": "attribute",
"path": "docforge.renderers.mkdocs_renderer.Project.modules", "path": "docforge.renderers.mkdocs_renderer.Project.modules",
"signature": null, "signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
"docstring": null "docstring": null
}, },
"add_module": { "add_module": {
"name": "add_module", "name": "add_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.add_module", "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." "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
}, },
"get_module": { "get_module": {
"name": "get_module", "name": "get_module",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_module", "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." "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": { "get_all_modules": {
"name": "get_all_modules", "name": "get_all_modules",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", "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." "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
}, },
"get_module_list": { "get_module_list": {
"name": "get_module_list", "name": "get_module_list",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", "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." "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", "name": "MkDocsRenderer",
"kind": "class", "kind": "class",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", "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.", "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": { "members": {
"name": { "name": {
@@ -124,14 +131,14 @@
"name": "generate_sources", "name": "generate_sources",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "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." "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": { "generate_readme": {
"name": "generate_readme", "name": "generate_readme",
"kind": "function", "kind": "function",
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", "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`." "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`."
} }
} }

View File

@@ -8,28 +8,28 @@
"name": "MCPServer", "name": "MCPServer",
"kind": "class", "kind": "class",
"path": "docforge.servers.MCPServer", "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.", "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": { "members": {
"mcp_root": { "mcp_root": {
"name": "mcp_root", "name": "mcp_root",
"kind": "attribute", "kind": "attribute",
"path": "docforge.servers.MCPServer.mcp_root", "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 "docstring": null
}, },
"app": { "app": {
"name": "app", "name": "app",
"kind": "attribute", "kind": "attribute",
"path": "docforge.servers.MCPServer.app", "path": "docforge.servers.MCPServer.app",
"signature": null, "signature": "<bound method Alias.signature of Alias('app', 'docforge.servers.mcp_server.MCPServer.app')>",
"docstring": null "docstring": null
}, },
"run": { "run": {
"name": "run", "name": "run",
"kind": "function", "kind": "function",
"path": "docforge.servers.MCPServer.run", "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`." "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, "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---", "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": { "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": { "MCPServer": {
"name": "MCPServer", "name": "MCPServer",
"kind": "class", "kind": "class",
"path": "docforge.servers.mcp_server.MCPServer", "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.", "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": { "members": {
"mcp_root": { "mcp_root": {
@@ -66,7 +108,7 @@
"name": "run", "name": "run",
"kind": "function", "kind": "function",
"path": "docforge.servers.mcp_server.MCPServer.run", "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`." "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`."
} }
} }

View File

@@ -4,11 +4,53 @@
"path": "docforge.servers.mcp_server", "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---", "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": { "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": { "MCPServer": {
"name": "MCPServer", "name": "MCPServer",
"kind": "class", "kind": "class",
"path": "docforge.servers.mcp_server.MCPServer", "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.", "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": { "members": {
"mcp_root": { "mcp_root": {
@@ -29,7 +71,7 @@
"name": "run", "name": "run",
"kind": "function", "kind": "function",
"path": "docforge.servers.mcp_server.MCPServer.run", "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`." "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`."
} }
} }

View File

@@ -62,12 +62,12 @@ site_dir: ../site/wiki
nav: nav:
- Home: index.md - Home: index.md
- Overview: 01_overview.md - Overview: 01_overview.md
- Components: 02_components.md - Architecture: 02_architecture.md
- Conventions: 03_conventions.md - Conventions: 03_conventions.md
- Iterative Workflow: 04_iterative_workflow.md - Iterative Workflow: 04_iterative_workflow.md
- Development: - Development:
- Environment: 05_development/01_environment.md - Environment: 05_development/01_environment.md
- Quality Gates: 05_development/02_quality_gates.md - Quality Gates: 05_development/02_quality_gates.md
- GSDFC Guide: 05_development/03_gsdfc_guide.md - Gsdfc Guide: 05_development/03_gsdfc_guide.md
- MCP Guide: 05_development/04_mcp_guide.md - Mcp Guide: 05_development/04_mcp_guide.md
- MkDocs Configs: 05_development/05_mkdocs_configs.md - Mkdocs Configs: 05_development/05_mkdocs_configs.md

View File

@@ -1,12 +1,10 @@
# Library Overview # Overview
`docforge` turns GSDFC-compliant Python docstrings into maintainable reference `docforge` turns GSDFC-compliant Python docstrings into maintainable reference
documentation. It never edits source docstrings; it reads them, renders them, documentation. It never edits source docstrings; it reads them, renders them,
and assembles documentation sites from all available material. and assembles documentation sites from all available material.
--- ## What it generates
## 🧭 Which Build Should You Use?
| Kind | Source | Output | | Kind | Source | Output |
|-----------|----------------------------|---------------------------------| |-----------|----------------------------|---------------------------------|
@@ -15,9 +13,7 @@ and assembles documentation sites from all available material.
| `wiki` | Hand-written markdown | `docs/wiki/**` (unchanged) | | `wiki` | Hand-written markdown | `docs/wiki/**` (unchanged) |
| `mcp` | GSDFC docstrings + renderers | `docs/mcp/**` structured JSON | | `mcp` | GSDFC docstrings + renderers | `docs/mcp/**` structured JSON |
--- ## Per-kind MkDocs builds
## 🏗️ Architecture
Each enabled site kind produces its own MkDocs configuration and build: 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 navigation derived or scoped to that kind. Hand-written wiki content is never
overwritten or regenerated — only its navigation is derived automatically. overwritten or regenerated — only its navigation is derived automatically.
--- ## MCP bundle
## 🔄 Lifecycle Rules
`docs/mcp/**` is a self-contained, machine-readable reference generated from `docs/mcp/**` is a self-contained, machine-readable reference generated from
docforge's own GSDFC docstrings. `doc-forge serve --mcp --module docforge` 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). 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)

View File

@@ -1,45 +1,35 @@
# Components # Architecture
`docforge` is split into four horizontal layers. Everything flows top to `docforge` is split into four horizontal layers. Everything flows top to
bottom through the CLI. bottom through the CLI.
--- ## Loaders → Models
## 1. Loaders & Models
The `docforge/loaders` package wraps `griffe` to extract modules, functions, The `docforge/loaders` package wraps `griffe` to extract modules, functions,
classes, and Google-style docstring sections. Loaded data is normalized into classes, and Google-style docstring sections. Loaded data is normalized into
the object model under `docforge/models` (`Project`, `Module`, `DocObject`). the object model under `docforge/models` (`Project`, `Module`, `DocObject`).
--- ## Navigation
## 2. Navigation
`docforge/nav` parses `docforge.nav.yml` specs (`NavSpec`, `Resolver`, and the `docforge/nav` parses `docforge.nav.yml` specs (`NavSpec`, `Resolver`, and the
MkDocs nav emitter) and, since the wiki kind, derives wiki navigation from the MkDocs nav emitter) and, since the wiki kind, derives wiki navigation from the
file structure via `build_wiki_nav`. file structure via `build_wiki_nav`.
--- ## Renderers
## 3. Renderers
`docforge/renderers` turn model data into artifacts: `docforge/renderers` turn model data into artifacts:
- `MkDocsRenderer` → `docs/lib/**` reference markdown - `MkDocsRenderer` → `docs/lib/**` reference markdown
- `MCPRenderer` → `docs/mcp/**` structured documentation - `MCPRenderer` → `docs/mcp/**` structured documentation
--- ## Servers
## 4. Servers
`docforge/servers` serves generated artifacts over live protocols: `docforge/servers` serves generated artifacts over live protocols:
- `MCPServer` → serves a pre-generated `docs/mcp/**` bundle through MCP - `MCPServer` → serves a pre-generated `docs/mcp/**` bundle through MCP
resources (`docs://index`, `docs://nav`, `docs://modules/{module}`) resources (`docs://index`, `docs://nav`, `docs://modules/{module}`)
--- ## CLI
## 5. CLI
`docforge/cli` wires it all together: `docforge/cli` wires it all together:
@@ -47,9 +37,4 @@ file structure via `build_wiki_nav`.
/ `--mcp` modes / `--mcp` modes
- `mkdocs_utils.py` — per-kind config generation (`docs/mkdocs.{lib,api,wiki}.yml`) - `mkdocs_utils.py` — per-kind config generation (`docs/mkdocs.{lib,api,wiki}.yml`)
with navigation re-rooted to each kind's `docs_dir` with navigation re-rooted to each kind's `docs_dir`
- `api_utils.py` — OpenAPI loading and API docs generation - `api_utils.py` — OpenAPI loading and API docs generation
---
## Related
- [01 – Overview](01_overview.md) · [03 – Conventions](03_conventions.md)

View File

@@ -1,7 +1,5 @@
# Conventions # Conventions
---
## GSDFC docstrings ## GSDFC docstrings
All documented source uses the Google-Styled Doc-Forge Convention (GSDFC): All documented source uses the Google-Styled Doc-Forge Convention (GSDFC):
@@ -14,45 +12,31 @@ package docstring, which is exported verbatim into
Key rules: Key rules:
1. Use parenthesized types in prose entries (`name (Type):`) that match the - Use parenthesized types in prose entries (`name (Type):`) that match the
signature types. signature types.
2. Use `# Summary`, `# Examples`, and `# Notes` sections at module level. - Use `# Summary`, `# Examples`, and `# Notes` sections at module level.
3. Use `Args:`, `Returns:`, `Raises:`, `Yields:`, `Notes:`, and `Example:` - Use `Args:`, `Returns:`, `Raises:`, `Yields:`, `Notes:`, and `Example:`
sections at function and method level. sections at function and method level.
4. Always update the matching `.pyi` stub alongside the `.py` implementation. - 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`.
--- ## `.pyi` stubs
## `.pyi` stubs and `py.typed`
Every module ships a matching `.pyi` stub kept in sync with the `.py` Every module ships a matching `.pyi` stub kept in sync with the `.py`
implementation. When signatures change, update both files. Packages expose a implementation. When signatures change, update both files.
`py.typed` marker so consumers and type checkers use the authored signatures.
---
## Wiki pages ## Wiki pages
1. Hand-written markdown lives in `docs/wiki/**` and is never generated. - Hand-written markdown lives in `docs/wiki/**` and is never generated.
2. File names use a numeric prefix: `01_overview.md`, `02_components.md`. - File names use a numeric prefix: `01_overview.md`, `02_architecture.md`.
3. Nested directories become nested navigation groups: - Nested directories become nested navigation groups:
`05_development/01_environment.md` → group *Development*. `05_development/01_environment.md` → group *Development*.
4. `index.md` is the site `Home` at the root, and a section root inside a - `index.md` is the site `Home` at the root, and a section root inside a
directory. directory.
5. Navigation labels are derived by stripping the numeric prefix and applying - Navigation labels are derived by stripping the numeric prefix and applying
title case on the remaining words. title case on the remaining words.
---
## Templates ## Templates
MkDocs config fragments live in `docforge/templates`. The `mkdocs.wiki.yml` MkDocs config fragments live in `docforge/templates`. The `mkdocs.wiki.yml`
fragment carries only the `search` plugin, since wiki pages contain no fragment carries only the `search` plugin, since wiki pages contain no
mkdocstrings directives. mkdocstrings directives.
---
## Related
- [02 – Components](02_components.md) · [04 – Iterative Workflow](04_iterative_workflow.md)

View File

@@ -2,9 +2,7 @@
A docs build runs through the CLI in a single pass. A docs build runs through the CLI in a single pass.
--- ## Build commands
## 🚀 Build commands
```bash ```bash
# Library reference only # Library reference only
@@ -20,9 +18,7 @@ doc-forge build --wiki --site-name docforge
doc-forge build --mcp --module docforge doc-forge build --mcp --module docforge
``` ```
--- ## What a build does
## 🔄 What a build does
1. Validates the requested modes (`--mkdocs`, `--api`, `--wiki`, `--mcp`). 1. Validates the requested modes (`--mkdocs`, `--api`, `--wiki`, `--mcp`).
2. Generates library sources under `docs/lib/**` with `MkDocsRenderer`. 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 6. Runs `mkdocs build` once per config, emitting self-contained sites
`site/lib/`, `site/api/`, and `site/wiki/`. `site/lib/`, `site/api/`, and `site/wiki/`.
--- ## Explore the sites
## 🧭 Explore the sites
```bash ```bash
doc-forge build --wiki --mkdocs --module docforge 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 doc-forge serve --mkdocs --mkdocs-yml docs/mkdocs.wiki.yml
``` ```
--- ## Serve the MCP bundle
## 📦 Serve the MCP bundle
```bash ```bash
doc-forge build --mcp --module docforge doc-forge build --mcp --module docforge
doc-forge serve --mcp --module docforge doc-forge serve --mcp --module docforge
``` ```
---
## Related
- [03 – Conventions](03_conventions.md) · [01 – Environment](05_development/01_environment.md)

View File

@@ -1,8 +1,6 @@
# Environment Setup # Environment Setup
--- ## Create the environment
## 🚀 Create the environment
```bash ```bash
python -m venv .venv python -m venv .venv
@@ -12,9 +10,7 @@ pip install -e .
Requires Python 3.10+ (per `pyproject.toml`). Requires Python 3.10+ (per `pyproject.toml`).
--- ## Dependencies
## 📦 Dependencies
Development extras include: Development extras include:
@@ -22,9 +18,4 @@ Development extras include:
- `ruff` — lint and format checking - `ruff` — lint and format checking
- `black` — auto-formatting - `black` — auto-formatting
- `mypy` — strict typing checks - `mypy` — strict typing checks
- `pydoclint` — docstring ↔ signature consistency checks - `pydoclint` — docstring ↔ signature consistency checks
---
## Related
- [04 – Iterative Workflow](../04_iterative_workflow.md) · [02 – Quality Gates](02_quality_gates.md)

View File

@@ -2,10 +2,6 @@
Run all checks before pushing: Run all checks before pushing:
---
## 🚀 Commands
```bash ```bash
.venv\Scripts\python.exe -m pytest .venv\Scripts\python.exe -m pytest
.venv\Scripts\python.exe -m ruff check docforge tests .venv\Scripts\python.exe -m ruff check docforge tests
@@ -14,9 +10,7 @@ Run all checks before pushing:
.venv\Scripts\pydoclint.exe docforge .venv\Scripts\pydoclint.exe docforge
``` ```
--- ## Test layout
## 📁 Test layout
| Path | Covers | | Path | Covers |
|--------------------------|------------------------------------| |--------------------------|------------------------------------|
@@ -26,9 +20,4 @@ Run all checks before pushing:
CLI tests use the `cli_runner` fixture with `mock_mkdocs_build` and 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 `mock_mkdocs_load_config` so they exercise the full flow without invoking a
real MkDocs build. real MkDocs build.
---
## Related
- [01 – Environment](01_environment.md) · [03 – GSDFC Guide](03_gsdfc_guide.md)

View File

@@ -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 docstrings that render correctly in MkDocs and stay machine-parseable by
doc-forge, MkDocs, and MCP clients. doc-forge, MkDocs, and MCP clients.
--- ## Overview
## 🧭 Overview
- Docstrings are the single source of truth. - Docstrings are the single source of truth.
- `doc-forge` compiles docstrings but never rewrites them. - `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 - Type hints live in signatures; prose entries repeat the type in
parentheses and must match the signature. parentheses and must match the signature.
--- ## Module docstrings
## 📦 Module docstrings
Modules use Markdown headings and `---` separators. Modules use Markdown headings and `---` separators.
@@ -27,9 +23,7 @@ Recommended sections:
- `# Examples` — a representative usage snippet - `# Examples` — a representative usage snippet
- `# Notes` — guarantees, lifecycle, and thread-safety notes - `# Notes` — guarantees, lifecycle, and thread-safety notes
--- ## Class docstrings
## 📦 Class docstrings
Recommended sections, in order: Recommended sections, in order:
@@ -38,9 +32,7 @@ Recommended sections, in order:
- `Notes:` — grouped subsections such as **Guarantees**, **Lifecycle** - `Notes:` — grouped subsections such as **Guarantees**, **Lifecycle**
- `Example:` — indented `python` code block - `Example:` — indented `python` code block
--- ## Function and method docstrings
## 📦 Function and method docstrings
Recommended section order: Recommended section order:
@@ -61,16 +53,12 @@ Formatting rules:
- Fenced `python` blocks are allowed inside `Example:` sections, indented - Fenced `python` blocks are allowed inside `Example:` sections, indented
four spaces. four spaces.
--- ## Property docstrings
## 📦 Property docstrings
Properties document their return values with a `Returns:` section and, when Properties document their return values with a `Returns:` section and, when
meaningful, an `Example:`. meaningful, an `Example:`.
--- ## Example
## 🚀 Example
```python ```python
def process(foo: Foo, multiplier: int) -> int: 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 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 symbol changes, update both files. Signature annotations in the stub must
match the implementation. match the implementation.
--- ## Enforcement
## 🛡️ Enforcement
`pydoclint` (Google style) runs in CI and verifies that `Args:`/`Returns:` `pydoclint` (Google style) runs in CI and verifies that `Args:`/`Returns:`
sections match function signatures, including types. 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 - `skip-checking-raises = true` — `Raises:` sections are descriptive and are
not required to map to literal `raise` statements. not required to map to literal `raise` statements.
- `check-class-attributes = false` — `Attributes:` sections document instance - `check-class-attributes = false` — `Attributes:` sections document instance
attributes without class-level annotations. attributes without class-level annotations.
---
## Related
- [02 – Quality Gates](02_quality_gates.md) · [04 – MCP Guide](04_mcp_guide.md)

View File

@@ -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 — The bundle is self-contained: readers can derive the full API reference —
signatures, docstrings, and structure — for the documented project. signatures, docstrings, and structure — for the documented project.
--- ## Building the bundle
## 🚀 Building the bundle
```bash ```bash
doc-forge build --mcp --module docforge 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 - `nav.json` — module list with `docs://modules/{module}` resource URIs
- `modules/{dotted.path}.json` — per-module serialized documentation - `modules/{dotted.path}.json` — per-module serialized documentation
--- ## Serving the bundle
## 🚀 Serving the bundle
```bash ```bash
doc-forge serve --mcp --module docforge 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 exceptions. The default transport is `streamable-http`; `stdio` and `sse` are
supported via `MCPServer.run`. supported via `MCPServer.run`.
--- ## Bundle contents
## 📦 Bundle contents
Each module resource contains: Each module resource contains:
@@ -54,9 +48,4 @@ Each module resource contains:
Because the bundle is generated from docstrings, the quality of the bundle Because the bundle is generated from docstrings, the quality of the bundle
equals the quality of the project's GSDFC docstrings. For docforge itself, equals the quality of the project's GSDFC docstrings. For docforge itself,
the GSDFC specification is carried in `modules/docforge.json` via the the GSDFC specification is carried in `modules/docforge.json` via the
`docforge/__init__.py` package docstring, making the bundle self-documenting. `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)

View File

@@ -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 that sets `docs_dir` to the kind's source directory and `site_dir` to
`../site/{kind}`. `../site/{kind}`.
--- ## File wins
## 📄 File wins
`docs/mkdocs.{kind}.yml` is a repo-owned file, not a build byproduct: `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 Because a present file is never rewritten, rerunning a build is a no-op for
versioned configs: the working tree stays clean. versioned configs: the working tree stays clean.
--- ## Templates
## 🧩 Templates
The built-in defaults live in `docforge/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 theme `icon` from `docforge.nav.yml`). Pass `--template <path>` to replace the
built-in templates entirely. built-in templates entirely.
--- ## Supported layouts
## 🏗️ Supported layouts
- **Per-kind config** — the standard layout; each kind builds to - **Per-kind config** — the standard layout; each kind builds to
`site/{kind}` and is served under `/<repo>/{kind}/`. `site/{kind}` and is served under `/<repo>/{kind}/`.
@@ -51,9 +45,4 @@ built-in templates entirely.
doc-forge never reads or writes root `mkdocs.yml`; the docs service maps the doc-forge never reads or writes root `mkdocs.yml`; the docs service maps the
kind to the root `site/` dir in this case. kind to the root `site/` dir in this case.
Commit `docs/mkdocs.{kind}.yml` so served docs are reproducible from source. Commit `docs/mkdocs.{kind}.yml` so served docs are reproducible from source.
---
## Related
- [04 – MCP Guide](04_mcp_guide.md)

View File

@@ -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. `docforge` is an internal documentation tool that generates reference
documentation from Google-Styled Doc-Forge Convention (GSDFC) docstrings and
> **Doc model:** this wiki is written for humans — how‑to guides, examples, assembles it into per-kind MkDocs sites, alongside hand-written wiki pages and
> and testing recipes. The authoritative API contracts live in the code OpenAPI-based API docs.
> (docstrings) and the machine‑readable bundle under `docs/mcp/`.
--- ---
@@ -18,308 +17,26 @@
--- ---
## 📦 Installation
```bash
# Internal PyPI (TBD)
pip install docforge
```
---
## 📁 Documentation Structure ## 📁 Documentation Structure
| Section | Description | | Section | Description |
|----------------------------------------------| -------------------------------------------------- | |----------------------------------------------| -------------------------------------------------- |
| [Overview](01_overview.md) | What docforge is and how it fits the pipeline | | [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 | | [Conventions](03_conventions.md) | GSDFC, `.pyi` stubs, and template conventions |
| [Iterative Workflow](04_iterative_workflow.md) | How a docs build runs end to end | | [Iterative Workflow](04_iterative_workflow.md) | How a docs build runs end to end |
| [Environment](05_development/01_environment.md) | Environment setup | | [Development](05_development/01_environment.md) | Environment setup and quality gates |
| [Quality Gates](05_development/02_quality_gates.md) | Test layout and quality checks | | [Docstring Guide](05_development/03_gsdfc_guide.md) | How to write GSDFC-conformant docstrings |
| [GSDFC 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 | | [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 ## 🔗 Related Resources
- **Source Code:** the `doc-forge` repository - **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/` - **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 © Aetoskia Internal
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

View File

@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "doc-forge" name = "doc-forge"
version = "0.0.7" version = "0.0.6"
description = "A renderer-agnostic Python documentation compiler" description = "A renderer-agnostic Python documentation compiler"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
@@ -87,7 +87,6 @@ dev = [
"build>=1.0.0", "build>=1.0.0",
"twine>=4.0.0", "twine>=4.0.0",
"pre-commit>=3.4.0", "pre-commit>=3.4.0",
"doc-forge[mkdocs,mcp]",
] ]
docs = [ docs = [
"doc-forge[mkdocs]", "doc-forge[mkdocs]",

View File

@@ -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