{ "module": "docforge.loaders", "content": { "path": "docforge.loaders", "docstring": "# Loader Layer\n\nThe `docforge.loaders` package is responsible for discovering Python source files\nand extracting their documentation using static analysis.\n\n## Core Features\n\n- **Discovery**: Automatically find all modules and packages in a project\n directory.\n- **Introspection**: Uses `griffe` to parse docstrings, signatures, and\n hierarchical relationships without executing the code.\n- **Filtering**: Automatically excludes private members (prefixed with `_`) to\n ensure clean public documentation.", "objects": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.GriffeLoader", "signature": "", "docstring": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "griffe_loader": { "name": "griffe_loader", "kind": "module", "path": "docforge.loaders.griffe_loader", "signature": null, "docstring": "This module provides the GriffeLoader, which uses the 'griffe' library to\nintrospect Python source code and populate the doc-forge Project models.", "members": { "logging": { "name": "logging", "kind": "alias", "path": "docforge.loaders.griffe_loader.logging", "signature": "", "docstring": null }, "Path": { "name": "Path", "kind": "alias", "path": "docforge.loaders.griffe_loader.Path", "signature": "", "docstring": null }, "List": { "name": "List", "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": "", "docstring": null }, "LinesCollection": { "name": "LinesCollection", "kind": "alias", "path": "docforge.loaders.griffe_loader.LinesCollection", "signature": "", "docstring": null }, "Object": { "name": "Object", "kind": "alias", "path": "docforge.loaders.griffe_loader.Object", "signature": "", "docstring": null }, "AliasResolutionError": { "name": "AliasResolutionError", "kind": "alias", "path": "docforge.loaders.griffe_loader.AliasResolutionError", "signature": "", "docstring": null }, "Module": { "name": "Module", "kind": "class", "path": "docforge.loaders.griffe_loader.Module", "signature": "", "docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their DocObject representations.", "members": { "path": { "name": "path", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.path", "signature": "", "docstring": null }, "docstring": { "name": "docstring", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.docstring", "signature": "", "docstring": null }, "members": { "name": "members", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Module.members", "signature": "", "docstring": null }, "add_object": { "name": "add_object", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.add_object", "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj: The object to add." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_object", "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.loaders.griffe_loader.Module.get_all_objects", "signature": "", "docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances." } } }, "Project": { "name": "Project", "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", "docstring": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping module paths to Module instances.", "members": { "name": { "name": "name", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Project.name", "signature": "", "docstring": null }, "modules": { "name": "modules", "kind": "attribute", "path": "docforge.loaders.griffe_loader.Project.modules", "signature": "", "docstring": null }, "add_module": { "name": "add_module", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.add_module", "signature": "", "docstring": "Add a module to the project.\n\nArgs:\n module: The module to add." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_module", "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested Module." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_all_modules", "signature": "", "docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.loaders.griffe_loader.Project.get_module_list", "signature": "", "docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths." } } }, "DocObject": { "name": "DocObject", "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", "docstring": "Represents a documented Python object (class, function, method, etc.).\n\nAttributes:\n name: Local name of the object.\n kind: Type of object (e.g., 'class', 'function', 'attribute').\n path: Full dotted import path to the object.\n signature: Callable signature, if applicable.\n docstring: Raw docstring content extracted from the source.\n members: Dictionary mapping member names to their DocObject representations.", "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 member to this object (e.g., a method to a class).\n\nArgs:\n obj: The child DocObject to add." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_member", "signature": "", "docstring": "Retrieve a child member by name.\n\nArgs:\n name: The name of the member.\n\nReturns:\n The requested DocObject." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.get_all_members", "signature": "", "docstring": "Get all members of this object.\n\nReturns:\n An iterable of child DocObject instances." } } }, "logger": { "name": "logger", "kind": "attribute", "path": "docforge.loaders.griffe_loader.logger", "signature": null, "docstring": null }, "discover_module_paths": { "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", "signature": "", "docstring": "Discover all Python modules under a package via filesystem traversal.\n\nRules:\n- Directory with __init__.py is treated as a package.\n- Any .py file is treated as a module.\n- All paths are converted to dotted module paths.\n\nArgs:\n module_name: The name of the package to discover.\n project_root: The root directory of the project. Defaults to current working directory.\n\nReturns:\n A sorted list of dotted module paths." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", "signature": "", "docstring": "Loads Python modules and extracts documentation using the Griffe introspection engine.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", "signature": "", "docstring": "Load multiple modules and combine them into a single Project models.\n\nArgs:\n module_paths: A list of dotted paths to the modules to load.\n project_name: Optional name for the project. Defaults to the first module name.\n skip_import_errors: If True, modules that fail to import will be skipped.\n\nReturns:\n A Project instance containing the loaded modules." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", "signature": "", "docstring": "Load a single module and convert its introspection data into the docforge models.\n\nArgs:\n path: The dotted path of the module to load.\n\nReturns:\n A Module instance." } } } } } } } }