code2docs 3.0.27__tar.gz → 3.0.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code2docs-3.0.27 → code2docs-3.0.29}/PKG-INFO +8 -272
- {code2docs-3.0.27 → code2docs-3.0.29}/README.md +7 -271
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/__init__.py +1 -1
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/_registry_adapters.py +37 -25
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/api_reference_gen.py +59 -41
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/code2llm_gen.py +98 -56
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/contributing_gen.py +43 -28
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/examples_gen.py +116 -100
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/getting_started_gen.py +63 -41
- code2docs-3.0.29/code2docs/generators/module_docs_gen.py +246 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/org_readme_gen.py +51 -26
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/readme_gen.py +42 -53
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/PKG-INFO +8 -272
- {code2docs-3.0.27 → code2docs-3.0.29}/pyproject.toml +1 -1
- code2docs-3.0.27/code2docs/generators/module_docs_gen.py +0 -198
- {code2docs-3.0.27 → code2docs-3.0.29}/LICENSE +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/__main__.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/analyzers/__init__.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/analyzers/dependency_scanner.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/analyzers/docstring_extractor.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/analyzers/endpoint_detector.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/analyzers/project_scanner.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/base.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/cli.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/config.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/examples/advanced_usage.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/examples/quickstart.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/formatters/__init__.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/formatters/badges.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/formatters/markdown.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/formatters/toc.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/__init__.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/_source_links.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/api_changelog_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/architecture_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/changelog_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/config_docs_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/coverage_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/depgraph_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/generators/mkdocs_gen.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/llm_helper.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/registry.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/sync/__init__.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/sync/differ.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/sync/updater.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/sync/watcher.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/api_module.md.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/architecture.md.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/example_usage.py.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/index.md.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/module_doc.md.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs/templates/readme.md.j2 +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/SOURCES.txt +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/dependency_links.txt +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/entry_points.txt +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/requires.txt +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/code2docs.egg-info/top_level.txt +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/setup.cfg +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_analyzers.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_cli.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_code2docs.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_config.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_formatters.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_generators.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_llm_helper.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_registry.py +0 -0
- {code2docs-3.0.27 → code2docs-3.0.29}/tests/test_sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2docs
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.29
|
|
4
4
|
Summary: Auto-generate and sync project documentation from source code analysis
|
|
5
5
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -51,22 +51,19 @@ Provides-Extra: all
|
|
|
51
51
|
Requires-Dist: code2docs[git,llm,mkdocs,watch]; extra == "all"
|
|
52
52
|
Dynamic: license-file
|
|
53
53
|
|
|
54
|
-
# code2docs
|
|
55
|
-
|
|
56
|
-
|
|
57
54
|
## AI Cost Tracking
|
|
58
55
|
|
|
59
|
-
     
|
|
57
|
+
  
|
|
61
58
|
|
|
62
|
-
- 🤖 **LLM usage:** $7.5000 (
|
|
63
|
-
- 👤 **Human dev:** ~$
|
|
59
|
+
- 🤖 **LLM usage:** $7.5000 (68 commits)
|
|
60
|
+
- 👤 **Human dev:** ~$2384 (23.8h @ $100/h, 30min dedup)
|
|
64
61
|
|
|
65
|
-
Generated on 2026-04-
|
|
62
|
+
Generated on 2026-04-19 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
66
63
|
|
|
67
64
|
---
|
|
68
65
|
|
|
69
|
-
  
|
|
70
67
|
|
|
71
68
|
> Auto-generate and sync project documentation from source code analysis.
|
|
72
69
|
|
|
@@ -99,9 +96,6 @@ pip install code2docs[mkdocs] # MkDocs integration
|
|
|
99
96
|
pip install code2docs[dev] # development tools
|
|
100
97
|
```
|
|
101
98
|
|
|
102
|
-
## Quick Start
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
99
|
# Generate full documentation for a project
|
|
106
100
|
code2docs ./my-project
|
|
107
101
|
|
|
@@ -206,7 +200,7 @@ code2docs can update only specific sections of an existing README using markers:
|
|
|
206
200
|
```markdown
|
|
207
201
|
<!-- code2docs:start --># code2docs
|
|
208
202
|
|
|
209
|
-
   
|
|
210
204
|
> **276** functions | **57** classes | **51** files | CC̄ = 3.8
|
|
211
205
|
|
|
212
206
|
> Auto-generated project documentation from source code analysis.
|
|
@@ -215,8 +209,6 @@ code2docs can update only specific sections of an existing README using markers:
|
|
|
215
209
|
**License:** Apache-2.0[(LICENSE)](./LICENSE)
|
|
216
210
|
**Repository:** [https://github.com/wronai/code2docs](https://github.com/wronai/code2docs)
|
|
217
211
|
|
|
218
|
-
## Installation
|
|
219
|
-
|
|
220
212
|
### From PyPI
|
|
221
213
|
|
|
222
214
|
```bash
|
|
@@ -242,11 +234,6 @@ pip install code2docs[dev] # development tools
|
|
|
242
234
|
pip install code2docs[all] # all optional features
|
|
243
235
|
```
|
|
244
236
|
|
|
245
|
-
## Quick Start
|
|
246
|
-
|
|
247
|
-
### CLI Usage
|
|
248
|
-
|
|
249
|
-
```bash
|
|
250
237
|
# Generate full documentation for your project
|
|
251
238
|
code2docs ./my-project
|
|
252
239
|
|
|
@@ -299,47 +286,6 @@ When you run `code2docs`, the following files are produced:
|
|
|
299
286
|
└── mkdocs.yml # MkDocs site configuration
|
|
300
287
|
```
|
|
301
288
|
|
|
302
|
-
## Configuration
|
|
303
|
-
|
|
304
|
-
Create `code2docs.yaml` in your project root (or run `code2docs init`):
|
|
305
|
-
|
|
306
|
-
```yaml
|
|
307
|
-
project:
|
|
308
|
-
name: my-project
|
|
309
|
-
source: ./
|
|
310
|
-
output: ./docs/
|
|
311
|
-
|
|
312
|
-
readme:
|
|
313
|
-
sections:
|
|
314
|
-
- overview
|
|
315
|
-
- install
|
|
316
|
-
- quickstart
|
|
317
|
-
- api
|
|
318
|
-
- structure
|
|
319
|
-
badges:
|
|
320
|
-
- version
|
|
321
|
-
- python
|
|
322
|
-
- coverage
|
|
323
|
-
sync_markers: true
|
|
324
|
-
|
|
325
|
-
docs:
|
|
326
|
-
api_reference: true
|
|
327
|
-
module_docs: true
|
|
328
|
-
architecture: true
|
|
329
|
-
changelog: true
|
|
330
|
-
|
|
331
|
-
examples:
|
|
332
|
-
auto_generate: true
|
|
333
|
-
from_entry_points: true
|
|
334
|
-
|
|
335
|
-
sync:
|
|
336
|
-
strategy: markers # markers | full | git-diff
|
|
337
|
-
watch: false
|
|
338
|
-
ignore:
|
|
339
|
-
- "tests/"
|
|
340
|
-
- "__pycache__"
|
|
341
|
-
```
|
|
342
|
-
|
|
343
289
|
## Sync Markers
|
|
344
290
|
|
|
345
291
|
code2docs can update only specific sections of an existing README using HTML comment markers:
|
|
@@ -359,8 +305,6 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
|
|
|
359
305
|
code2docs/
|
|
360
306
|
├── registry ├── llm_helper├── code2docs/ ├── __main__ ├── 04_sync_and_watch ├── 05_custom_generators ├── quickstart ├── 06_formatters ├── advanced_usage ├── 03_programmatic_api ├── entry_points ├── 07_web_frameworks ├── class_examples ├── basic_usage ├── 01_cli_usage ├── 02_configuration ├── updater ├── sync/ ├── watcher ├── base ├── quickstart ├── advanced_usage ├── markdown ├── badges ├── toc ├── formatters/ ├── differ ├── coverage_gen ├── _source_links ├── depgraph_gen ├── getting_started_gen ├── config_docs_gen ├── changelog_gen ├── generators/ ├── code2llm_gen ├── module_docs_gen ├── api_reference_gen ├── examples_gen ├── mkdocs_gen ├── config ├── api_changelog_gen ├── _registry_adapters ├── readme_gen ├── contributing_gen ├── analyzers/ ├── dependency_scanner ├── endpoint_detector ├── architecture_gen ├── project_scanner ├── docstring_extractor ├── cli```
|
|
361
307
|
|
|
362
|
-
## API Overview
|
|
363
|
-
|
|
364
308
|
### Classes
|
|
365
309
|
|
|
366
310
|
- **`GeneratorRegistry`** — Registry of documentation generators.
|
|
@@ -535,9 +479,6 @@ code2docs/
|
|
|
535
479
|
|
|
536
480
|
We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
537
481
|
|
|
538
|
-
### Development Setup
|
|
539
|
-
|
|
540
|
-
```bash
|
|
541
482
|
# Clone the repository
|
|
542
483
|
git clone https://github.com/wronai/code2docs
|
|
543
484
|
cd code2docs
|
|
@@ -545,10 +486,6 @@ cd code2docs
|
|
|
545
486
|
# Install in development mode
|
|
546
487
|
pip install -e ".[dev]"
|
|
547
488
|
|
|
548
|
-
# Run tests
|
|
549
|
-
pytest
|
|
550
|
-
```
|
|
551
|
-
|
|
552
489
|
## Documentation
|
|
553
490
|
|
|
554
491
|
- 📖 [Full Documentation](https://github.com/wronai/code2docs/tree/main/docs) — API reference, module docs, architecture
|
|
@@ -585,167 +522,6 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
|
|
|
585
522
|
code2docs/
|
|
586
523
|
├── registry ├── llm_helper├── code2docs/ ├── __main__ ├── 04_sync_and_watch ├── 05_custom_generators ├── 06_formatters ├── 03_programmatic_api ├── entry_points ├── 07_web_frameworks ├── class_examples ├── basic_usage ├── 01_cli_usage ├── 02_configuration ├── updater ├── sync/ ├── watcher ├── differ ├── quickstart ├── base ├── advanced_usage ├── badges ├── markdown ├── formatters/ ├── toc ├── coverage_gen ├── _source_links ├── depgraph_gen ├── getting_started_gen ├── config_docs_gen ├── changelog_gen ├── generators/ ├── code2llm_gen ├── module_docs_gen ├── api_reference_gen ├── examples_gen ├── mkdocs_gen ├── config ├── api_changelog_gen ├── _registry_adapters ├── contributing_gen ├── readme_gen ├── analyzers/ ├── docstring_extractor ├── endpoint_detector ├── architecture_gen ├── project_scanner ├── cli ├── dependency_scanner```
|
|
587
524
|
|
|
588
|
-
## API Overview
|
|
589
|
-
|
|
590
|
-
### Classes
|
|
591
|
-
|
|
592
|
-
- **`GeneratorRegistry`** — Registry of documentation generators.
|
|
593
|
-
- **`LLMHelper`** — Thin wrapper around litellm for documentation generation.
|
|
594
|
-
- **`MetricsReportGenerator`** — Generate a metrics report from code analysis.
|
|
595
|
-
- **`APIChangelogGenerator`** — Generate changelog based on API changes.
|
|
596
|
-
- **`CustomGenerator`** — Example of extending the base generator class.
|
|
597
|
-
- **`Updater`** — Apply selective documentation updates based on detected changes.
|
|
598
|
-
- **`ChangeInfo`** — Describes a detected change.
|
|
599
|
-
- **`Differ`** — Detect changes between current source and previous state.
|
|
600
|
-
- **`GenerateContext`** — Shared context passed to all generators during a run.
|
|
601
|
-
- **`BaseGenerator`** — Abstract base for all documentation generators.
|
|
602
|
-
- **`MarkdownFormatter`** — Helper for constructing Markdown documents.
|
|
603
|
-
- **`CoverageGenerator`** — Generate docs/coverage.md — docstring coverage report.
|
|
604
|
-
- **`SourceLinker`** — Build source-code links (relative paths + optional GitHub/GitLab URLs).
|
|
605
|
-
- **`DepGraphGenerator`** — Generate docs/dependency-graph.md with Mermaid diagrams.
|
|
606
|
-
- **`GettingStartedGenerator`** — Generate docs/getting-started.md from entry points and dependencies.
|
|
607
|
-
- **`ConfigDocsGenerator`** — Generate docs/configuration.md from Code2DocsConfig dataclass.
|
|
608
|
-
- **`ChangelogEntry`** — A single changelog entry.
|
|
609
|
-
- **`ChangelogGenerator`** — Generate CHANGELOG.md from git log and analysis diff.
|
|
610
|
-
- **`Code2LlmGenerator`** — Generate code2llm analysis files in project/ directory.
|
|
611
|
-
- **`ModuleDocsGenerator`** — Generate docs/modules.md — consolidated module documentation.
|
|
612
|
-
- **`ApiReferenceGenerator`** — Generate docs/api.md — consolidated API reference.
|
|
613
|
-
- **`ExamplesGenerator`** — Generate examples/ — usage examples from public API signatures.
|
|
614
|
-
- **`MkDocsGenerator`** — Generate mkdocs.yml from the docs/ directory structure.
|
|
615
|
-
- **`ReadmeConfig`** — Configuration for README generation.
|
|
616
|
-
- **`DocsConfig`** — Configuration for docs/ generation.
|
|
617
|
-
- **`ExamplesConfig`** — Configuration for examples/ generation.
|
|
618
|
-
- **`SyncConfig`** — Configuration for synchronization.
|
|
619
|
-
- **`Code2LlmConfig`** — Configuration for code2llm analysis generation.
|
|
620
|
-
- **`LLMConfig`** — Configuration for optional LLM-assisted documentation generation.
|
|
621
|
-
- **`Code2DocsConfig`** — Main configuration for code2docs.
|
|
622
|
-
- **`ApiChange`** — A single API change between two analysis snapshots.
|
|
623
|
-
- **`ApiChangelogGenerator`** — Generate API changelog by diffing current analysis with a saved snapshot.
|
|
624
|
-
- **`ReadmeGeneratorAdapter`** — —
|
|
625
|
-
- **`ApiReferenceAdapter`** — —
|
|
626
|
-
- **`ModuleDocsAdapter`** — —
|
|
627
|
-
- **`ArchitectureAdapter`** — —
|
|
628
|
-
- **`DepGraphAdapter`** — —
|
|
629
|
-
- **`CoverageAdapter`** — —
|
|
630
|
-
- **`ApiChangelogAdapter`** — —
|
|
631
|
-
- **`ExamplesAdapter`** — —
|
|
632
|
-
- **`MkDocsAdapter`** — —
|
|
633
|
-
- **`GettingStartedAdapter`** — —
|
|
634
|
-
- **`ConfigDocsAdapter`** — —
|
|
635
|
-
- **`ContributingAdapter`** — —
|
|
636
|
-
- **`Code2LlmAdapter`** — Adapter for code2llm analysis generation.
|
|
637
|
-
- **`ContributingGenerator`** — Generate CONTRIBUTING.md by detecting dev tools from pyproject.toml.
|
|
638
|
-
- **`ReadmeGenerator`** — Generate README.md from AnalysisResult.
|
|
639
|
-
- **`DocstringInfo`** — Parsed docstring with sections.
|
|
640
|
-
- **`DocstringExtractor`** — Extract and parse docstrings from AnalysisResult.
|
|
641
|
-
- **`Endpoint`** — Represents a detected web endpoint.
|
|
642
|
-
- **`EndpointDetector`** — Detects web endpoints from decorator patterns in source code.
|
|
643
|
-
- **`ArchitectureGenerator`** — Generate docs/architecture.md — architecture overview with diagrams.
|
|
644
|
-
- **`ProjectScanner`** — Wraps code2llm's ProjectAnalyzer with code2docs-specific defaults.
|
|
645
|
-
- **`DefaultGroup`** — Click Group that routes unknown subcommands to 'generate'.
|
|
646
|
-
- **`DependencyInfo`** — Information about a project dependency.
|
|
647
|
-
- **`ProjectDependencies`** — All detected project dependencies.
|
|
648
|
-
- **`DependencyScanner`** — Scan and parse project dependency files.
|
|
649
|
-
|
|
650
|
-
### Functions
|
|
651
|
-
|
|
652
|
-
- `detect_changes_example(project_path)` — Detect what files have changed since last documentation generation.
|
|
653
|
-
- `update_docs_incrementally(project_path)` — Update only the parts of docs that need changing.
|
|
654
|
-
- `force_full_regeneration(project_path)` — Force full regeneration of all documentation.
|
|
655
|
-
- `watch_and_auto_regenerate(project_path, interval)` — Watch for file changes and auto-regenerate documentation.
|
|
656
|
-
- `custom_watcher_with_hooks(project_path)` — Set up a custom watcher with pre/post generation hooks.
|
|
657
|
-
- `sync_with_git_changes(project_path)` — Only regenerate docs for files changed in git.
|
|
658
|
-
- `generate_custom_report(project_path)` — Generate a custom metrics report.
|
|
659
|
-
- `markdown_formatting_examples()` — Demonstrate markdown formatting utilities.
|
|
660
|
-
- `generate_complex_document()` — Generate a complex markdown document using the formatter.
|
|
661
|
-
- `badge_examples()` — Generate various badge examples.
|
|
662
|
-
- `toc_examples()` — Demonstrate table of contents generation.
|
|
663
|
-
- `build_custom_readme()` — Build a custom README using formatters.
|
|
664
|
-
- `generate_readme_simple(project_path)` — Generate README.md content from a project.
|
|
665
|
-
- `generate_full_documentation(project_path)` — Generate complete documentation for a project.
|
|
666
|
-
- `custom_documentation_pipeline(project_path)` — Create a custom documentation pipeline.
|
|
667
|
-
- `inspect_project_structure(project_path)` — Inspect project structure from analysis.
|
|
668
|
-
- `generate_docs_if_needed(project_path, force)` — Only generate docs if code has changed.
|
|
669
|
-
- `detect_flask_endpoints(project_path)` — Detect Flask endpoints in a project.
|
|
670
|
-
- `detect_fastapi_endpoints(project_path)` — Detect FastAPI endpoints in a project.
|
|
671
|
-
- `generate_api_docs_from_endpoints(project_path, output_dir)` — Generate API documentation from detected endpoints.
|
|
672
|
-
- `create_example_web_apps(target_dir)` — Create example Flask and FastAPI apps for testing.
|
|
673
|
-
- `document_web_project(project_path)` — Complete workflow: detect endpoints and generate docs.
|
|
674
|
-
- `run_cli_basic(project_path)` — Run code2docs CLI programmatically.
|
|
675
|
-
- `run_cli_with_config(project_path, config_path)` — Run with custom configuration.
|
|
676
|
-
- `create_basic_config()` — Create a basic configuration.
|
|
677
|
-
- `create_advanced_config()` — Create advanced configuration with all options.
|
|
678
|
-
- `save_yaml_config_example(path)` — Save example YAML config to file.
|
|
679
|
-
- `load_config_from_yaml(path)` — Load configuration from YAML file.
|
|
680
|
-
- `start_watcher(project_path, config)` — Start watching project for file changes and auto-resync docs.
|
|
681
|
-
- `generate_badges(project_name, badge_types, stats, deps)` — Generate shields.io badge Markdown strings.
|
|
682
|
-
- `generate_toc(markdown_content, max_depth)` — Generate a table of contents from Markdown headings.
|
|
683
|
-
- `extract_headings(content, max_depth)` — Extract headings from Markdown content.
|
|
684
|
-
- `generate_docs(project_path, config)` — High-level function to generate all documentation.
|
|
685
|
-
- `generate_code2llm_analysis(project_path, config)` — Convenience function to generate code2llm analysis.
|
|
686
|
-
- `generate_readme(project_path, output, sections, sync_markers)` — Convenience function to generate a README.
|
|
687
|
-
- `analyze_and_document(project_path, config)` — Convenience function: analyze a project in one call.
|
|
688
|
-
- `main()` — code2docs — Auto-generate project documentation from source code.
|
|
689
|
-
- `generate(project_path, config_path, readme_only, sections)` — Generate documentation (default command).
|
|
690
|
-
- `sync(project_path, config_path, verbose, dry_run)` — Synchronize documentation with source code changes.
|
|
691
|
-
- `watch(project_path, config_path, verbose)` — Watch for file changes and auto-regenerate docs.
|
|
692
|
-
- `init(project_path, output)` — Initialize code2docs.yaml configuration file.
|
|
693
|
-
- `check(project_path, config_path, target)` — Health check — verify documentation completeness.
|
|
694
|
-
- `diff(project_path, config_path)` — Preview what would change without writing anything.
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
## Project Structure
|
|
698
|
-
|
|
699
|
-
📦 `code2docs` (1 functions)
|
|
700
|
-
📄 `code2docs.__main__`
|
|
701
|
-
📦 `code2docs.analyzers`
|
|
702
|
-
📄 `code2docs.analyzers.dependency_scanner` (6 functions, 3 classes)
|
|
703
|
-
📄 `code2docs.analyzers.docstring_extractor` (10 functions, 2 classes)
|
|
704
|
-
📄 `code2docs.analyzers.endpoint_detector` (3 functions, 2 classes)
|
|
705
|
-
📄 `code2docs.analyzers.project_scanner` (4 functions, 1 classes)
|
|
706
|
-
📄 `code2docs.base` (3 functions, 2 classes)
|
|
707
|
-
📄 `code2docs.cli` (14 functions, 1 classes)
|
|
708
|
-
📄 `code2docs.config` (5 functions, 7 classes)
|
|
709
|
-
📄 `code2docs.examples.advanced_usage`
|
|
710
|
-
📄 `code2docs.examples.quickstart`
|
|
711
|
-
📦 `code2docs.formatters`
|
|
712
|
-
📄 `code2docs.formatters.badges` (2 functions)
|
|
713
|
-
📄 `code2docs.formatters.markdown` (13 functions, 1 classes)
|
|
714
|
-
📄 `code2docs.formatters.toc` (3 functions)
|
|
715
|
-
📦 `code2docs.generators` (1 functions)
|
|
716
|
-
📄 `code2docs.generators._registry_adapters` (26 functions, 13 classes)
|
|
717
|
-
📄 `code2docs.generators._source_links` (6 functions, 1 classes)
|
|
718
|
-
📄 `code2docs.generators.api_changelog_gen` (9 functions, 2 classes)
|
|
719
|
-
📄 `code2docs.generators.api_reference_gen` (7 functions, 1 classes)
|
|
720
|
-
📄 `code2docs.generators.architecture_gen` (10 functions, 1 classes)
|
|
721
|
-
📄 `code2docs.generators.changelog_gen` (6 functions, 2 classes)
|
|
722
|
-
📄 `code2docs.generators.code2llm_gen` (5 functions, 1 classes)
|
|
723
|
-
📄 `code2docs.generators.config_docs_gen` (4 functions, 1 classes)
|
|
724
|
-
📄 `code2docs.generators.contributing_gen` (8 functions, 1 classes)
|
|
725
|
-
📄 `code2docs.generators.coverage_gen` (7 functions, 1 classes)
|
|
726
|
-
📄 `code2docs.generators.depgraph_gen` (9 functions, 1 classes)
|
|
727
|
-
📄 `code2docs.generators.examples_gen` (14 functions, 1 classes)
|
|
728
|
-
📄 `code2docs.generators.getting_started_gen` (8 functions, 1 classes)
|
|
729
|
-
📄 `code2docs.generators.mkdocs_gen` (4 functions, 1 classes)
|
|
730
|
-
📄 `code2docs.generators.module_docs_gen` (9 functions, 1 classes)
|
|
731
|
-
📄 `code2docs.generators.readme_gen` (18 functions, 1 classes)
|
|
732
|
-
📄 `code2docs.llm_helper` (7 functions, 1 classes)
|
|
733
|
-
📄 `code2docs.registry` (4 functions, 1 classes)
|
|
734
|
-
📦 `code2docs.sync`
|
|
735
|
-
📄 `code2docs.sync.differ` (7 functions, 2 classes)
|
|
736
|
-
📄 `code2docs.sync.updater` (2 functions, 1 classes)
|
|
737
|
-
📄 `code2docs.sync.watcher` (1 functions)
|
|
738
|
-
📄 `examples.01_cli_usage` (2 functions)
|
|
739
|
-
📄 `examples.02_configuration` (4 functions)
|
|
740
|
-
📄 `examples.03_programmatic_api` (5 functions)
|
|
741
|
-
📄 `examples.04_sync_and_watch` (6 functions)
|
|
742
|
-
📄 `examples.05_custom_generators` (13 functions, 3 classes)
|
|
743
|
-
📄 `examples.06_formatters` (5 functions)
|
|
744
|
-
📄 `examples.07_web_frameworks` (5 functions)
|
|
745
|
-
📄 `examples.basic_usage`
|
|
746
|
-
📄 `examples.class_examples`
|
|
747
|
-
📄 `examples.entry_points`
|
|
748
|
-
|
|
749
525
|
## Requirements
|
|
750
526
|
|
|
751
527
|
- Python >= >=3.9
|
|
@@ -759,9 +535,6 @@ code2docs/
|
|
|
759
535
|
|
|
760
536
|
We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
761
537
|
|
|
762
|
-
### Development Setup
|
|
763
|
-
|
|
764
|
-
```bash
|
|
765
538
|
# Clone the repository
|
|
766
539
|
git clone https://github.com/wronai/code2docs
|
|
767
540
|
cd code2docs
|
|
@@ -769,40 +542,6 @@ cd code2docs
|
|
|
769
542
|
# Install in development mode
|
|
770
543
|
pip install -e ".[dev]"
|
|
771
544
|
|
|
772
|
-
# Run tests
|
|
773
|
-
pytest
|
|
774
|
-
```
|
|
775
|
-
|
|
776
|
-
## Documentation
|
|
777
|
-
|
|
778
|
-
- 📖 [Full Documentation](https://github.com/wronai/code2docs/tree/main/docs) — API reference, module docs, architecture
|
|
779
|
-
- 🚀 [Getting Started](https://github.com/wronai/code2docs/blob/main/docs/getting-started.md) — Quick start guide
|
|
780
|
-
- 📚 [API Reference](https://github.com/wronai/code2docs/blob/main/docs/api.md) — Complete API documentation
|
|
781
|
-
- 🔧 [Configuration](https://github.com/wronai/code2docs/blob/main/docs/configuration.md) — Configuration options
|
|
782
|
-
- 💡 [Examples](./examples) — Usage examples and code samples
|
|
783
|
-
|
|
784
|
-
### Generated Files
|
|
785
|
-
|
|
786
|
-
| Output | Description | Link |
|
|
787
|
-
|--------|-------------|------|
|
|
788
|
-
| `README.md` | Project overview (this file) | — |
|
|
789
|
-
| `docs/api.md` | Consolidated API reference | [View](./docs/api.md) |
|
|
790
|
-
| `docs/modules.md` | Module reference with metrics | [View](./docs/modules.md) |
|
|
791
|
-
| `docs/architecture.md` | Architecture with diagrams | [View](./docs/architecture.md) |
|
|
792
|
-
| `docs/dependency-graph.md` | Dependency graphs | [View](./docs/dependency-graph.md) |
|
|
793
|
-
| `docs/coverage.md` | Docstring coverage report | [View](./docs/coverage.md) |
|
|
794
|
-
| `docs/getting-started.md` | Getting started guide | [View](./docs/getting-started.md) |
|
|
795
|
-
| `docs/configuration.md` | Configuration reference | [View](./docs/configuration.md) |
|
|
796
|
-
| `docs/api-changelog.md` | API change tracking | [View](./docs/api-changelog.md) |
|
|
797
|
-
| `CONTRIBUTING.md` | Contribution guidelines | [View](./CONTRIBUTING.md) |
|
|
798
|
-
| `examples/` | Usage examples | [Browse](./examples) |
|
|
799
|
-
| `mkdocs.yml` | MkDocs configuration | — |
|
|
800
|
-
|
|
801
|
-
<!-- code2docs:end -->
|
|
802
|
-
```
|
|
803
|
-
|
|
804
|
-
Content outside markers is preserved.
|
|
805
|
-
|
|
806
545
|
## Architecture
|
|
807
546
|
|
|
808
547
|
```
|
|
@@ -840,6 +579,3 @@ code2docs/
|
|
|
840
579
|
## License
|
|
841
580
|
|
|
842
581
|
Licensed under Apache-2.0.
|
|
843
|
-
## Author
|
|
844
|
-
|
|
845
|
-
Tom Sapletta
|