22# CC̄=4.1 | critical:22/277 | dups:0 | cycles:1
33
44HEALTH[9]:
5- 🟡 CC _extract_project_metadata CC=29 (limit:15)
65 🟡 CC _render_first_usage CC=15 (limit:15)
76 🟡 CC _generate_intro CC=16 (limit:15)
87 🟡 CC parse_gitignore CC=15 (limit:15)
@@ -11,6 +10,7 @@ HEALTH[9]:
1110 🟡 CC _render_module_detail CC=25 (limit:15)
1211 🟡 CC _render_module_section CC=25 (limit:15)
1312 🟡 CC _generate_advanced CC=22 (limit:15)
13+ 🟡 CC _extract_project_metadata CC=29 (limit:15)
1414
1515REFACTOR[2]:
1616 1. split 9 high-CC methods (CC>15)
@@ -86,10 +86,10 @@ FUNCTIONS (CC≥10, 22 of 237):
8686 11.0 ArchitectureGenerator._generate_class_diagram 12n 2exit loops+cond+ret
8787 10.0 ConfigDocsGenerator._render_section 14n 2exit loops+cond+ret
8888 10.0 ApiReferenceGenerator._has_content 6n 3exit cond+ret
89+ 10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
8990 10.0 ApiChangelogGenerator._diff_functions 9n 1exit loops+cond
9091 10.0 ApiChangelogGenerator._diff_classes 15n 1exit loops+cond
9192 10.0 _run_check 11n 1exit loops+cond
92- 10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
9393
9494 summary:
9595 critical(≥10): 22 | high(5-10): 47 | medium(2-5): 99 | low(<2): 69
@@ -105,7 +105,7 @@ HOTSPOTS:
105105 #7 ReadmeGenerator._build_context fan=17 "ReadmeGenerator method, fan-out=17"
106106 #8 Updater.apply fan=16 "Updater method, fan-out=16"
107107 #9 ModuleDocsGenerator._render_module_detail fan=16 "ModuleDocsGenerator method, fan-out=16"
108- #10 _run_generate fan=16 "calls 16 functions "
108+ #10 ArchitectureGenerator.generate fan=16 "ArchitectureGenerator method, fan-out=16 "
109109
110110CLASSES:
111111 ReadmeGenerator ████████████████████████ 17m CC̄=5.9 max=29 !!
@@ -131,8 +131,8 @@ CLASSES:
131131 MkDocsGenerator █████ 4m CC̄=2.2 max=5
132132 Code2DocsConfig █████ 4m CC̄=4.0 max=10
133133 BaseGenerator ████ 3m CC̄=1.0 max=1
134- ProjectScanner ████ 3m CC̄=1.3 max=2
135134 EndpointDetector ████ 3m CC̄=4.0 max=5
135+ ProjectScanner ████ 3m CC̄=1.3 max=2
136136 Updater ██ 2m CC̄=3.0 max=4
137137 ReadmeGeneratorAdapter ██ 2m CC̄=2.0 max=3
138138 ApiReferenceAdapter ██ 2m CC̄=2.0 max=2
@@ -148,20 +148,20 @@ CLASSES:
148148 ContributingAdapter ██ 2m CC̄=1.5 max=2
149149 Code2LlmAdapter ██ 2m CC̄=4.0 max=7
150150 ChangeInfo █ 1m CC̄=1.0 max=1
151- DefaultGroup █ 1m CC̄=4.0 max=4
152151 LLMConfig █ 1m CC̄=1.0 max=1
152+ DefaultGroup █ 1m CC̄=4.0 max=4
153153 GenerateContext 0m CC̄=0.0 max=0.0
154154 ChangelogEntry 0m CC̄=0.0 max=0.0
155- ApiChange 0m CC̄=0.0 max=0.0
156155 ReadmeConfig 0m CC̄=0.0 max=0.0
157156 DocsConfig 0m CC̄=0.0 max=0.0
158157 ExamplesConfig 0m CC̄=0.0 max=0.0
159158 SyncConfig 0m CC̄=0.0 max=0.0
160159 Code2LlmConfig 0m CC̄=0.0 max=0.0
161- DocstringInfo 0m CC̄=0.0 max=0.0
162- Endpoint 0m CC̄=0.0 max=0.0
160+ ApiChange 0m CC̄=0.0 max=0.0
163161 DependencyInfo 0m CC̄=0.0 max=0.0
164162 ProjectDependencies 0m CC̄=0.0 max=0.0
163+ Endpoint 0m CC̄=0.0 max=0.0
164+ DocstringInfo 0m CC̄=0.0 max=0.0
165165
166166D:
167167 code2docs/generators/readme_gen.py:
@@ -215,6 +215,18 @@ Thi...
215215 e: ConfigDocsGenerator
216216 ConfigDocsGenerator # Generate docs/configuration.md from Code2DocsConfig dataclas...
217217 __init__(2) CC=1.0
218+ code2docs/config.py:
219+ e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
220+ ReadmeConfig # Configuration for README generation....
221+ DocsConfig # Configuration for docs/ generation....
222+ ExamplesConfig # Configuration for examples/ generation....
223+ SyncConfig # Configuration for synchronization....
224+ Code2LlmConfig # Configuration for code2llm analysis generation....
225+ LLMConfig # Configuration for optional LLM-assisted documentation genera...
226+ from_env(0) CC=1.0
227+ Code2DocsConfig # Main configuration for code2docs....
228+ __post_init__(0) CC=2.0
229+ → _detect_repo_url(-1) CC=3.0
218230 code2docs/cli.py:
219231 e: DefaultGroup,main,generate,sync,watch,init,check,diff,_load_config,_run_generate,_run_sync,_run_watch,_run_check,_run_diff
220232 DefaultGroup # Click Group that routes unknown subcommands to 'generate'....
@@ -233,18 +245,6 @@ Thi...
233245 _run_watch(project_path,config)
234246 _run_check(project_path,config,target)
235247 _run_diff(project_path,config)
236- code2docs/config.py:
237- e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
238- ReadmeConfig # Configuration for README generation....
239- DocsConfig # Configuration for docs/ generation....
240- ExamplesConfig # Configuration for examples/ generation....
241- SyncConfig # Configuration for synchronization....
242- Code2LlmConfig # Configuration for code2llm analysis generation....
243- LLMConfig # Configuration for optional LLM-assisted documentation genera...
244- from_env(0) CC=1.0
245- Code2DocsConfig # Main configuration for code2docs....
246- __post_init__(0) CC=2.0
247- → _detect_repo_url(-1) CC=3.0
248248 examples/07_web_frameworks.py:
249249 e: detect_flask_endpoints,detect_fastapi_endpoints,generate_api_docs_from_endpoints,create_example_web_apps,document_web_project
250250 detect_flask_endpoints(project_path)
@@ -269,15 +269,6 @@ Thi...
269269 e: ContributingGenerator
270270 ContributingGenerator # Generate CONTRIBUTING.md by detecting dev tools from pyproje...
271271 __init__(2) CC=1.0
272- code2docs/analyzers/docstring_extractor.py:
273- e: DocstringInfo,DocstringExtractor
274- DocstringInfo # Parsed docstring with sections....
275- DocstringExtractor # Extract and parse docstrings from AnalysisResult....
276- extract_all(1) CC=5.0
277- → parse(1) CC=2.0
278- → _extract_summary(0) CC=2.0
279- → _parse_sections(2) CC=8.0
280- → _classify_section(0) CC=5.0
281272 code2docs/analyzers/dependency_scanner.py:
282273 e: DependencyInfo,ProjectDependencies,DependencyScanner
283274 DependencyInfo # Information about a project dependency....
@@ -289,6 +280,15 @@ Thi...
289280 → _parse_dep_string(0) CC=2.0
290281 → _parse_setup_py(1) CC=4.0
291282 → _parse_requirements_txt(1) CC=5.0
283+ code2docs/analyzers/docstring_extractor.py:
284+ e: DocstringInfo,DocstringExtractor
285+ DocstringInfo # Parsed docstring with sections....
286+ DocstringExtractor # Extract and parse docstrings from AnalysisResult....
287+ extract_all(1) CC=5.0
288+ → parse(1) CC=2.0
289+ → _extract_summary(0) CC=2.0
290+ → _parse_sections(2) CC=8.0
291+ → _classify_section(0) CC=5.0
292292 code2docs/llm_helper.py:
293293 e: LLMHelper,_get_litellm
294294 LLMHelper # Thin wrapper around litellm for documentation generation.
@@ -324,17 +324,17 @@ I...
324324 should_run(0) CC=1.0
325325 Code2LlmAdapter # Adapter for code2llm analysis generation....
326326 should_run(0) CC=1.0
327+ code2docs/formatters/toc.py:
328+ e: generate_toc,extract_headings,_slugify
329+ generate_toc(markdown_content,max_depth)
330+ extract_headings(content,max_depth)
331+ _slugify(text)
327332 code2docs/sync/differ.py:
328333 e: ChangeInfo,Differ
329334 ChangeInfo # Describes a detected change....
330335 __str__(0) CC=1.0
331336 Differ # Detect changes between current source and previous state....
332337 __init__(1) CC=2.0
333- code2docs/formatters/toc.py:
334- e: generate_toc,extract_headings,_slugify
335- generate_toc(markdown_content,max_depth)
336- extract_headings(content,max_depth)
337- _slugify(text)
338338 code2docs/generators/changelog_gen.py:
339339 e: ChangelogEntry,ChangelogGenerator
340340 ChangelogEntry # A single changelog entry....
0 commit comments