code2llm 0.5.45__tar.gz → 0.5.46__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 (104) hide show
  1. {code2llm-0.5.45 → code2llm-0.5.46}/PKG-INFO +1 -1
  2. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/__init__.py +1 -1
  3. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/analyzer.py +21 -16
  4. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/config.py +31 -0
  5. code2llm-0.5.46/code2llm/core/core/file_analyzer.py +813 -0
  6. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/map_exporter.py +14 -2
  7. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/project_yaml_exporter.py +28 -1
  8. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon/helpers.py +14 -9
  9. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/__init__.py +1 -1
  10. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/PKG-INFO +1 -1
  11. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/SOURCES.txt +1 -0
  12. {code2llm-0.5.45 → code2llm-0.5.46}/pyproject.toml +1 -1
  13. code2llm-0.5.46/tests/test_multilanguage_e2e.py +351 -0
  14. code2llm-0.5.45/code2llm/core/core/file_analyzer.py +0 -365
  15. {code2llm-0.5.45 → code2llm-0.5.46}/LICENSE +0 -0
  16. {code2llm-0.5.45 → code2llm-0.5.46}/README.md +0 -0
  17. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/__main__.py +0 -0
  18. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/__init__.py +0 -0
  19. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/call_graph.py +0 -0
  20. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/cfg.py +0 -0
  21. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/coupling.py +0 -0
  22. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/data_analysis.py +0 -0
  23. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/dfg.py +0 -0
  24. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/pipeline_detector.py +0 -0
  25. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/side_effects.py +0 -0
  26. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/smells.py +0 -0
  27. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/analysis/type_inference.py +0 -0
  28. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/api.py +0 -0
  29. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli.py +0 -0
  30. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_analysis.py +0 -0
  31. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_exports/__init__.py +0 -0
  32. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_exports/code2logic.py +0 -0
  33. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_exports/formats.py +0 -0
  34. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_exports/orchestrator.py +0 -0
  35. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/cli_exports/prompt.py +0 -0
  36. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/__init__.py +0 -0
  37. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/core/__init__.py +0 -0
  38. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/core/file_cache.py +0 -0
  39. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/core/file_filter.py +0 -0
  40. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/core/refactoring.py +0 -0
  41. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/large_repo.py +0 -0
  42. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/models.py +0 -0
  43. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/__init__.py +0 -0
  44. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/cache.py +0 -0
  45. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/incremental.py +0 -0
  46. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/prioritizer.py +0 -0
  47. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/scanner.py +0 -0
  48. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming/strategies.py +0 -0
  49. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/streaming_analyzer.py +0 -0
  50. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/core/toon_size_manager.py +0 -0
  51. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/__init__.py +0 -0
  52. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/article_view.py +0 -0
  53. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/base.py +0 -0
  54. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/context_exporter.py +0 -0
  55. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/context_view.py +0 -0
  56. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/evolution_exporter.py +0 -0
  57. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/flow_constants.py +0 -0
  58. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/flow_exporter.py +0 -0
  59. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/flow_renderer.py +0 -0
  60. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/html_dashboard.py +0 -0
  61. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/json_exporter.py +0 -0
  62. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/llm_exporter.py +0 -0
  63. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/mermaid_exporter.py +0 -0
  64. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/readme_exporter.py +0 -0
  65. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/report_generators.py +0 -0
  66. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon/__init__.py +0 -0
  67. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon/metrics.py +0 -0
  68. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon/module_detail.py +0 -0
  69. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon/renderer.py +0 -0
  70. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon.py +0 -0
  71. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/toon_view.py +0 -0
  72. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/validate_project.py +0 -0
  73. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/exporters/yaml_exporter.py +0 -0
  74. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/generators/__init__.py +0 -0
  75. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/generators/llm_flow.py +0 -0
  76. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/generators/llm_task.py +0 -0
  77. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/generators/mermaid.py +0 -0
  78. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/config.py +0 -0
  79. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/entity_resolution.py +0 -0
  80. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/intent_matching.py +0 -0
  81. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/normalization.py +0 -0
  82. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/nlp/pipeline.py +0 -0
  83. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/patterns/__init__.py +0 -0
  84. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/patterns/detector.py +0 -0
  85. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/refactor/__init__.py +0 -0
  86. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm/refactor/prompt_engine.py +0 -0
  87. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/dependency_links.txt +0 -0
  88. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/entry_points.txt +0 -0
  89. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/requires.txt +0 -0
  90. {code2llm-0.5.45 → code2llm-0.5.46}/code2llm.egg-info/top_level.txt +0 -0
  91. {code2llm-0.5.45 → code2llm-0.5.46}/setup.cfg +0 -0
  92. {code2llm-0.5.45 → code2llm-0.5.46}/setup.py +0 -0
  93. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_advanced_analysis.py +0 -0
  94. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_analyzer.py +0 -0
  95. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_deep_analysis.py +0 -0
  96. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_edge_cases.py +0 -0
  97. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_flow_exporter.py +0 -0
  98. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_format_quality.py +0 -0
  99. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_nlp_pipeline.py +0 -0
  100. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_pipeline_detector.py +0 -0
  101. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_prompt_engine.py +0 -0
  102. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_prompt_txt.py +0 -0
  103. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_refactoring_engine.py +0 -0
  104. {code2llm-0.5.45 → code2llm-0.5.46}/tests/test_toon_v2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code2llm
3
- Version: 0.5.45
3
+ Version: 0.5.46
4
4
  Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
5
5
  Home-page: https://github.com/wronai/stts
6
6
  Author: STTS Project
@@ -8,7 +8,7 @@ Includes NLP Processing Pipeline for query normalization, intent matching,
8
8
  and entity resolution with multilingual support.
9
9
  """
10
10
 
11
- __version__ = "0.5.45"
11
+ __version__ = "0.5.46"
12
12
  __author__ = "STTS Project"
13
13
 
14
14
  # Core analysis components (lightweight, always needed)
@@ -5,7 +5,7 @@ from concurrent.futures import ProcessPoolExecutor, as_completed
5
5
  from pathlib import Path
6
6
  from typing import Dict, List, Optional, Tuple
7
7
 
8
- from .config import Config, FAST_CONFIG
8
+ from .config import Config, FAST_CONFIG, ALL_EXTENSIONS, LANGUAGE_EXTENSIONS
9
9
  from .models import AnalysisResult, FlowEdge, FlowNode, Pattern
10
10
  from ..analysis.call_graph import CallGraphExtractor
11
11
 
@@ -84,23 +84,28 @@ class ProjectAnalyzer:
84
84
  return merged
85
85
 
86
86
  def _collect_files(self, project_path: Path) -> List[Tuple[str, str]]:
87
- """Collect all Python files with their module names."""
87
+ """Collect all source files with their module names for all supported languages."""
88
88
  files = []
89
89
 
90
- for py_file in project_path.rglob("*.py"):
91
- file_str = str(py_file)
92
- if not self.file_filter.should_process(file_str):
93
- continue
94
-
95
- # Calculate module name
96
- rel_path = py_file.relative_to(project_path)
97
- parts = list(rel_path.parts)[:-1] # Remove .py
98
- if py_file.name == '__init__.py':
99
- module_name = '.'.join(parts) if parts else project_path.name
100
- else:
101
- module_name = '.'.join(parts + [py_file.stem])
102
-
103
- files.append((file_str, module_name))
90
+ # Collect files for all supported extensions
91
+ for ext in ALL_EXTENSIONS:
92
+ for src_file in project_path.rglob(f"*{ext}"):
93
+ file_str = str(src_file)
94
+ if not self.file_filter.should_process(file_str):
95
+ continue
96
+
97
+ # Calculate module name
98
+ rel_path = src_file.relative_to(project_path)
99
+ parts = list(rel_path.parts)[:-1] # Remove filename
100
+
101
+ # Handle init files for various languages
102
+ is_init = src_file.name in ('__init__.py', 'index.js', 'index.ts', 'mod.rs', 'lib.rs')
103
+ if is_init:
104
+ module_name = '.'.join(parts) if parts else project_path.name
105
+ else:
106
+ module_name = '.'.join(parts + [src_file.stem])
107
+
108
+ files.append((file_str, module_name))
104
109
 
105
110
  return files
106
111
 
@@ -150,6 +150,37 @@ ANALYSIS_MODES = {
150
150
  }
151
151
 
152
152
 
153
+ # Supported language extensions
154
+ LANGUAGE_EXTENSIONS = {
155
+ 'python': ['.py'],
156
+ 'typescript': ['.ts', '.tsx'],
157
+ 'javascript': ['.js', '.jsx', '.mjs', '.cjs'],
158
+ 'go': ['.go'],
159
+ 'rust': ['.rs'],
160
+ 'java': ['.java'],
161
+ 'cpp': ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.h'],
162
+ 'c': ['.c', '.h'],
163
+ 'csharp': ['.cs'],
164
+ 'ruby': ['.rb'],
165
+ 'php': ['.php'],
166
+ 'swift': ['.swift'],
167
+ 'kotlin': ['.kt', '.kts'],
168
+ 'scala': ['.scala'],
169
+ 'r': ['.r', '.R'],
170
+ 'matlab': ['.m'],
171
+ 'shell': ['.sh', '.bash', '.zsh'],
172
+ 'dart': ['.dart'],
173
+ 'elixir': ['.ex', '.exs'],
174
+ 'clojure': ['.clj', '.cljs'],
175
+ 'haskell': ['.hs'],
176
+ 'lua': ['.lua'],
177
+ 'perl': ['.pl', '.pm'],
178
+ 'raku': ['.raku', '.rakumod'],
179
+ }
180
+
181
+ # All supported extensions flat list
182
+ ALL_EXTENSIONS = [ext for exts in LANGUAGE_EXTENSIONS.values() for ext in exts]
183
+
153
184
  # Node types
154
185
  NODE_TYPES = {
155
186
  'FUNC': 'Function definition',