refactor: rename loader/model packages to loaders/models

- Rename docforge.loader → docforge.loaders and docforge.model → docforge.models
- Update all imports, type stubs, CLI, tests, and documentation references
- Align MkDocs navigation and docforge.nav.yml with new package structure
- Adjust module docstrings and comments for consistency with pluralized naming
This commit is contained in:
2026-01-21 15:45:48 +05:30
parent b6e5114532
commit 4a876abc62
39 changed files with 78 additions and 77 deletions

View File

@@ -2,7 +2,7 @@
# Renderers Layer
The `docforge.renderers` package handles the transformation of the internal
documentation model into physical files formatted for specific documentation
documentation models into physical files formatted for specific documentation
engines.
## Current Implementations

View File

@@ -7,7 +7,7 @@ DocRenderer protocol.
from pathlib import Path
from typing import Protocol
from docforge.model import Project
from docforge.models import Project
class RendererConfig:
@@ -16,7 +16,7 @@ class RendererConfig:
Args:
out_dir: The directory where documentation files should be written.
project: The introspected project model to be rendered.
project: The introspected project models to be rendered.
"""
def __init__(self, out_dir: Path, project: Project) -> None:
@@ -40,7 +40,7 @@ class DocRenderer(Protocol):
Generate renderer-specific source files for the given project.
Args:
project: The project model containing modules and objects.
project: The project models containing modules and objects.
out_dir: Target directory for the generated files.
"""
...

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from typing import Protocol
from docforge.model import Project
from docforge.models import Project
class RendererConfig:

View File

@@ -5,7 +5,7 @@ compatible with the MkDocs 'material' theme and 'mkdocstrings' extension.
from pathlib import Path
from docforge.model import Project
from docforge.models import Project
class MkDocsRenderer:
@@ -19,10 +19,10 @@ class MkDocsRenderer:
def generate_sources(self, project: Project, out_dir: Path) -> None:
"""
Produce a set of Markdown files in the output directory based on the
provided Project model.
provided Project models.
Args:
project: The project model to render.
project: The project models to render.
out_dir: Target directory for documentation files.
"""
modules = list(project.get_all_modules())

View File

@@ -1,7 +1,7 @@
from pathlib import Path
from typing import Set
from docforge.model import Project, Module
from docforge.models import Project, Module
class MkDocsRenderer: