code2docs 0.1.1__tar.gz → 0.1.2__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-0.1.1 → code2docs-0.1.2}/PKG-INFO +2 -2
- {code2docs-0.1.1 → code2docs-0.1.2}/README.md +1 -1
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/__init__.py +1 -1
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/endpoint_detector.py +12 -15
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/PKG-INFO +2 -2
- {code2docs-0.1.1 → code2docs-0.1.2}/pyproject.toml +1 -1
- {code2docs-0.1.1 → code2docs-0.1.2}/LICENSE +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/__main__.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/__init__.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/dependency_scanner.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/docstring_extractor.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/project_scanner.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/cli.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/config.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/__init__.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/badges.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/markdown.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/toc.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/__init__.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/api_reference_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/architecture_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/changelog_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/examples_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/module_docs_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/readme_gen.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/__init__.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/differ.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/updater.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/watcher.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/api_module.md.j2 +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/architecture.md.j2 +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/example_usage.py.j2 +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/index.md.j2 +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/readme.md.j2 +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/SOURCES.txt +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/dependency_links.txt +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/entry_points.txt +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/requires.txt +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/top_level.txt +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/setup.cfg +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_analyzers.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_code2docs.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_config.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_formatters.py +0 -0
- {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2docs
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -40,7 +40,7 @@ Dynamic: license-file
|
|
|
40
40
|
|
|
41
41
|
# code2docs
|
|
42
42
|
|
|
43
|
-
  
|
|
44
44
|
|
|
45
45
|
> Auto-generate and sync project documentation from source code analysis.
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# code2docs
|
|
2
2
|
|
|
3
|
-
  
|
|
4
4
|
|
|
5
5
|
> Auto-generate and sync project documentation from source code analysis.
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@ Uses code2llm's AnalysisResult to produce human-readable documentation:
|
|
|
5
5
|
README.md, API references, module docs, examples, and architecture diagrams.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "0.1.
|
|
8
|
+
__version__ = "0.1.2"
|
|
9
9
|
__author__ = "Tom Sapletta"
|
|
10
10
|
|
|
11
11
|
from .config import Code2DocsConfig
|
|
@@ -26,12 +26,12 @@ class Endpoint:
|
|
|
26
26
|
class EndpointDetector:
|
|
27
27
|
"""Detects web endpoints from decorator patterns in source code."""
|
|
28
28
|
|
|
29
|
-
FLASK_PATTERNS = re.compile(
|
|
30
|
-
r'@(?:app|blueprint|bp)\.(route|get|post|put|delete|patch)\s*\(\s*["\']([^"\']+)["\']'
|
|
31
|
-
)
|
|
32
29
|
FASTAPI_PATTERNS = re.compile(
|
|
33
30
|
r'@(?:app|router)\.(get|post|put|delete|patch|options|head)\s*\(\s*["\']([^"\']+)["\']'
|
|
34
31
|
)
|
|
32
|
+
FLASK_PATTERNS = re.compile(
|
|
33
|
+
r'@(?:app|blueprint|bp)\.route\s*\(\s*["\']([^"\']+)["\']'
|
|
34
|
+
)
|
|
35
35
|
DJANGO_URL_PATTERN = re.compile(
|
|
36
36
|
r'(?:path|re_path|url)\s*\(\s*["\']([^"\']+)["\']'
|
|
37
37
|
)
|
|
@@ -58,34 +58,31 @@ class EndpointDetector:
|
|
|
58
58
|
|
|
59
59
|
def _parse_decorator(self, decorator: str, func: FunctionInfo) -> Optional[Endpoint]:
|
|
60
60
|
"""Try to parse a route decorator string."""
|
|
61
|
-
#
|
|
62
|
-
match = self.
|
|
61
|
+
# FastAPI patterns (checked first - more specific)
|
|
62
|
+
match = self.FASTAPI_PATTERNS.search(decorator)
|
|
63
63
|
if match:
|
|
64
|
-
method = match.group(1).upper()
|
|
65
|
-
if method == "ROUTE":
|
|
66
|
-
method = "GET"
|
|
67
64
|
return Endpoint(
|
|
68
|
-
method=
|
|
65
|
+
method=match.group(1).upper(),
|
|
69
66
|
path=match.group(2),
|
|
70
67
|
function_name=func.name,
|
|
71
68
|
file=func.file,
|
|
72
69
|
line=func.line,
|
|
73
|
-
framework="
|
|
70
|
+
framework="fastapi",
|
|
74
71
|
docstring=func.docstring,
|
|
75
72
|
params=func.args,
|
|
76
73
|
return_type=func.returns,
|
|
77
74
|
)
|
|
78
75
|
|
|
79
|
-
#
|
|
80
|
-
match = self.
|
|
76
|
+
# Flask patterns (@app.route only)
|
|
77
|
+
match = self.FLASK_PATTERNS.search(decorator)
|
|
81
78
|
if match:
|
|
82
79
|
return Endpoint(
|
|
83
|
-
method=
|
|
84
|
-
path=match.group(
|
|
80
|
+
method="GET",
|
|
81
|
+
path=match.group(1),
|
|
85
82
|
function_name=func.name,
|
|
86
83
|
file=func.file,
|
|
87
84
|
line=func.line,
|
|
88
|
-
framework="
|
|
85
|
+
framework="flask",
|
|
89
86
|
docstring=func.docstring,
|
|
90
87
|
params=func.args,
|
|
91
88
|
return_type=func.returns,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2docs
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -40,7 +40,7 @@ Dynamic: license-file
|
|
|
40
40
|
|
|
41
41
|
# code2docs
|
|
42
42
|
|
|
43
|
-
  
|
|
44
44
|
|
|
45
45
|
> Auto-generate and sync project documentation from source code analysis.
|
|
46
46
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|