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.
Files changed (45) hide show
  1. {code2docs-0.1.1 → code2docs-0.1.2}/PKG-INFO +2 -2
  2. {code2docs-0.1.1 → code2docs-0.1.2}/README.md +1 -1
  3. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/__init__.py +1 -1
  4. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/endpoint_detector.py +12 -15
  5. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/PKG-INFO +2 -2
  6. {code2docs-0.1.1 → code2docs-0.1.2}/pyproject.toml +1 -1
  7. {code2docs-0.1.1 → code2docs-0.1.2}/LICENSE +0 -0
  8. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/__main__.py +0 -0
  9. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/__init__.py +0 -0
  10. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/dependency_scanner.py +0 -0
  11. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/docstring_extractor.py +0 -0
  12. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/analyzers/project_scanner.py +0 -0
  13. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/cli.py +0 -0
  14. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/config.py +0 -0
  15. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/__init__.py +0 -0
  16. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/badges.py +0 -0
  17. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/markdown.py +0 -0
  18. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/formatters/toc.py +0 -0
  19. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/__init__.py +0 -0
  20. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/api_reference_gen.py +0 -0
  21. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/architecture_gen.py +0 -0
  22. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/changelog_gen.py +0 -0
  23. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/examples_gen.py +0 -0
  24. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/module_docs_gen.py +0 -0
  25. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/generators/readme_gen.py +0 -0
  26. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/__init__.py +0 -0
  27. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/differ.py +0 -0
  28. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/updater.py +0 -0
  29. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/sync/watcher.py +0 -0
  30. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/api_module.md.j2 +0 -0
  31. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/architecture.md.j2 +0 -0
  32. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/example_usage.py.j2 +0 -0
  33. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/index.md.j2 +0 -0
  34. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs/templates/readme.md.j2 +0 -0
  35. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/SOURCES.txt +0 -0
  36. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/dependency_links.txt +0 -0
  37. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/entry_points.txt +0 -0
  38. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/requires.txt +0 -0
  39. {code2docs-0.1.1 → code2docs-0.1.2}/code2docs.egg-info/top_level.txt +0 -0
  40. {code2docs-0.1.1 → code2docs-0.1.2}/setup.cfg +0 -0
  41. {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_analyzers.py +0 -0
  42. {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_code2docs.py +0 -0
  43. {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_config.py +0 -0
  44. {code2docs-0.1.1 → code2docs-0.1.2}/tests/test_formatters.py +0 -0
  45. {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.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
- ![version](https://img.shields.io/badge/version-0.1.1-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
43
+ ![version](https://img.shields.io/badge/version-0.1.2-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
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
- ![version](https://img.shields.io/badge/version-0.1.1-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.1.2-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
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.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
- # Flask patterns
62
- match = self.FLASK_PATTERNS.search(decorator)
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=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="flask",
70
+ framework="fastapi",
74
71
  docstring=func.docstring,
75
72
  params=func.args,
76
73
  return_type=func.returns,
77
74
  )
78
75
 
79
- # FastAPI patterns
80
- match = self.FASTAPI_PATTERNS.search(decorator)
76
+ # Flask patterns (@app.route only)
77
+ match = self.FLASK_PATTERNS.search(decorator)
81
78
  if match:
82
79
  return Endpoint(
83
- method=match.group(1).upper(),
84
- path=match.group(2),
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="fastapi",
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.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
- ![version](https://img.shields.io/badge/version-0.1.1-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
43
+ ![version](https://img.shields.io/badge/version-0.1.2-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![docs](https://img.shields.io/badge/docs-auto--generated-blueviolet)
44
44
 
45
45
  > Auto-generate and sync project documentation from source code analysis.
46
46
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "code2docs"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Auto-generate and sync project documentation from source code analysis"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes