Skip to content

Commit e8c5b39

Browse files
refactor(docs): code analysis engine
stats: lines: "+24400/-24694 (net -294)" files: 11 complexity: "Stable complexity"
1 parent d3fe52c commit e8c5b39

File tree

16 files changed

+24422
-24699
lines changed

16 files changed

+24422
-24699
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [3.0.22] - 2026-03-15
11+
12+
### Docs
13+
- Update project/context.md
14+
15+
### Other
16+
- Update project/analysis.json
17+
- Update project/analysis.toon
18+
- Update project/analysis.yaml
19+
- Update project/calls.mmd
20+
- Update project/dashboard.html
21+
- Update project/flow.mmd
22+
- Update project/flow.toon
23+
- Update project/map.toon
24+
- Update project/project.toon
25+
- Update project/project.yaml
26+
1027
## [3.0.21] - 2026-03-15
1128

1229
### Docs

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# code2docs
22

3-
![version](https://img.shields.io/badge/version-3.0.21-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
3+
![version](https://img.shields.io/badge/version-3.0.22-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
44

55
> Auto-generate and sync project documentation from source code analysis.
66
@@ -140,7 +140,7 @@ code2docs can update only specific sections of an existing README using markers:
140140
```markdown
141141
<!-- code2docs:start --># code2docs
142142

143-
![version](https://img.shields.io/badge/version-3.0.21-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![coverage](https://img.shields.io/badge/coverage-unknown-lightgrey) ![functions](https://img.shields.io/badge/functions-276-green)
143+
![version](https://img.shields.io/badge/version-3.0.22-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![coverage](https://img.shields.io/badge/coverage-unknown-lightgrey) ![functions](https://img.shields.io/badge/functions-276-green)
144144
> **276** functions | **57** classes | **51** files | CC̄ = 3.8
145145

146146
> Auto-generated project documentation from source code analysis.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.21
1+
3.0.22

code2docs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
README.md, API references, module docs, examples, and architecture diagrams.
66
"""
77

8-
__version__ = "3.0.21"
8+
__version__ = "3.0.22"
99
__author__ = "Tom Sapletta"
1010

1111
from .config import Code2DocsConfig

project/analysis.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

project/analysis.toon

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# CC̄=4.4 | critical:28/298 | dups:0 | cycles:1
33

44
HEALTH[12]:
5+
🟡 CC _extract_project_metadata CC=29 (limit:15)
56
🟡 CC _render_first_usage CC=15 (limit:15)
67
🟡 CC _generate_intro CC=16 (limit:15)
78
🟡 CC parse_gitignore CC=15 (limit:15)
@@ -13,7 +14,6 @@ HEALTH[12]:
1314
🟡 CC _generate_advanced CC=22 (limit:15)
1415
🟡 CC _generate_html CC=15 (limit:15)
1516
🟡 CC _render_code_style CC=16 (limit:15)
16-
🟡 CC _extract_project_metadata CC=29 (limit:15)
1717

1818
REFACTOR[2]:
1919
1. split 12 high-CC methods (CC>15)
@@ -99,10 +99,10 @@ FUNCTIONS (CC≥10, 28 of 258):
9999
10.0 GettingStartedGenerator._render_prerequisites 15n 2exit cond+ret
100100
10.0 ConfigDocsGenerator._render_section 14n 2exit loops+cond+ret
101101
10.0 ApiReferenceGenerator._has_content 6n 3exit cond+ret
102-
10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
102+
10.0 _run_check 11n 1exit loops+cond
103103
10.0 ApiChangelogGenerator._diff_functions 9n 1exit loops+cond
104104
10.0 ApiChangelogGenerator._diff_classes 15n 1exit loops+cond
105-
10.0 _run_check 11n 1exit loops+cond
105+
10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
106106

107107
summary:
108108
critical(≥10): 28 | high(5-10): 58 | medium(2-5): 101 | low(<2): 71
@@ -146,8 +146,8 @@ CLASSES:
146146
Code2DocsConfig █████ 4m CC̄=4.0 max=10
147147
BaseGenerator ████ 3m CC̄=1.0 max=1
148148
IndexHtmlAdapter ████ 3m CC̄=6.0 max=15 !!
149-
EndpointDetector ████ 3m CC̄=4.0 max=5
150149
ProjectScanner ████ 3m CC̄=1.3 max=2
150+
EndpointDetector ████ 3m CC̄=4.0 max=5
151151
Updater ██ 2m CC̄=3.0 max=4
152152
ReadmeGeneratorAdapter ██ 2m CC̄=2.5 max=4
153153
ApiReferenceAdapter ██ 2m CC̄=2.0 max=2
@@ -164,20 +164,20 @@ CLASSES:
164164
Code2LlmAdapter ██ 2m CC̄=4.0 max=7
165165
OrgReadmeAdapter ██ 2m CC̄=3.0 max=4
166166
ChangeInfo █ 1m CC̄=1.0 max=1
167-
LLMConfig █ 1m CC̄=1.0 max=1
168167
DefaultGroup █ 1m CC̄=4.0 max=4
168+
LLMConfig █ 1m CC̄=1.0 max=1
169169
GenerateContext 0m CC̄=0.0 max=0.0
170170
ChangelogEntry 0m CC̄=0.0 max=0.0
171+
ApiChange 0m CC̄=0.0 max=0.0
171172
ReadmeConfig 0m CC̄=0.0 max=0.0
172173
DocsConfig 0m CC̄=0.0 max=0.0
173174
ExamplesConfig 0m CC̄=0.0 max=0.0
174175
SyncConfig 0m CC̄=0.0 max=0.0
175176
Code2LlmConfig 0m CC̄=0.0 max=0.0
176-
ApiChange 0m CC̄=0.0 max=0.0
177177
DependencyInfo 0m CC̄=0.0 max=0.0
178178
ProjectDependencies 0m CC̄=0.0 max=0.0
179-
Endpoint 0m CC̄=0.0 max=0.0
180179
DocstringInfo 0m CC̄=0.0 max=0.0
180+
Endpoint 0m CC̄=0.0 max=0.0
181181

182182
D:
183183
code2docs/generators/readme_gen.py:
@@ -271,18 +271,6 @@ Thi...
271271
e: ConfigDocsGenerator
272272
ConfigDocsGenerator # Generate docs/configuration.md from Code2DocsConfig dataclas...
273273
__init__(2) CC=1.0
274-
code2docs/config.py:
275-
e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
276-
ReadmeConfig # Configuration for README generation....
277-
DocsConfig # Configuration for docs/ generation....
278-
ExamplesConfig # Configuration for examples/ generation....
279-
SyncConfig # Configuration for synchronization....
280-
Code2LlmConfig # Configuration for code2llm analysis generation....
281-
LLMConfig # Configuration for optional LLM-assisted documentation genera...
282-
from_env(0) CC=1.0
283-
Code2DocsConfig # Main configuration for code2docs....
284-
__post_init__(0) CC=2.0
285-
→ _detect_repo_url(-1) CC=3.0
286274
code2docs/cli.py:
287275
e: DefaultGroup,main,generate,sync,watch,init,check,diff,_load_config,_run_generate,_run_sync,_run_watch,_run_check,_run_diff
288276
DefaultGroup # Click Group that routes unknown subcommands to 'generate'....
@@ -301,6 +289,18 @@ Thi...
301289
_run_watch(project_path,config)
302290
_run_check(project_path,config,target)
303291
_run_diff(project_path,config)
292+
code2docs/config.py:
293+
e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
294+
ReadmeConfig # Configuration for README generation....
295+
DocsConfig # Configuration for docs/ generation....
296+
ExamplesConfig # Configuration for examples/ generation....
297+
SyncConfig # Configuration for synchronization....
298+
Code2LlmConfig # Configuration for code2llm analysis generation....
299+
LLMConfig # Configuration for optional LLM-assisted documentation genera...
300+
from_env(0) CC=1.0
301+
Code2DocsConfig # Main configuration for code2docs....
302+
__post_init__(0) CC=2.0
303+
→ _detect_repo_url(-1) CC=3.0
304304
examples/07_web_frameworks.py:
305305
e: detect_flask_endpoints,detect_fastapi_endpoints,generate_api_docs_from_endpoints,create_example_web_apps,document_web_project
306306
detect_flask_endpoints(project_path)

0 commit comments

Comments
 (0)