diff --git a/docs/cli/commands.md b/docs/lib/cli/commands.md similarity index 100% rename from docs/cli/commands.md rename to docs/lib/cli/commands.md diff --git a/docs/cli/index.md b/docs/lib/cli/index.md similarity index 100% rename from docs/cli/index.md rename to docs/lib/cli/index.md diff --git a/docs/cli/main.md b/docs/lib/cli/main.md similarity index 100% rename from docs/cli/main.md rename to docs/lib/cli/main.md diff --git a/docs/cli/mcp_utils.md b/docs/lib/cli/mcp_utils.md similarity index 100% rename from docs/cli/mcp_utils.md rename to docs/lib/cli/mcp_utils.md diff --git a/docs/cli/mkdocs_utils.md b/docs/lib/cli/mkdocs_utils.md similarity index 100% rename from docs/cli/mkdocs_utils.md rename to docs/lib/cli/mkdocs_utils.md diff --git a/docs/index.md b/docs/lib/index.md similarity index 100% rename from docs/index.md rename to docs/lib/index.md diff --git a/docs/loaders/griffe_loader.md b/docs/lib/loaders/griffe_loader.md similarity index 100% rename from docs/loaders/griffe_loader.md rename to docs/lib/loaders/griffe_loader.md diff --git a/docs/loaders/index.md b/docs/lib/loaders/index.md similarity index 100% rename from docs/loaders/index.md rename to docs/lib/loaders/index.md diff --git a/docs/models/index.md b/docs/lib/models/index.md similarity index 100% rename from docs/models/index.md rename to docs/lib/models/index.md diff --git a/docs/models/module.md b/docs/lib/models/module.md similarity index 100% rename from docs/models/module.md rename to docs/lib/models/module.md diff --git a/docs/models/object.md b/docs/lib/models/object.md similarity index 100% rename from docs/models/object.md rename to docs/lib/models/object.md diff --git a/docs/models/project.md b/docs/lib/models/project.md similarity index 100% rename from docs/models/project.md rename to docs/lib/models/project.md diff --git a/docs/nav/index.md b/docs/lib/nav/index.md similarity index 100% rename from docs/nav/index.md rename to docs/lib/nav/index.md diff --git a/docs/nav/mkdocs.md b/docs/lib/nav/mkdocs.md similarity index 100% rename from docs/nav/mkdocs.md rename to docs/lib/nav/mkdocs.md diff --git a/docs/nav/resolver.md b/docs/lib/nav/resolver.md similarity index 100% rename from docs/nav/resolver.md rename to docs/lib/nav/resolver.md diff --git a/docs/nav/spec.md b/docs/lib/nav/spec.md similarity index 100% rename from docs/nav/spec.md rename to docs/lib/nav/spec.md diff --git a/docs/renderers/base.md b/docs/lib/renderers/base.md similarity index 100% rename from docs/renderers/base.md rename to docs/lib/renderers/base.md diff --git a/docs/renderers/index.md b/docs/lib/renderers/index.md similarity index 100% rename from docs/renderers/index.md rename to docs/lib/renderers/index.md diff --git a/docs/renderers/mcp_renderer.md b/docs/lib/renderers/mcp_renderer.md similarity index 100% rename from docs/renderers/mcp_renderer.md rename to docs/lib/renderers/mcp_renderer.md diff --git a/docs/renderers/mkdocs_renderer.md b/docs/lib/renderers/mkdocs_renderer.md similarity index 100% rename from docs/renderers/mkdocs_renderer.md rename to docs/lib/renderers/mkdocs_renderer.md diff --git a/docs/servers/index.md b/docs/lib/servers/index.md similarity index 100% rename from docs/servers/index.md rename to docs/lib/servers/index.md diff --git a/docs/servers/mcp_server.md b/docs/lib/servers/mcp_server.md similarity index 100% rename from docs/servers/mcp_server.md rename to docs/lib/servers/mcp_server.md diff --git a/mcp_docs/index.json b/docs/mcp/index.json similarity index 100% rename from mcp_docs/index.json rename to docs/mcp/index.json diff --git a/mcp_docs/modules/docforge.cli.commands.json b/docs/mcp/modules/docforge.cli.commands.json similarity index 97% rename from mcp_docs/modules/docforge.cli.commands.json rename to docs/mcp/modules/docforge.cli.commands.json index 5daa267..66e93c2 100644 --- a/mcp_docs/modules/docforge.cli.commands.json +++ b/docs/mcp/modules/docforge.cli.commands.json @@ -4,13 +4,6 @@ "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.", "objects": { - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.click", - "signature": "", - "docstring": null - }, "Path": { "name": "Path", "kind": "alias", @@ -18,198 +11,13 @@ "signature": "", "docstring": null }, - "Sequence": { - "name": "Sequence", + "click": { + "name": "click", "kind": "alias", - "path": "docforge.cli.commands.Sequence", - "signature": "", + "path": "docforge.cli.commands.click", + "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.cli.commands.Optional", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "mkdocs_utils": { - "name": "mkdocs_utils", - "kind": "module", - "path": "docforge.cli.commands.mkdocs_utils", - "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", - "members": { - "Path": { - "name": "Path", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.Path", - "signature": "", - "docstring": null - }, - "resources": { - "name": "resources", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.resources", - "signature": "", - "docstring": null - }, - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.click", - "signature": "", - "docstring": null - }, - "yaml": { - "name": "yaml", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.yaml", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "discover_module_paths": { - "name": "discover_module_paths", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", - "signature": "", - "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, optional):\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." - }, - "MkDocsRenderer": { - "name": "MkDocsRenderer", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", - "signature": "", - "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", - "signature": "", - "docstring": null - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", - "signature": "", - "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." - }, - "generate_readme": { - "name": "generate_readme", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." - } - } - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." - }, - "generate_config": { - "name": "generate_config", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." - }, - "build": { - "name": "build", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.build", - "signature": "", - "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." - }, - "serve": { - "name": "serve", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.serve", - "signature": "", - "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." - } - } - }, "mcp_utils": { "name": "mcp_utils", "kind": "module", @@ -330,6 +138,191 @@ } } }, + "mkdocs_utils": { + "name": "mkdocs_utils", + "kind": "module", + "path": "docforge.cli.commands.mkdocs_utils", + "signature": "", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "members": { + "os": { + "name": "os", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.os", + "signature": "", + "docstring": null + }, + "resources": { + "name": "resources", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.resources", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, + "click": { + "name": "click", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.click", + "signature": "", + "docstring": null + }, + "yaml": { + "name": "yaml", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.yaml", + "signature": "", + "docstring": null + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, + "discover_module_paths": { + "name": "discover_module_paths", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", + "signature": "", + "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, + "MkDocsRenderer": { + "name": "MkDocsRenderer", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", + "signature": "", + "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", + "signature": "", + "docstring": null + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", + "signature": "", + "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + }, + "generate_readme": { + "name": "generate_readme", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + } + } + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_sources", + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + }, + "generate_config": { + "name": "generate_config", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_config", + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + }, + "build": { + "name": "build", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build", + "signature": "", + "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." + }, + "serve": { + "name": "serve", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.serve", + "signature": "", + "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." + } + } + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, "cli": { "name": "cli", "kind": "attribute", @@ -341,36 +334,36 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", + "signature": "", "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\n\n1. Introspects the Python project using Griffe\n2. Generates renderer-specific documentation sources\n3. Optionally builds the final documentation output\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs documentation generation.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Directory where Markdown documentation sources will be generated.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", + "signature": "", "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional name to display as the project root." }, - "Group": { - "name": "Group", - "kind": "alias", - "path": "docforge.cli.commands.Group", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.cli.commands.Any", "signature": "", "docstring": null + }, + "Group": { + "name": "Group", + "kind": "alias", + "path": "docforge.cli.commands.Group", + "signature": "", + "docstring": null } } } diff --git a/mcp_docs/modules/docforge.cli.json b/docs/mcp/modules/docforge.cli.json similarity index 97% rename from mcp_docs/modules/docforge.cli.json rename to docs/mcp/modules/docforge.cli.json index e985c55..95037a6 100644 --- a/mcp_docs/modules/docforge.cli.json +++ b/docs/mcp/modules/docforge.cli.json @@ -34,13 +34,6 @@ "signature": null, "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.", "members": { - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.click", - "signature": "", - "docstring": null - }, "Path": { "name": "Path", "kind": "alias", @@ -48,198 +41,13 @@ "signature": "", "docstring": null }, - "Sequence": { - "name": "Sequence", + "click": { + "name": "click", "kind": "alias", - "path": "docforge.cli.commands.Sequence", - "signature": "", + "path": "docforge.cli.commands.click", + "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.cli.commands.Optional", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "mkdocs_utils": { - "name": "mkdocs_utils", - "kind": "module", - "path": "docforge.cli.commands.mkdocs_utils", - "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", - "members": { - "Path": { - "name": "Path", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.Path", - "signature": "", - "docstring": null - }, - "resources": { - "name": "resources", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.resources", - "signature": "", - "docstring": null - }, - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.click", - "signature": "", - "docstring": null - }, - "yaml": { - "name": "yaml", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.yaml", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "discover_module_paths": { - "name": "discover_module_paths", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", - "signature": "", - "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, optional):\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." - }, - "MkDocsRenderer": { - "name": "MkDocsRenderer", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", - "signature": "", - "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", - "signature": "", - "docstring": null - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", - "signature": "", - "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." - }, - "generate_readme": { - "name": "generate_readme", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." - } - } - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." - }, - "generate_config": { - "name": "generate_config", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." - }, - "build": { - "name": "build", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.build", - "signature": "", - "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." - }, - "serve": { - "name": "serve", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.serve", - "signature": "", - "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." - } - } - }, "mcp_utils": { "name": "mcp_utils", "kind": "module", @@ -360,6 +168,191 @@ } } }, + "mkdocs_utils": { + "name": "mkdocs_utils", + "kind": "module", + "path": "docforge.cli.commands.mkdocs_utils", + "signature": "", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "members": { + "os": { + "name": "os", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.os", + "signature": "", + "docstring": null + }, + "resources": { + "name": "resources", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.resources", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, + "click": { + "name": "click", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.click", + "signature": "", + "docstring": null + }, + "yaml": { + "name": "yaml", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.yaml", + "signature": "", + "docstring": null + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, + "discover_module_paths": { + "name": "discover_module_paths", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", + "signature": "", + "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, + "MkDocsRenderer": { + "name": "MkDocsRenderer", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", + "signature": "", + "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", + "signature": "", + "docstring": null + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", + "signature": "", + "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + }, + "generate_readme": { + "name": "generate_readme", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + } + } + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_sources", + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + }, + "generate_config": { + "name": "generate_config", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_config", + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + }, + "build": { + "name": "build", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build", + "signature": "", + "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." + }, + "serve": { + "name": "serve", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.serve", + "signature": "", + "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." + } + } + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, "cli": { "name": "cli", "kind": "attribute", @@ -371,36 +364,36 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", + "signature": "", "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\n\n1. Introspects the Python project using Griffe\n2. Generates renderer-specific documentation sources\n3. Optionally builds the final documentation output\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs documentation generation.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Directory where Markdown documentation sources will be generated.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", + "signature": "", "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional name to display as the project root." }, - "Group": { - "name": "Group", - "kind": "alias", - "path": "docforge.cli.commands.Group", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.cli.commands.Any", "signature": "", "docstring": null + }, + "Group": { + "name": "Group", + "kind": "alias", + "path": "docforge.cli.commands.Group", + "signature": "", + "docstring": null } } }, @@ -512,14 +505,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "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." } } @@ -531,11 +524,11 @@ "signature": null, "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", "members": { - "Path": { - "name": "Path", + "os": { + "name": "os", "kind": "alias", - "path": "docforge.cli.mkdocs_utils.Path", - "signature": "", + "path": "docforge.cli.mkdocs_utils.os", + "signature": "", "docstring": null }, "resources": { @@ -545,6 +538,13 @@ "signature": "", "docstring": null }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, "click": { "name": "click", "kind": "alias", @@ -589,6 +589,36 @@ "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", @@ -615,37 +645,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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 `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -653,28 +653,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", + "signature": "", "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "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." } } diff --git a/mcp_docs/modules/docforge.cli.main.json b/docs/mcp/modules/docforge.cli.main.json similarity index 100% rename from mcp_docs/modules/docforge.cli.main.json rename to docs/mcp/modules/docforge.cli.main.json diff --git a/mcp_docs/modules/docforge.cli.mcp_utils.json b/docs/mcp/modules/docforge.cli.mcp_utils.json similarity index 99% rename from mcp_docs/modules/docforge.cli.mcp_utils.json rename to docs/mcp/modules/docforge.cli.mcp_utils.json index 29ee704..107ed3f 100644 --- a/mcp_docs/modules/docforge.cli.mcp_utils.json +++ b/docs/mcp/modules/docforge.cli.mcp_utils.json @@ -105,14 +105,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "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." } } diff --git a/mcp_docs/modules/docforge.cli.mkdocs_utils.json b/docs/mcp/modules/docforge.cli.mkdocs_utils.json similarity index 94% rename from mcp_docs/modules/docforge.cli.mkdocs_utils.json rename to docs/mcp/modules/docforge.cli.mkdocs_utils.json index 219bacf..d906397 100644 --- a/mcp_docs/modules/docforge.cli.mkdocs_utils.json +++ b/docs/mcp/modules/docforge.cli.mkdocs_utils.json @@ -4,11 +4,11 @@ "path": "docforge.cli.mkdocs_utils", "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", "objects": { - "Path": { - "name": "Path", + "os": { + "name": "os", "kind": "alias", - "path": "docforge.cli.mkdocs_utils.Path", - "signature": "", + "path": "docforge.cli.mkdocs_utils.os", + "signature": "", "docstring": null }, "resources": { @@ -18,6 +18,13 @@ "signature": "", "docstring": null }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, "click": { "name": "click", "kind": "alias", @@ -62,6 +69,36 @@ "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", @@ -88,37 +125,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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 `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -126,28 +133,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", + "signature": "", "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "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." } } diff --git a/mcp_docs/modules/docforge.json b/docs/mcp/modules/docforge.json similarity index 96% rename from mcp_docs/modules/docforge.json rename to docs/mcp/modules/docforge.json index 19ae863..2f65a43 100644 --- a/mcp_docs/modules/docforge.json +++ b/docs/mcp/modules/docforge.json @@ -60,7 +60,7 @@ "kind": "function", "path": "docforge.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -147,13 +147,6 @@ "signature": null, "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.", "members": { - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.click", - "signature": "", - "docstring": null - }, "Path": { "name": "Path", "kind": "alias", @@ -161,198 +154,13 @@ "signature": "", "docstring": null }, - "Sequence": { - "name": "Sequence", + "click": { + "name": "click", "kind": "alias", - "path": "docforge.cli.commands.Sequence", - "signature": "", + "path": "docforge.cli.commands.click", + "signature": "", "docstring": null }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.cli.commands.Optional", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "mkdocs_utils": { - "name": "mkdocs_utils", - "kind": "module", - "path": "docforge.cli.commands.mkdocs_utils", - "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", - "members": { - "Path": { - "name": "Path", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.Path", - "signature": "", - "docstring": null - }, - "resources": { - "name": "resources", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.resources", - "signature": "", - "docstring": null - }, - "click": { - "name": "click", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.click", - "signature": "", - "docstring": null - }, - "yaml": { - "name": "yaml", - "kind": "alias", - "path": "docforge.cli.commands.mkdocs_utils.yaml", - "signature": "", - "docstring": null - }, - "GriffeLoader": { - "name": "GriffeLoader", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", - "signature": "", - "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.", - "members": { - "load_project": { - "name": "load_project", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", - "signature": "", - "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." - }, - "load_module": { - "name": "load_module", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", - "signature": "", - "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." - } - } - }, - "discover_module_paths": { - "name": "discover_module_paths", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", - "signature": "", - "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, optional):\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." - }, - "MkDocsRenderer": { - "name": "MkDocsRenderer", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", - "signature": "", - "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", - "signature": "", - "docstring": null - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", - "signature": "", - "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." - }, - "generate_readme": { - "name": "generate_readme", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." - } - } - }, - "generate_sources": { - "name": "generate_sources", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." - }, - "generate_config": { - "name": "generate_config", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." - }, - "build": { - "name": "build", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.build", - "signature": "", - "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." - }, - "serve": { - "name": "serve", - "kind": "function", - "path": "docforge.cli.commands.mkdocs_utils.serve", - "signature": "", - "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." - } - } - }, "mcp_utils": { "name": "mcp_utils", "kind": "module", @@ -473,6 +281,191 @@ } } }, + "mkdocs_utils": { + "name": "mkdocs_utils", + "kind": "module", + "path": "docforge.cli.commands.mkdocs_utils", + "signature": "", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "members": { + "os": { + "name": "os", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.os", + "signature": "", + "docstring": null + }, + "resources": { + "name": "resources", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.resources", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, + "click": { + "name": "click", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.click", + "signature": "", + "docstring": null + }, + "yaml": { + "name": "yaml", + "kind": "alias", + "path": "docforge.cli.commands.mkdocs_utils.yaml", + "signature": "", + "docstring": null + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, + "discover_module_paths": { + "name": "discover_module_paths", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", + "signature": "", + "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, + "MkDocsRenderer": { + "name": "MkDocsRenderer", + "kind": "class", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer", + "signature": "", + "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.name", + "signature": "", + "docstring": null + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", + "signature": "", + "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + }, + "generate_readme": { + "name": "generate_readme", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + } + } + }, + "generate_sources": { + "name": "generate_sources", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_sources", + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + }, + "generate_config": { + "name": "generate_config", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.generate_config", + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + }, + "build": { + "name": "build", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build", + "signature": "", + "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." + }, + "serve": { + "name": "serve", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.serve", + "signature": "", + "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." + } + } + }, + "GriffeLoader": { + "name": "GriffeLoader", + "kind": "class", + "path": "docforge.cli.commands.GriffeLoader", + "signature": "", + "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.", + "members": { + "load_project": { + "name": "load_project", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_project", + "signature": "", + "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + }, + "load_module": { + "name": "load_module", + "kind": "function", + "path": "docforge.cli.commands.GriffeLoader.load_module", + "signature": "", + "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." + } + } + }, "cli": { "name": "cli", "kind": "attribute", @@ -484,36 +477,36 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", + "signature": "", "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\n\n1. Introspects the Python project using Griffe\n2. Generates renderer-specific documentation sources\n3. Optionally builds the final documentation output\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs documentation generation.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Directory where Markdown documentation sources will be generated.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", + "signature": "", "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional name to display as the project root." }, - "Group": { - "name": "Group", - "kind": "alias", - "path": "docforge.cli.commands.Group", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", "path": "docforge.cli.commands.Any", "signature": "", "docstring": null + }, + "Group": { + "name": "Group", + "kind": "alias", + "path": "docforge.cli.commands.Group", + "signature": "", + "docstring": null } } }, @@ -625,14 +618,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", + "signature": "", "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 (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "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." } } @@ -644,11 +637,11 @@ "signature": null, "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", "members": { - "Path": { - "name": "Path", + "os": { + "name": "os", "kind": "alias", - "path": "docforge.cli.mkdocs_utils.Path", - "signature": "", + "path": "docforge.cli.mkdocs_utils.os", + "signature": "", "docstring": null }, "resources": { @@ -658,6 +651,13 @@ "signature": "", "docstring": null }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.cli.mkdocs_utils.Path", + "signature": "", + "docstring": null + }, "click": { "name": "click", "kind": "alias", @@ -702,6 +702,36 @@ "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, + "MkDocsNavEmitter": { + "name": "MkDocsNavEmitter", + "kind": "class", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", + "signature": "", + "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", + "members": { + "emit": { + "name": "emit", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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." + } + } + }, + "load_nav_spec": { + "name": "load_nav_spec", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.load_nav_spec", + "signature": "", + "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + }, + "resolve_nav": { + "name": "resolve_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.resolve_nav", + "signature": "", + "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", @@ -728,37 +758,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." - } - } - }, - "load_nav_spec": { - "name": "load_nav_spec", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.load_nav_spec", - "signature": "", - "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 to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." - }, - "resolve_nav": { - "name": "resolve_nav", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.resolve_nav", - "signature": "", - "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." - }, - "MkDocsNavEmitter": { - "name": "MkDocsNavEmitter", - "kind": "class", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter", - "signature": "", - "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", - "members": { - "emit": { - "name": "emit", - "kind": "function", - "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\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 `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -766,28 +766,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module." + "signature": "", + "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 (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", + "signature": "", "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nArgs:\n docs_dir (Path):\n Directory containing generated documentation Markdown files.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a custom MkDocs configuration template. If not\n provided, a built-in template will be used.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\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." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "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." } } @@ -852,25 +852,11 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", + "AliasResolutionError": { + "name": "AliasResolutionError", "kind": "alias", - "path": "docforge.loaders.griffe_loader.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.Optional", - "signature": "", - "docstring": null - }, - "ModulesCollection": { - "name": "ModulesCollection", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.ModulesCollection", - "signature": "", + "path": "docforge.loaders.griffe_loader.AliasResolutionError", + "signature": "", "docstring": null }, "LinesCollection": { @@ -880,6 +866,13 @@ "signature": "", "docstring": null }, + "ModulesCollection": { + "name": "ModulesCollection", + "kind": "alias", + "path": "docforge.loaders.griffe_loader.ModulesCollection", + "signature": "", + "docstring": null + }, "Object": { "name": "Object", "kind": "alias", @@ -887,12 +880,77 @@ "signature": "", "docstring": null }, - "AliasResolutionError": { - "name": "AliasResolutionError", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.AliasResolutionError", - "signature": "", - "docstring": null + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.loaders.griffe_loader.DocObject", + "signature": "", + "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.add_member", + "signature": "", + "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: Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." + } + } }, "Module": { "name": "Module", @@ -996,78 +1054,6 @@ } } }, - "DocObject": { - "name": "DocObject", - "kind": "class", - "path": "docforge.loaders.griffe_loader.DocObject", - "signature": "", - "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.name", - "signature": "", - "docstring": null - }, - "kind": { - "name": "kind", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.kind", - "signature": "", - "docstring": null - }, - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.path", - "signature": "", - "docstring": null - }, - "signature": { - "name": "signature", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.signature", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.members", - "signature": "", - "docstring": null - }, - "add_member": { - "name": "add_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.add_member", - "signature": "", - "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: Documentation object to add as a member." - }, - "get_member": { - "name": "get_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_member", - "signature": "", - "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." - }, - "get_all_members": { - "name": "get_all_members", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", - "signature": "", - "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." - } - } - }, "logger": { "name": "logger", "kind": "attribute", @@ -1079,28 +1065,28 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", + "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", + "signature": "", "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.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", + "signature": "", "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", + "signature": "", "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." } } @@ -1297,25 +1283,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.module.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.module.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.module.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { @@ -1450,25 +1422,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.object.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.object.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.object.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { @@ -1552,18 +1510,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.project.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.project.Iterable", - "signature": "", + "signature": "", "docstring": null }, "Module": { @@ -1790,20 +1741,6 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.mkdocs.List", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.mkdocs.Dict", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", @@ -1866,39 +1803,25 @@ "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.", "members": { - "Path": { - "name": "Path", + "glob": { + "name": "glob", "kind": "alias", - "path": "docforge.nav.resolver.Path", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.resolver.Dict", - "signature": "", + "path": "docforge.nav.resolver.glob", + "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.nav.resolver.Iterable", - "signature": "", + "signature": "", "docstring": null }, - "List": { - "name": "List", + "Path": { + "name": "Path", "kind": "alias", - "path": "docforge.nav.resolver.List", - "signature": "", - "docstring": null - }, - "glob": { - "name": "glob", - "kind": "alias", - "path": "docforge.nav.resolver.glob", - "signature": "", + "path": "docforge.nav.resolver.Path", + "signature": "", "docstring": null }, "NavSpec": { @@ -1942,7 +1865,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -1963,7 +1886,7 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", + "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } @@ -1972,15 +1895,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", + "signature": "", "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\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." - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.resolver.Optional", - "signature": "", - "docstring": null } } }, @@ -1998,27 +1914,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.spec.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.spec.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.spec.Optional", - "signature": "", - "docstring": null - }, "yaml": { "name": "yaml", "kind": "alias", @@ -2030,7 +1925,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "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.", "members": { "home": { @@ -2051,14 +1946,14 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", + "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", + "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } @@ -2067,7 +1962,7 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", + "signature": "", "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 to the navigation specification file.\n\nReturns:\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." } } @@ -2107,7 +2002,7 @@ "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -2275,122 +2170,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.List", - "signature": "", - "docstring": null - }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, - "Module": { - "name": "Module", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Module", - "signature": "", - "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", - "members": { - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.path", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.members", - "signature": "", - "docstring": null - }, - "add_object": { - "name": "add_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.add_object", - "signature": "", - "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." - }, - "get_object": { - "name": "get_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_object", - "signature": "", - "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." - }, - "get_all_objects": { - "name": "get_all_objects", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", - "signature": "", - "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." - } - } - }, "DocObject": { "name": "DocObject", "kind": "class", @@ -2463,11 +2242,113 @@ } } }, + "Module": { + "name": "Module", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Module", + "signature": "", + "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "members": { + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.path", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.members", + "signature": "", + "docstring": null + }, + "add_object": { + "name": "add_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.add_object", + "signature": "", + "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." + }, + "get_object": { + "name": "get_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_object", + "signature": "", + "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." + }, + "get_all_objects": { + "name": "get_all_objects", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", + "signature": "", + "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." + } + } + }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.mcp_renderer.MCPRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { @@ -2481,10 +2362,17 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", - "signature": "", + "signature": "", "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": "", + "docstring": null } } }, @@ -2502,57 +2390,6 @@ "signature": "", "docstring": null }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mkdocs_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, "Module": { "name": "Module", "kind": "class", @@ -2604,11 +2441,62 @@ } } }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mkdocs_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -2622,15 +2510,15 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", - "signature": "", + "signature": "", "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } @@ -2728,7 +2616,7 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", + "signature": "", "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.", "members": { "mcp_root": { @@ -2749,7 +2637,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "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`." } } diff --git a/mcp_docs/modules/docforge.loaders.griffe_loader.json b/docs/mcp/modules/docforge.loaders.griffe_loader.json similarity index 96% rename from mcp_docs/modules/docforge.loaders.griffe_loader.json rename to docs/mcp/modules/docforge.loaders.griffe_loader.json index 3c14fa9..316d34f 100644 --- a/mcp_docs/modules/docforge.loaders.griffe_loader.json +++ b/docs/mcp/modules/docforge.loaders.griffe_loader.json @@ -18,25 +18,11 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", + "AliasResolutionError": { + "name": "AliasResolutionError", "kind": "alias", - "path": "docforge.loaders.griffe_loader.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.Optional", - "signature": "", - "docstring": null - }, - "ModulesCollection": { - "name": "ModulesCollection", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.ModulesCollection", - "signature": "", + "path": "docforge.loaders.griffe_loader.AliasResolutionError", + "signature": "", "docstring": null }, "LinesCollection": { @@ -46,6 +32,13 @@ "signature": "", "docstring": null }, + "ModulesCollection": { + "name": "ModulesCollection", + "kind": "alias", + "path": "docforge.loaders.griffe_loader.ModulesCollection", + "signature": "", + "docstring": null + }, "Object": { "name": "Object", "kind": "alias", @@ -53,12 +46,77 @@ "signature": "", "docstring": null }, - "AliasResolutionError": { - "name": "AliasResolutionError", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.AliasResolutionError", - "signature": "", - "docstring": null + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.loaders.griffe_loader.DocObject", + "signature": "", + "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.add_member", + "signature": "", + "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: Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." + } + } }, "Module": { "name": "Module", @@ -162,78 +220,6 @@ } } }, - "DocObject": { - "name": "DocObject", - "kind": "class", - "path": "docforge.loaders.griffe_loader.DocObject", - "signature": "", - "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.name", - "signature": "", - "docstring": null - }, - "kind": { - "name": "kind", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.kind", - "signature": "", - "docstring": null - }, - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.path", - "signature": "", - "docstring": null - }, - "signature": { - "name": "signature", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.signature", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.members", - "signature": "", - "docstring": null - }, - "add_member": { - "name": "add_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.add_member", - "signature": "", - "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: Documentation object to add as a member." - }, - "get_member": { - "name": "get_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_member", - "signature": "", - "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." - }, - "get_all_members": { - "name": "get_all_members", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", - "signature": "", - "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." - } - } - }, "logger": { "name": "logger", "kind": "attribute", @@ -245,28 +231,28 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", + "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", + "signature": "", "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.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", + "signature": "", "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", + "signature": "", "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." } } diff --git a/mcp_docs/modules/docforge.loaders.json b/docs/mcp/modules/docforge.loaders.json similarity index 96% rename from mcp_docs/modules/docforge.loaders.json rename to docs/mcp/modules/docforge.loaders.json index 02a1470..fcfe8b7 100644 --- a/mcp_docs/modules/docforge.loaders.json +++ b/docs/mcp/modules/docforge.loaders.json @@ -55,25 +55,11 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", + "AliasResolutionError": { + "name": "AliasResolutionError", "kind": "alias", - "path": "docforge.loaders.griffe_loader.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.Optional", - "signature": "", - "docstring": null - }, - "ModulesCollection": { - "name": "ModulesCollection", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.ModulesCollection", - "signature": "", + "path": "docforge.loaders.griffe_loader.AliasResolutionError", + "signature": "", "docstring": null }, "LinesCollection": { @@ -83,6 +69,13 @@ "signature": "", "docstring": null }, + "ModulesCollection": { + "name": "ModulesCollection", + "kind": "alias", + "path": "docforge.loaders.griffe_loader.ModulesCollection", + "signature": "", + "docstring": null + }, "Object": { "name": "Object", "kind": "alias", @@ -90,12 +83,77 @@ "signature": "", "docstring": null }, - "AliasResolutionError": { - "name": "AliasResolutionError", - "kind": "alias", - "path": "docforge.loaders.griffe_loader.AliasResolutionError", - "signature": "", - "docstring": null + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.loaders.griffe_loader.DocObject", + "signature": "", + "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.loaders.griffe_loader.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.add_member", + "signature": "", + "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: Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." + } + } }, "Module": { "name": "Module", @@ -199,78 +257,6 @@ } } }, - "DocObject": { - "name": "DocObject", - "kind": "class", - "path": "docforge.loaders.griffe_loader.DocObject", - "signature": "", - "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 (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.name", - "signature": "", - "docstring": null - }, - "kind": { - "name": "kind", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.kind", - "signature": "", - "docstring": null - }, - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.path", - "signature": "", - "docstring": null - }, - "signature": { - "name": "signature", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.signature", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.loaders.griffe_loader.DocObject.members", - "signature": "", - "docstring": null - }, - "add_member": { - "name": "add_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.add_member", - "signature": "", - "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: Documentation object to add as a member." - }, - "get_member": { - "name": "get_member", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_member", - "signature": "", - "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." - }, - "get_all_members": { - "name": "get_all_members", - "kind": "function", - "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", - "signature": "", - "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." - } - } - }, "logger": { "name": "logger", "kind": "attribute", @@ -282,28 +268,28 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", + "signature": "", "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, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", + "signature": "", "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.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", + "signature": "", "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, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", + "signature": "", "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." } } diff --git a/mcp_docs/modules/docforge.models.json b/docs/mcp/modules/docforge.models.json similarity index 95% rename from mcp_docs/modules/docforge.models.json rename to docs/mcp/modules/docforge.models.json index ecb4506..1d513fb 100644 --- a/mcp_docs/modules/docforge.models.json +++ b/docs/mcp/modules/docforge.models.json @@ -185,25 +185,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.module.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.module.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.module.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { @@ -338,25 +324,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.object.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.object.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.object.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { @@ -440,18 +412,11 @@ "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.", "members": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.project.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.project.Iterable", - "signature": "", + "signature": "", "docstring": null }, "Module": { diff --git a/mcp_docs/modules/docforge.models.module.json b/docs/mcp/modules/docforge.models.module.json similarity index 94% rename from mcp_docs/modules/docforge.models.module.json rename to docs/mcp/modules/docforge.models.module.json index 465083c..55fb892 100644 --- a/mcp_docs/modules/docforge.models.module.json +++ b/docs/mcp/modules/docforge.models.module.json @@ -4,25 +4,11 @@ "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.", "objects": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.module.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.module.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.module.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { diff --git a/mcp_docs/modules/docforge.models.object.json b/docs/mcp/modules/docforge.models.object.json similarity index 89% rename from mcp_docs/modules/docforge.models.object.json rename to docs/mcp/modules/docforge.models.object.json index 66cb8c0..3c18f97 100644 --- a/mcp_docs/modules/docforge.models.object.json +++ b/docs/mcp/modules/docforge.models.object.json @@ -4,25 +4,11 @@ "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.", "objects": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.object.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.object.Iterable", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.models.object.Optional", - "signature": "", + "signature": "", "docstring": null }, "DocObject": { diff --git a/mcp_docs/modules/docforge.models.project.json b/docs/mcp/modules/docforge.models.project.json similarity index 96% rename from mcp_docs/modules/docforge.models.project.json rename to docs/mcp/modules/docforge.models.project.json index 429ecef..c91f83b 100644 --- a/mcp_docs/modules/docforge.models.project.json +++ b/docs/mcp/modules/docforge.models.project.json @@ -4,18 +4,11 @@ "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.", "objects": { - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.models.project.Dict", - "signature": "", - "docstring": null - }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.models.project.Iterable", - "signature": "", + "signature": "", "docstring": null }, "Module": { diff --git a/mcp_docs/modules/docforge.nav.json b/docs/mcp/modules/docforge.nav.json similarity index 90% rename from mcp_docs/modules/docforge.nav.json rename to docs/mcp/modules/docforge.nav.json index 7c913c2..9f2d149 100644 --- a/mcp_docs/modules/docforge.nav.json +++ b/docs/mcp/modules/docforge.nav.json @@ -115,20 +115,6 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.mkdocs.List", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.mkdocs.Dict", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", @@ -191,39 +177,25 @@ "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.", "members": { - "Path": { - "name": "Path", + "glob": { + "name": "glob", "kind": "alias", - "path": "docforge.nav.resolver.Path", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.resolver.Dict", - "signature": "", + "path": "docforge.nav.resolver.glob", + "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.nav.resolver.Iterable", - "signature": "", + "signature": "", "docstring": null }, - "List": { - "name": "List", + "Path": { + "name": "Path", "kind": "alias", - "path": "docforge.nav.resolver.List", - "signature": "", - "docstring": null - }, - "glob": { - "name": "glob", - "kind": "alias", - "path": "docforge.nav.resolver.glob", - "signature": "", + "path": "docforge.nav.resolver.Path", + "signature": "", "docstring": null }, "NavSpec": { @@ -267,7 +239,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -288,7 +260,7 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", + "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } @@ -297,15 +269,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", + "signature": "", "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\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." - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.resolver.Optional", - "signature": "", - "docstring": null } } }, @@ -323,27 +288,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.spec.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.spec.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.spec.Optional", - "signature": "", - "docstring": null - }, "yaml": { "name": "yaml", "kind": "alias", @@ -355,7 +299,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "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.", "members": { "home": { @@ -376,14 +320,14 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", + "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", + "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } @@ -392,7 +336,7 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", + "signature": "", "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 to the navigation specification file.\n\nReturns:\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." } } diff --git a/mcp_docs/modules/docforge.nav.mkdocs.json b/docs/mcp/modules/docforge.nav.mkdocs.json similarity index 89% rename from mcp_docs/modules/docforge.nav.mkdocs.json rename to docs/mcp/modules/docforge.nav.mkdocs.json index a5da244..1bb40f9 100644 --- a/mcp_docs/modules/docforge.nav.mkdocs.json +++ b/docs/mcp/modules/docforge.nav.mkdocs.json @@ -11,20 +11,6 @@ "signature": "", "docstring": null }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.mkdocs.List", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.mkdocs.Dict", - "signature": "", - "docstring": null - }, "Any": { "name": "Any", "kind": "alias", diff --git a/mcp_docs/modules/docforge.nav.resolver.json b/docs/mcp/modules/docforge.nav.resolver.json similarity index 87% rename from mcp_docs/modules/docforge.nav.resolver.json rename to docs/mcp/modules/docforge.nav.resolver.json index 1f75460..096f242 100644 --- a/mcp_docs/modules/docforge.nav.resolver.json +++ b/docs/mcp/modules/docforge.nav.resolver.json @@ -4,39 +4,25 @@ "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.", "objects": { - "Path": { - "name": "Path", + "glob": { + "name": "glob", "kind": "alias", - "path": "docforge.nav.resolver.Path", - "signature": "", - "docstring": null - }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.resolver.Dict", - "signature": "", + "path": "docforge.nav.resolver.glob", + "signature": "", "docstring": null }, "Iterable": { "name": "Iterable", "kind": "alias", "path": "docforge.nav.resolver.Iterable", - "signature": "", + "signature": "", "docstring": null }, - "List": { - "name": "List", + "Path": { + "name": "Path", "kind": "alias", - "path": "docforge.nav.resolver.List", - "signature": "", - "docstring": null - }, - "glob": { - "name": "glob", - "kind": "alias", - "path": "docforge.nav.resolver.glob", - "signature": "", + "path": "docforge.nav.resolver.Path", + "signature": "", "docstring": null }, "NavSpec": { @@ -80,7 +66,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -101,7 +87,7 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", + "signature": "", "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } @@ -110,15 +96,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", + "signature": "", "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: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\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." - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.resolver.Optional", - "signature": "", - "docstring": null } } } diff --git a/mcp_docs/modules/docforge.nav.spec.json b/docs/mcp/modules/docforge.nav.spec.json similarity index 81% rename from mcp_docs/modules/docforge.nav.spec.json rename to docs/mcp/modules/docforge.nav.spec.json index d434545..99a8855 100644 --- a/mcp_docs/modules/docforge.nav.spec.json +++ b/docs/mcp/modules/docforge.nav.spec.json @@ -11,27 +11,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.nav.spec.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.nav.spec.List", - "signature": "", - "docstring": null - }, - "Optional": { - "name": "Optional", - "kind": "alias", - "path": "docforge.nav.spec.Optional", - "signature": "", - "docstring": null - }, "yaml": { "name": "yaml", "kind": "alias", @@ -43,7 +22,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "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.", "members": { "home": { @@ -64,14 +43,14 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", + "signature": "", "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", + "signature": "", "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." } } @@ -80,7 +59,7 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", + "signature": "", "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 to the navigation specification file.\n\nReturns:\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." } } diff --git a/mcp_docs/modules/docforge.renderers.base.json b/docs/mcp/modules/docforge.renderers.base.json similarity index 100% rename from mcp_docs/modules/docforge.renderers.base.json rename to docs/mcp/modules/docforge.renderers.base.json diff --git a/mcp_docs/modules/docforge.renderers.json b/docs/mcp/modules/docforge.renderers.json similarity index 97% rename from mcp_docs/modules/docforge.renderers.json rename to docs/mcp/modules/docforge.renderers.json index 8d68b06..e2e2aa7 100644 --- a/mcp_docs/modules/docforge.renderers.json +++ b/docs/mcp/modules/docforge.renderers.json @@ -30,7 +30,7 @@ "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -198,122 +198,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.List", - "signature": "", - "docstring": null - }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, - "Module": { - "name": "Module", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Module", - "signature": "", - "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", - "members": { - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.path", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.members", - "signature": "", - "docstring": null - }, - "add_object": { - "name": "add_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.add_object", - "signature": "", - "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." - }, - "get_object": { - "name": "get_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_object", - "signature": "", - "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." - }, - "get_all_objects": { - "name": "get_all_objects", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", - "signature": "", - "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." - } - } - }, "DocObject": { "name": "DocObject", "kind": "class", @@ -386,11 +270,113 @@ } } }, + "Module": { + "name": "Module", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Module", + "signature": "", + "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "members": { + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.path", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.members", + "signature": "", + "docstring": null + }, + "add_object": { + "name": "add_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.add_object", + "signature": "", + "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." + }, + "get_object": { + "name": "get_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_object", + "signature": "", + "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." + }, + "get_all_objects": { + "name": "get_all_objects", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", + "signature": "", + "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." + } + } + }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.mcp_renderer.MCPRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { @@ -404,10 +390,17 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", - "signature": "", + "signature": "", "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": "", + "docstring": null } } }, @@ -425,57 +418,6 @@ "signature": "", "docstring": null }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mkdocs_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, "Module": { "name": "Module", "kind": "class", @@ -527,11 +469,62 @@ } } }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mkdocs_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -545,15 +538,15 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", - "signature": "", + "signature": "", "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } diff --git a/mcp_docs/modules/docforge.renderers.mcp_renderer.json b/docs/mcp/modules/docforge.renderers.mcp_renderer.json similarity index 96% rename from mcp_docs/modules/docforge.renderers.mcp_renderer.json rename to docs/mcp/modules/docforge.renderers.mcp_renderer.json index fe936ee..0fad6c6 100644 --- a/mcp_docs/modules/docforge.renderers.mcp_renderer.json +++ b/docs/mcp/modules/docforge.renderers.mcp_renderer.json @@ -18,122 +18,6 @@ "signature": "", "docstring": null }, - "Dict": { - "name": "Dict", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.Dict", - "signature": "", - "docstring": null - }, - "List": { - "name": "List", - "kind": "alias", - "path": "docforge.renderers.mcp_renderer.List", - "signature": "", - "docstring": null - }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, - "Module": { - "name": "Module", - "kind": "class", - "path": "docforge.renderers.mcp_renderer.Module", - "signature": "", - "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", - "members": { - "path": { - "name": "path", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.path", - "signature": "", - "docstring": null - }, - "docstring": { - "name": "docstring", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.docstring", - "signature": "", - "docstring": null - }, - "members": { - "name": "members", - "kind": "attribute", - "path": "docforge.renderers.mcp_renderer.Module.members", - "signature": "", - "docstring": null - }, - "add_object": { - "name": "add_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.add_object", - "signature": "", - "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." - }, - "get_object": { - "name": "get_object", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_object", - "signature": "", - "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." - }, - "get_all_objects": { - "name": "get_all_objects", - "kind": "function", - "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", - "signature": "", - "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." - } - } - }, "DocObject": { "name": "DocObject", "kind": "class", @@ -206,11 +90,113 @@ } } }, + "Module": { + "name": "Module", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Module", + "signature": "", + "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 (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "members": { + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.path", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Module.members", + "signature": "", + "docstring": null + }, + "add_object": { + "name": "add_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.add_object", + "signature": "", + "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." + }, + "get_object": { + "name": "get_object", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_object", + "signature": "", + "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." + }, + "get_all_objects": { + "name": "get_all_objects", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Module.get_all_objects", + "signature": "", + "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." + } + } + }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mcp_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mcp_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mcp_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MCPRenderer": { "name": "MCPRenderer", "kind": "class", "path": "docforge.renderers.mcp_renderer.MCPRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that generates MCP-compatible documentation resources.\n\nThis renderer converts doc-forge project models into structured JSON\nresources suitable for consumption by systems implementing the Model\nContext Protocol (MCP).", "members": { "name": { @@ -224,10 +210,17 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mcp_renderer.MCPRenderer.generate_sources", - "signature": "", + "signature": "", "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": "", + "docstring": null } } } diff --git a/mcp_docs/modules/docforge.renderers.mkdocs_renderer.json b/docs/mcp/modules/docforge.renderers.mkdocs_renderer.json similarity index 96% rename from mcp_docs/modules/docforge.renderers.mkdocs_renderer.json rename to docs/mcp/modules/docforge.renderers.mkdocs_renderer.json index e7923a6..352c9cd 100644 --- a/mcp_docs/modules/docforge.renderers.mkdocs_renderer.json +++ b/docs/mcp/modules/docforge.renderers.mkdocs_renderer.json @@ -11,57 +11,6 @@ "signature": "", "docstring": null }, - "Project": { - "name": "Project", - "kind": "class", - "path": "docforge.renderers.mkdocs_renderer.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", - "members": { - "name": { - "name": "name", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.name", - "signature": "", - "docstring": null - }, - "modules": { - "name": "modules", - "kind": "attribute", - "path": "docforge.renderers.mkdocs_renderer.Project.modules", - "signature": "", - "docstring": null - }, - "add_module": { - "name": "add_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.add_module", - "signature": "", - "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." - }, - "get_module": { - "name": "get_module", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module", - "signature": "", - "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." - }, - "get_all_modules": { - "name": "get_all_modules", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", - "signature": "", - "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." - }, - "get_module_list": { - "name": "get_module_list", - "kind": "function", - "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", - "signature": "", - "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." - } - } - }, "Module": { "name": "Module", "kind": "class", @@ -113,11 +62,62 @@ } } }, + "Project": { + "name": "Project", + "kind": "class", + "path": "docforge.renderers.mkdocs_renderer.Project", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.name", + "signature": "", + "docstring": null + }, + "modules": { + "name": "modules", + "kind": "attribute", + "path": "docforge.renderers.mkdocs_renderer.Project.modules", + "signature": "", + "docstring": null + }, + "add_module": { + "name": "add_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.add_module", + "signature": "", + "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." + }, + "get_module": { + "name": "get_module", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module", + "signature": "", + "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." + }, + "get_all_modules": { + "name": "get_all_modules", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules", + "signature": "", + "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." + }, + "get_module_list": { + "name": "get_module_list", + "kind": "function", + "path": "docforge.renderers.mkdocs_renderer.Project.get_module_list", + "signature": "", + "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." + } + } + }, "MkDocsRenderer": { "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -131,15 +131,15 @@ "name": "generate_sources", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", - "signature": "", + "signature": "", "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, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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, optional):\n Whether the module is treated as the project source root." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n 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 (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } diff --git a/mcp_docs/modules/docforge.servers.json b/docs/mcp/modules/docforge.servers.json similarity index 98% rename from mcp_docs/modules/docforge.servers.json rename to docs/mcp/modules/docforge.servers.json index af152fd..7d09733 100644 --- a/mcp_docs/modules/docforge.servers.json +++ b/docs/mcp/modules/docforge.servers.json @@ -87,7 +87,7 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", + "signature": "", "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.", "members": { "mcp_root": { @@ -108,7 +108,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "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`." } } diff --git a/mcp_docs/modules/docforge.servers.mcp_server.json b/docs/mcp/modules/docforge.servers.mcp_server.json similarity index 98% rename from mcp_docs/modules/docforge.servers.mcp_server.json rename to docs/mcp/modules/docforge.servers.mcp_server.json index e5ba618..372c906 100644 --- a/mcp_docs/modules/docforge.servers.mcp_server.json +++ b/docs/mcp/modules/docforge.servers.mcp_server.json @@ -50,7 +50,7 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", + "signature": "", "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.", "members": { "mcp_root": { @@ -71,7 +71,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "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`." } } diff --git a/mcp_docs/nav.json b/docs/mcp/nav.json similarity index 100% rename from mcp_docs/nav.json rename to docs/mcp/nav.json diff --git a/mkdocs.yml b/mkdocs.yml index 9fc5e49..0c54747 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -63,6 +63,7 @@ markdown_extensions: - pymdownx.tilde - pymdownx.mark site_name: docforge +docs_dir: docs/lib nav: - Home: index.md - Loaders: