Classes
AutodocTrackingMixin
Track autodoc source file to page dependencies.
This mixin adds dependency tracking for autodoc pa…
AutodocTrackingMixin
Track autodoc source file to page dependencies.
This mixin adds dependency tracking for autodoc pages, enabling selective rebuilds when only specific Python/OpenAPI source files change.
Attributes
| Name | Type | Description |
|---|---|---|
autodoc_dependencies |
dict[str, set[str]] |
Mapping of source_file path to set of autodoc page paths that are generated from that source file. |
Methods 6
add_autodoc_dependency
Register that source_file produces autodoc_page.
add_autodoc_dependency
def add_autodoc_dependency(self, source_file: Path | str, autodoc_page: Path | str) -> None
Register that source_file produces autodoc_page.
Parameters 2
source_file |
Path | str |
Path to the Python/OpenAPI source file |
autodoc_page |
Path | str |
Path to the generated autodoc page (source_path) |
get_affected_autodoc_pages
Get autodoc pages affected by a source file change.
get_affected_autodoc_pages
def get_affected_autodoc_pages(self, changed_source: Path | str) -> set[str]
Get autodoc pages affected by a source file change.
Parameters 1
changed_source |
Path | str |
Path to the changed Python/OpenAPI source file |
Returns
Set of autodoc page paths that need to be rebuiltset[str]
—
get_autodoc_source_files
Get all tracked autodoc source files.
get_autodoc_source_files
def get_autodoc_source_files(self) -> set[str]
Get all tracked autodoc source files.
Returns
Set of all source file paths that have autodoc dependenciesset[str]
—
clear_autodoc_dependencies
Clear all autodoc dependency mappings.
Called when autodoc configuration chang…
clear_autodoc_dependencies
def clear_autodoc_dependencies(self) -> None
Clear all autodoc dependency mappings.
Called when autodoc configuration changes to ensure fresh mappings.
remove_autodoc_source
Remove a source file and return its associated autodoc pages.
remove_autodoc_source
def remove_autodoc_source(self, source_file: Path | str) -> set[str]
Remove a source file and return its associated autodoc pages.
Parameters 1
source_file |
Path | str |
Path to the source file being removed |
Returns
Set of autodoc page paths that were associated with this sourceset[str]
—
get_autodoc_stats
Get statistics about autodoc dependency tracking.
get_autodoc_stats
def get_autodoc_stats(self) -> dict[str, Any]
Get statistics about autodoc dependency tracking.
Returns
Dictionary with tracking statsdict[str, Any]
—