Files
Vishesh 'ironeagle' Bangotra 4a876abc62 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
2026-01-21 15:45:48 +05:30

47 lines
1.1 KiB
Python

"""
This module defines the base interfaces and configuration containers for
doc-forge renderers. All renderer implementations should adhere to the
DocRenderer protocol.
"""
from pathlib import Path
from typing import Protocol
from docforge.models import Project
class RendererConfig:
"""
Configuration container for documentation renderers.
Args:
out_dir: The directory where documentation files should be written.
project: The introspected project models to be rendered.
"""
def __init__(self, out_dir: Path, project: Project) -> None:
self.out_dir = out_dir
self.project = project
class DocRenderer(Protocol):
"""
Protocol defining the interface for documentation renderers.
"""
name: str
def generate_sources(
self,
project: Project,
out_dir: Path,
) -> None:
"""
Generate renderer-specific source files for the given project.
Args:
project: The project models containing modules and objects.
out_dir: Target directory for the generated files.
"""
...