Project
docforge.models.project
Summary
Documentation model representing a project.
This module defines the Project class, the top-level container used by
doc-forge to represent a documented codebase. A Project aggregates multiple
modules and provides access to them through a unified interface.
Classes
Project
Representation of a documentation project.
A Project serves as the root container for all modules discovered during
introspection. Each module is stored by its dotted import path.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Name of the project. |
modules |
Dict[str, Module]
|
Mapping of module paths to |
Initialize a Project instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
str
|
Name used to identify the documentation project. |
required |
Functions
add_module
Register a module in the project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module |
Module
|
Module instance to add to the project. |
required |
get_all_modules
Return all modules contained in the project.
Returns:
| Type | Description |
|---|---|
Iterable[Module]
|
Iterable[Module]:
An iterable of |
get_module
Retrieve a module by its dotted path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
str
|
Fully qualified dotted module path (for example |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Module |
Module
|
The corresponding |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the module does not exist in the project. |
get_module_list
Return the list of module import paths.
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: A list containing the dotted paths of all modules in the project. |