Skip to content

Commit 02eed2f

Browse files
feat(docs): configuration management system
changes: - file: config.py area: config modified: [ReadmeConfig] - file: readme_gen.py area: docs added: [_extract_extras] modified: [ReadmeGenerator, _build_context] stats: lines: "+1992/-81 (net +1911)" files: 13 complexity: "Large structural change (normalized)"
1 parent 60e0918 commit 02eed2f

File tree

18 files changed

+2016
-86
lines changed

18 files changed

+2016
-86
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [0.2.4] - 2026-03-07
11+
12+
### Docs
13+
- Update code2docs/README.md
14+
- Update code2docs/docs/api-changelog.md
15+
- Update code2docs/docs/api.md
16+
- Update code2docs/docs/architecture.md
17+
- Update code2docs/docs/configuration.md
18+
- Update code2docs/docs/coverage.md
19+
- Update code2docs/docs/dependency-graph.md
20+
- Update code2docs/docs/getting-started.md
21+
- Update code2docs/docs/modules.md
22+
23+
### Other
24+
- Update code2docs/config.py
25+
- Update code2docs/generators/readme_gen.py
26+
- Update code2docs/templates/readme.md.j2
27+
- Update project.sh
28+
1029
## [0.2.3] - 2026-03-07
1130

1231
### 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-0.2.3-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-0.2.4-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-0.2.3-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-153-green)
143+
![version](https://img.shields.io/badge/version-0.2.4-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-153-green)
144144
> **153** functions | **30** classes | **28** files | CC̄ = 0.0
145145

146146
## Installation

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.3
1+
0.2.4

code2docs/README.md

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<!-- code2docs:start --># code2docs
22

3-
![version](https://img.shields.io/badge/version-0.1.0-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-227-green)
4-
> **227** functions | **51** classes | **38** files | CC̄ = 3.9
3+
![version](https://img.shields.io/badge/version-0.1.0-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-228-green)
4+
> **228** functions | **51** classes | **38** files | CC̄ = 4.0
55
66

7+
**Author:** Tom Softreck <tom@sapletta.com>
8+
**License:** Not specified
9+
**Repository:** [https://github.com/wronai/code2docs](https://github.com/wronai/code2docs)
10+
711
## How It Works
812

913
code2docs uses static code analysis to automatically generate human-readable documentation from your source code.
@@ -83,18 +87,20 @@ generate_docs("./my-project", config=config)
8387
| `Differ` | Detect changes between current source and previous state. |
8488
| `MarkdownFormatter` | Helper for constructing Markdown documents. |
8589
| `ReadmeGenerator` | Generate README.md from AnalysisResult. |
86-
| `GenerateContext` | Shared context passed to all generators during a run. |
87-
| `BaseGenerator` | Abstract base for all documentation generators. |
8890
| `CoverageGenerator` | Generate docs/coverage.md — docstring coverage report. |
8991
| `SourceLinker` | Build source-code links (relative paths + optional GitHub/GitLab URLs). |
9092
| `DepGraphGenerator` | Generate docs/dependency-graph.md with Mermaid diagrams. |
9193
| `GettingStartedGenerator` | Generate docs/getting-started.md from entry points and dependencies. |
94+
| `GenerateContext` | Shared context passed to all generators during a run. |
95+
| `BaseGenerator` | Abstract base for all documentation generators. |
9296
| `ConfigDocsGenerator` | Generate docs/configuration.md from Code2DocsConfig dataclass. |
9397
| `ChangelogEntry` | A single changelog entry. |
9498
| `ChangelogGenerator` | Generate CHANGELOG.md from git log and analysis diff. |
95-
| `ApiReferenceGenerator` | Generate docs/api.md — consolidated API reference. |
9699
| `ModuleDocsGenerator` | Generate docs/modules.md — consolidated module documentation. |
100+
| `ApiReferenceGenerator` | Generate docs/api.md — consolidated API reference. |
97101
| `MkDocsGenerator` | Generate mkdocs.yml from the docs/ directory structure. |
102+
| `ExamplesGenerator` | Generate examples/ — usage examples from public API signatures. |
103+
| `DefaultGroup` | Click Group that routes unknown subcommands to 'generate'. |
98104
| `ReadmeGeneratorAdapter` ||
99105
| `ApiReferenceAdapter` ||
100106
| `ModuleDocsAdapter` ||
@@ -107,26 +113,24 @@ generate_docs("./my-project", config=config)
107113
| `GettingStartedAdapter` ||
108114
| `ConfigDocsAdapter` ||
109115
| `ContributingAdapter` ||
110-
| `ExamplesGenerator` | Generate examples/ — usage examples from public API signatures. |
111116
| `ApiChange` | A single API change between two analysis snapshots. |
112117
| `ApiChangelogGenerator` | Generate API changelog by diffing current analysis with a saved snapshot. |
113118
| `ContributingGenerator` | Generate CONTRIBUTING.md by detecting dev tools from pyproject.toml. |
114119
| `ArchitectureGenerator` | Generate docs/architecture.md — architecture overview with diagrams. |
115-
| `DefaultGroup` | Click Group that routes unknown subcommands to 'generate'. |
116120
| `ReadmeConfig` | Configuration for README generation. |
117121
| `DocsConfig` | Configuration for docs/ generation. |
118122
| `ExamplesConfig` | Configuration for examples/ generation. |
119123
| `SyncConfig` | Configuration for synchronization. |
120124
| `LLMConfig` | Configuration for optional LLM-assisted documentation generation. |
121125
| `Code2DocsConfig` | Main configuration for code2docs. |
122126
| `ProjectScanner` | Wraps code2llm's ProjectAnalyzer with code2docs-specific defaults. |
127+
| `Endpoint` | Represents a detected web endpoint. |
128+
| `EndpointDetector` | Detects web endpoints from decorator patterns in source code. |
123129
| `DocstringInfo` | Parsed docstring with sections. |
124130
| `DocstringExtractor` | Extract and parse docstrings from AnalysisResult. |
125131
| `DependencyInfo` | Information about a project dependency. |
126132
| `ProjectDependencies` | All detected project dependencies. |
127133
| `DependencyScanner` | Scan and parse project dependency files. |
128-
| `Endpoint` | Represents a detected web endpoint. |
129-
| `EndpointDetector` | Detects web endpoints from decorator patterns in source code. |
130134

131135
### Public Functions
132136

@@ -181,7 +185,7 @@ generate_docs("./my-project", config=config)
181185
📄 `generators.getting_started_gen` (8 functions, 1 classes)
182186
📄 `generators.mkdocs_gen` (4 functions, 1 classes)
183187
📄 `generators.module_docs_gen` (9 functions, 1 classes)
184-
📄 `generators.readme_gen` (16 functions, 1 classes)
188+
📄 `generators.readme_gen` (17 functions, 1 classes)
185189
📄 `llm_helper` (7 functions, 1 classes)
186190
📄 `registry` (4 functions, 1 classes)
187191
📦 `sync`
@@ -190,23 +194,57 @@ generate_docs("./my-project", config=config)
190194
📄 `sync.watcher` (1 functions)
191195

192196

193-
## Generated Documentation
197+
## Contributing
198+
199+
**Contributors:**
200+
- Tom Softreck <tom@sapletta.com>
201+
- Tom Sapletta <tom-sapletta-com@users.noreply.github.com>
202+
203+
We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
204+
205+
### Development Setup
206+
207+
```bash
208+
# Clone the repository
209+
git clone https://github.com/wronai/code2docs
210+
cd code2docs
211+
212+
# Install in development mode
213+
pip install -e ".[dev]"
214+
215+
# Run tests
216+
pytest
217+
```
218+
219+
220+
## Documentation
221+
222+
This project includes comprehensive auto-generated documentation:
223+
224+
### Quick Links
225+
- 📖 [Full Documentation](https://github.com/wronai/code2docs/tree/main/docs) — API reference, module docs, architecture
226+
- 🚀 [Getting Started](https://github.com/wronai/code2docs/blob/main/docs/getting-started.md) — Quick start guide
227+
- 📚 [API Reference](https://github.com/wronai/code2docs/blob/main/docs/api.md) — Complete API documentation
228+
- 🔧 [Configuration](https://github.com/wronai/code2docs/blob/main/docs/configuration.md) — Configuration options
229+
- 💡 [Examples](./examples) — Usage examples and code samples
230+
231+
### Generated Files
194232

195233
When you run `code2docs`, the following files are produced:
196234

197-
| Output | Description |
198-
|--------|-------------|
199-
| `README.md` | Project overview with badges, stats, and API summary |
200-
| `docs/api.md` | Consolidated API reference with signatures and complexity |
201-
| `docs/modules.md` | Module reference with metrics and class/function details |
202-
| `docs/architecture.md` | Architecture overview with Mermaid diagrams |
203-
| `docs/dependency-graph.md` | Module dependency graph and coupling matrix |
204-
| `docs/coverage.md` | Docstring coverage report |
205-
| `docs/getting-started.md` | Getting started guide |
206-
| `docs/configuration.md` | Configuration reference |
207-
| `docs/api-changelog.md` | API change tracking between runs |
208-
| `CONTRIBUTING.md` | Contribution guidelines |
209-
| `examples/` | Auto-generated usage examples |
210-
| `mkdocs.yml` | MkDocs site configuration |
235+
| Output | Description | Link |
236+
|--------|-------------|------|
237+
| `README.md` | Project overview (this file) | |
238+
| `docs/api.md` | Consolidated API reference | [View](./docs/api.md) |
239+
| `docs/modules.md` | Module reference with metrics | [View](./docs/modules.md) |
240+
| `docs/architecture.md` | Architecture with diagrams | [View](./docs/architecture.md) |
241+
| `docs/dependency-graph.md` | Dependency graphs | [View](./docs/dependency-graph.md) |
242+
| `docs/coverage.md` | Docstring coverage report | [View](./docs/coverage.md) |
243+
| `docs/getting-started.md` | Getting started guide | [View](./docs/getting-started.md) |
244+
| `docs/configuration.md` | Configuration reference | [View](./docs/configuration.md) |
245+
| `docs/api-changelog.md` | API change tracking | [View](./docs/api-changelog.md) |
246+
| `CONTRIBUTING.md` | Contribution guidelines | [View](./CONTRIBUTING.md) |
247+
| `examples/` | Usage examples | [Browse](./examples) |
248+
| `mkdocs.yml` | MkDocs configuration | |
211249

212250
<!-- code2docs:end -->

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__ = "0.2.3"
8+
__version__ = "0.2.4"
99
__author__ = "Tom Sapletta"
1010

1111
from .config import Code2DocsConfig

code2docs/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
class ReadmeConfig:
2121
"""Configuration for README generation."""
2222
sections: List[str] = field(default_factory=lambda: [
23-
"overview", "how_it_works", "install", "quickstart", "api",
24-
"structure", "endpoints", "contributing", "generated_docs",
23+
"overview", "install", "quickstart", "generated_output", "config",
24+
"api", "structure", "requirements", "contributing", "docs_nav",
2525
])
2626
badges: List[str] = field(default_factory=lambda: [
2727
"version", "python", "coverage", "complexity",

code2docs/docs/api-changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# code2docs — API Changelog
2+
3+
**No API changes detected since last snapshot.**

0 commit comments

Comments
 (0)