148 lines
9.8 KiB
JSON
148 lines
9.8 KiB
JSON
{
|
|
"module": "docforge.renderers.mkdocs_renderer",
|
|
"content": {
|
|
"path": "docforge.renderers.mkdocs_renderer",
|
|
"docstring": "# Summary\n\nMkDocs renderer implementation.\n\nThis module defines the `MkDocsRenderer` class, which generates Markdown\ndocumentation sources compatible with MkDocs Material and the mkdocstrings\nplugin.\n\nThe renderer ensures a consistent documentation structure by:\n\n- Creating a root `index.md` if one does not exist\n- Generating package index pages automatically\n- Linking child modules within parent package pages\n- Optionally generating `README.md` from the root package docstring",
|
|
"objects": {
|
|
"Path": {
|
|
"name": "Path",
|
|
"kind": "alias",
|
|
"path": "docforge.renderers.mkdocs_renderer.Path",
|
|
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
|
"docstring": null
|
|
},
|
|
"Project": {
|
|
"name": "Project",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project",
|
|
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
|
"docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.",
|
|
"members": {
|
|
"name": {
|
|
"name": "name",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.name",
|
|
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
|
"docstring": null
|
|
},
|
|
"modules": {
|
|
"name": "modules",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.modules",
|
|
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
|
"docstring": null
|
|
},
|
|
"add_module": {
|
|
"name": "add_module",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.add_module",
|
|
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
|
"docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project."
|
|
},
|
|
"get_module": {
|
|
"name": "get_module",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.get_module",
|
|
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
|
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project."
|
|
},
|
|
"get_all_modules": {
|
|
"name": "get_all_modules",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.get_all_modules",
|
|
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
|
"docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances."
|
|
},
|
|
"get_module_list": {
|
|
"name": "get_module_list",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Project.get_module_list",
|
|
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
|
"docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project."
|
|
}
|
|
}
|
|
},
|
|
"Module": {
|
|
"name": "Module",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module",
|
|
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
|
"docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (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.mkdocs_renderer.Module.path",
|
|
"signature": "<bound method Alias.signature of Alias('path', 'docforge.models.module.Module.path')>",
|
|
"docstring": null
|
|
},
|
|
"docstring": {
|
|
"name": "docstring",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module.docstring",
|
|
"signature": "<bound method Alias.signature of Alias('docstring', 'docforge.models.module.Module.docstring')>",
|
|
"docstring": null
|
|
},
|
|
"members": {
|
|
"name": "members",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module.members",
|
|
"signature": "<bound method Alias.signature of Alias('members', 'docforge.models.module.Module.members')>",
|
|
"docstring": null
|
|
},
|
|
"add_object": {
|
|
"name": "add_object",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module.add_object",
|
|
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
|
"docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module."
|
|
},
|
|
"get_object": {
|
|
"name": "get_object",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module.get_object",
|
|
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
|
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists."
|
|
},
|
|
"get_all_objects": {
|
|
"name": "get_all_objects",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects",
|
|
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
|
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members."
|
|
}
|
|
}
|
|
},
|
|
"MkDocsRenderer": {
|
|
"name": "MkDocsRenderer",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer",
|
|
"signature": "<bound method Class.signature of Class('MkDocsRenderer', 22, 305)>",
|
|
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
|
"members": {
|
|
"name": {
|
|
"name": "name",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.name",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"generate_sources": {
|
|
"name": "generate_sources",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources",
|
|
"signature": "<bound method Function.signature of Function('generate_sources', 36, 78)>",
|
|
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, 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": "<bound method Function.signature of Function('generate_readme', 80, 139)>",
|
|
"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."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |