Skip to content

Commit cd0b911

Browse files
feat(tests): code analysis engine
stats: lines: "+49298/-177 (net +49121)" files: 12 complexity: "Stable complexity"
1 parent 0225e62 commit cd0b911

22 files changed

+49328
-182
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [3.0.18] - 2026-03-09
11+
12+
### Docs
13+
- Update project/context.md
14+
15+
### Test
16+
- Update tests/project/README.md
17+
- Update tests/project/analysis.toon
18+
- Update tests/project/context.md
19+
- Update tests/project/dashboard.html
20+
- Update tests/project/project.yaml
21+
- Update tests/project/prompt.txt
22+
23+
### Other
24+
- Update project/analysis.json
25+
- Update project/analysis.toon
26+
- Update project/analysis.yaml
27+
- Update project/calls.mmd
28+
- Update project/dashboard.html
29+
- Update project/flow.mmd
30+
- Update project/flow.toon
31+
- Update project/map.toon
32+
- Update project/project.yaml
33+
- Update project/prompt.txt
34+
1035
## [3.0.17] - 2026-03-09
1136

1237
### 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.17-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.18-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.17-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.18-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.17
1+
3.0.18

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.17"
8+
__version__ = "3.0.18"
99
__author__ = "Tom Sapletta"
1010

1111
from .config import Code2DocsConfig

project/analysis.json

Lines changed: 1 addition & 0 deletions
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,7 +2,6 @@
22
# CC̄=4.4 | critical:27/295 | dups:0 | cycles:1
33

44
HEALTH[11]:
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)
@@ -13,6 +12,7 @@ HEALTH[11]:
1312
🟡 CC _render_module_section CC=25 (limit:15)
1413
🟡 CC _generate_advanced CC=22 (limit:15)
1514
🟡 CC _render_code_style CC=16 (limit:15)
15+
🟡 CC _extract_project_metadata CC=29 (limit:15)
1616

1717
REFACTOR[2]:
1818
1. split 11 high-CC methods (CC>15)
@@ -97,10 +97,10 @@ FUNCTIONS (CC≥10, 27 of 255):
9797
10.0 GettingStartedGenerator._render_prerequisites 15n 2exit cond+ret
9898
10.0 ConfigDocsGenerator._render_section 14n 2exit loops+cond+ret
9999
10.0 ApiReferenceGenerator._has_content 6n 3exit cond+ret
100-
10.0 _run_check 11n 1exit loops+cond
100+
10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
101101
10.0 ApiChangelogGenerator._diff_functions 9n 1exit loops+cond
102102
10.0 ApiChangelogGenerator._diff_classes 15n 1exit loops+cond
103-
10.0 Code2DocsConfig.from_yaml 20n 3exit cond+ret
103+
10.0 _run_check 11n 1exit loops+cond
104104

105105
summary:
106106
critical(≥10): 27 | high(5-10): 58 | medium(2-5): 100 | low(<2): 70
@@ -143,8 +143,8 @@ CLASSES:
143143
Code2LlmGenerator █████ 4m CC̄=6.2 max=17 !!
144144
Code2DocsConfig █████ 4m CC̄=4.0 max=10
145145
BaseGenerator ████ 3m CC̄=1.0 max=1
146-
ProjectScanner ████ 3m CC̄=1.3 max=2
147146
EndpointDetector ████ 3m CC̄=4.0 max=5
147+
ProjectScanner ████ 3m CC̄=1.3 max=2
148148
Updater ██ 2m CC̄=3.0 max=4
149149
ReadmeGeneratorAdapter ██ 2m CC̄=2.5 max=4
150150
ApiReferenceAdapter ██ 2m CC̄=2.0 max=2
@@ -161,20 +161,20 @@ CLASSES:
161161
Code2LlmAdapter ██ 2m CC̄=4.0 max=7
162162
OrgReadmeAdapter ██ 2m CC̄=3.0 max=4
163163
ChangeInfo █ 1m CC̄=1.0 max=1
164-
DefaultGroup █ 1m CC̄=4.0 max=4
165164
LLMConfig █ 1m CC̄=1.0 max=1
165+
DefaultGroup █ 1m CC̄=4.0 max=4
166166
GenerateContext 0m CC̄=0.0 max=0.0
167167
ChangelogEntry 0m CC̄=0.0 max=0.0
168-
ApiChange 0m CC̄=0.0 max=0.0
169168
ReadmeConfig 0m CC̄=0.0 max=0.0
170169
DocsConfig 0m CC̄=0.0 max=0.0
171170
ExamplesConfig 0m CC̄=0.0 max=0.0
172171
SyncConfig 0m CC̄=0.0 max=0.0
173172
Code2LlmConfig 0m CC̄=0.0 max=0.0
173+
ApiChange 0m CC̄=0.0 max=0.0
174174
DocstringInfo 0m CC̄=0.0 max=0.0
175+
Endpoint 0m CC̄=0.0 max=0.0
175176
DependencyInfo 0m CC̄=0.0 max=0.0
176177
ProjectDependencies 0m CC̄=0.0 max=0.0
177-
Endpoint 0m CC̄=0.0 max=0.0
178178

179179
D:
180180
code2docs/generators/readme_gen.py:
@@ -236,6 +236,18 @@ Thi...
236236
e: ConfigDocsGenerator
237237
ConfigDocsGenerator # Generate docs/configuration.md from Code2DocsConfig dataclas...
238238
__init__(2) CC=1.0
239+
code2docs/config.py:
240+
e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
241+
ReadmeConfig # Configuration for README generation....
242+
DocsConfig # Configuration for docs/ generation....
243+
ExamplesConfig # Configuration for examples/ generation....
244+
SyncConfig # Configuration for synchronization....
245+
Code2LlmConfig # Configuration for code2llm analysis generation....
246+
LLMConfig # Configuration for optional LLM-assisted documentation genera...
247+
from_env(0) CC=1.0
248+
Code2DocsConfig # Main configuration for code2docs....
249+
__post_init__(0) CC=2.0
250+
→ _detect_repo_url(-1) CC=3.0
239251
code2docs/cli.py:
240252
e: DefaultGroup,main,generate,sync,watch,init,check,diff,_load_config,_run_generate,_run_sync,_run_watch,_run_check,_run_diff
241253
DefaultGroup # Click Group that routes unknown subcommands to 'generate'....
@@ -254,18 +266,6 @@ Thi...
254266
_run_watch(project_path,config)
255267
_run_check(project_path,config,target)
256268
_run_diff(project_path,config)
257-
code2docs/config.py:
258-
e: ReadmeConfig,DocsConfig,ExamplesConfig,SyncConfig,Code2LlmConfig,LLMConfig,Code2DocsConfig
259-
ReadmeConfig # Configuration for README generation....
260-
DocsConfig # Configuration for docs/ generation....
261-
ExamplesConfig # Configuration for examples/ generation....
262-
SyncConfig # Configuration for synchronization....
263-
Code2LlmConfig # Configuration for code2llm analysis generation....
264-
LLMConfig # Configuration for optional LLM-assisted documentation genera...
265-
from_env(0) CC=1.0
266-
Code2DocsConfig # Main configuration for code2docs....
267-
__post_init__(0) CC=2.0
268-
→ _detect_repo_url(-1) CC=3.0
269269
examples/07_web_frameworks.py:
270270
e: detect_flask_endpoints,detect_fastapi_endpoints,generate_api_docs_from_endpoints,create_example_web_apps,document_web_project
271271
detect_flask_endpoints(project_path)

0 commit comments

Comments
 (0)