Load module tree from documentation directory. Args: docs_dir: Documentation directory path Returns: Module tree structure
(self, docs_dir: Path)
| 33 | |
| 34 | |
| 35 | def load_module_tree(self, docs_dir: Path) -> Dict[str, Any]: |
| 36 | """ |
| 37 | Load module tree from documentation directory. |
| 38 | |
| 39 | Args: |
| 40 | docs_dir: Documentation directory path |
| 41 | |
| 42 | Returns: |
| 43 | Module tree structure |
| 44 | """ |
| 45 | module_tree_path = docs_dir / "module_tree.json" |
| 46 | if not module_tree_path.exists(): |
| 47 | # Fallback to a simple structure |
| 48 | return { |
| 49 | "Overview": { |
| 50 | "description": "Repository overview", |
| 51 | "components": [], |
| 52 | "children": {} |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | try: |
| 57 | content = safe_read(module_tree_path) |
| 58 | return json.loads(content) |
| 59 | except Exception as e: |
| 60 | raise FileSystemError(f"Failed to load module tree: {e}") |
| 61 | |
| 62 | def load_metadata(self, docs_dir: Path) -> Optional[Dict[str, Any]]: |
| 63 | """ |
no test coverage detected