code2flow-toon 0.2.4__tar.gz → 0.3.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 (68) hide show
  1. {code2flow_toon-0.2.4/code2flow_toon.egg-info → code2flow_toon-0.3.2}/PKG-INFO +50 -45
  2. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/README.md +49 -44
  3. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/__init__.py +1 -1
  4. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/__init__.py +7 -1
  5. code2flow_toon-0.3.2/code2flow/analysis/pipeline_detector.py +445 -0
  6. code2flow_toon-0.3.2/code2flow/analysis/side_effects.py +313 -0
  7. code2flow_toon-0.3.2/code2flow/analysis/type_inference.py +306 -0
  8. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/cli.py +44 -15
  9. code2flow_toon-0.3.2/code2flow/exporters/__init__.py +35 -0
  10. code2flow_toon-0.2.4/code2flow/exporters/llm_exporter.py → code2flow_toon-0.3.2/code2flow/exporters/context_exporter.py +11 -3
  11. code2flow_toon-0.3.2/code2flow/exporters/flow_exporter.py +570 -0
  12. code2flow_toon-0.3.2/code2flow/exporters/llm_exporter.py +12 -0
  13. code2flow_toon-0.3.2/code2flow/exporters/map_exporter.py +218 -0
  14. code2flow_toon-0.3.2/code2flow/exporters/toon.py +982 -0
  15. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/__init__.py +1 -1
  16. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2/code2flow_toon.egg-info}/PKG-INFO +50 -45
  17. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/SOURCES.txt +11 -1
  18. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/pyproject.toml +1 -1
  19. code2flow_toon-0.3.2/tests/test_format_quality.py +351 -0
  20. code2flow_toon-0.3.2/tests/test_sprint2_flow.py +452 -0
  21. code2flow_toon-0.3.2/tests/test_sprint3_pipelines.py +416 -0
  22. code2flow_toon-0.3.2/tests/test_toon_v2.py +293 -0
  23. code2flow_toon-0.2.4/code2flow/exporters/__init__.py +0 -17
  24. code2flow_toon-0.2.4/code2flow/exporters/toon.py +0 -401
  25. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/LICENSE +0 -0
  26. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/__main__.py +0 -0
  27. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/call_graph.py +0 -0
  28. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/cfg.py +0 -0
  29. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/coupling.py +0 -0
  30. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/data_analysis.py +0 -0
  31. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/dfg.py +0 -0
  32. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/smells.py +0 -0
  33. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/__init__.py +0 -0
  34. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/analyzer.py +0 -0
  35. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/config.py +0 -0
  36. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/models.py +0 -0
  37. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/streaming_analyzer.py +0 -0
  38. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/base.py +0 -0
  39. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/json_exporter.py +0 -0
  40. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/mermaid_exporter.py +0 -0
  41. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/yaml_exporter.py +0 -0
  42. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/llm_flow_generator.py +0 -0
  43. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/llm_task_generator.py +0 -0
  44. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/mermaid_generator.py +0 -0
  45. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/config.py +0 -0
  46. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/entity_resolution.py +0 -0
  47. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/intent_matching.py +0 -0
  48. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/normalization.py +0 -0
  49. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/pipeline.py +0 -0
  50. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/patterns/__init__.py +0 -0
  51. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/patterns/detector.py +0 -0
  52. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/refactor/__init__.py +0 -0
  53. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/refactor/prompt_engine.py +0 -0
  54. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/visualizers/__init__.py +0 -0
  55. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/visualizers/graph.py +0 -0
  56. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/dependency_links.txt +0 -0
  57. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/entry_points.txt +0 -0
  58. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/requires.txt +0 -0
  59. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/top_level.txt +0 -0
  60. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/setup.cfg +0 -0
  61. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/setup.py +0 -0
  62. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_advanced_analysis.py +0 -0
  63. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_analyzer.py +0 -0
  64. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_edge_cases.py +0 -0
  65. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_nlp_pipeline.py +0 -0
  66. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_refactoring_engine.py +0 -0
  67. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_sprint4.py +0 -0
  68. {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_sprint5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code2flow-toon
3
- Version: 0.2.4
3
+ Version: 0.3.2
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
@@ -53,15 +53,17 @@ Dynamic: requires-python
53
53
 
54
54
  ![img.png](img.png)
55
55
 
56
- ## 🚀 New: TOON Format
56
+ ## 🚀 New: TOON Format v2
57
57
 
58
- **TOON** is the new default output format - optimized for performance and readability:
58
+ **TOON v2** is the default output format - scannable, severity-sorted, prompt-ready:
59
59
 
60
- - **🎯 10x smaller** than standard YAML (204KB vs 2.5MB)
61
- - **⚡ Faster processing** with intelligent sorting
62
- - **📊 Enhanced insights** with complexity analysis
63
- - **🔍 Smart recommendations** for refactoring
64
- - **📋 Complete validation** with built-in testing
60
+ - **🎯 Health-first design** - issues sorted by severity (🔴/🟡)
61
+ - **📊 Coupling matrix** - fan-in/fan-out analysis
62
+ - **🔍 Duplicate detection** - find identical classes
63
+ - **📈 Layered architecture** - package-level metrics
64
+ - **⚡ Inline markers** - `!!` (CC≥15), `!` (CC≥10), `×DUP`
65
+ - **🚫 Smart filtering** - excludes venv, site-packages
66
+ - **📋 Actionable REFACTOR** - concrete steps, not just problems
65
67
 
66
68
  ```bash
67
69
  # Default: TOON format only
@@ -202,43 +204,46 @@ code2flow /path/to/project -o my_analysis
202
204
  | `call_graph.png` | Call graph visualization | ~3.7MB |
203
205
  | `llm_prompt.md` | LLM-ready analysis summary | ~35KB |
204
206
 
205
- ## 🎯 TOON Format Structure
206
-
207
- The TOON format provides optimized, human-readable output:
208
-
209
- ```yaml
210
- meta:
211
- project: /path/to/project
212
- mode: hybrid
213
- generated: '2026-02-28T22:13:30'
214
- version: '2.0'
215
-
216
- stats:
217
- files_processed: 42
218
- functions_found: 443
219
- classes_found: 77
220
- nodes_created: 2734
221
- edges_created: 3223
222
-
223
- functions:
224
- - name: export
225
- module: code2flow.exporters.base.LLMPromptExporter
226
- complexity: 45.0
227
- tier: critical
228
- nodes: 52
229
- has_loops: true
230
- has_conditions: true
231
- has_returns: false
232
-
233
- insights:
234
- complexity_summary:
235
- critical_functions: 115
236
- high_complexity: 64
237
- avg_complexity: 3.17
238
- recommendations:
239
- - type: complexity
240
- priority: high
241
- message: "Refactor 115 critical functions"
207
+ ## 🎯 TOON v2 Format Structure
208
+
209
+ The TOON v2 format is designed for rapid scanning and actionable insights:
210
+
211
+ ```
212
+ # code2flow | 43f 10693L | py:43 | 2026-02-28
213
+ # CC̄=4.6 | critical:39/406 | dups:0 | cycles:0
214
+
215
+ HEALTH[20]:
216
+ 🔴 GOD code2flow/core/analyzer.py = 765L, 4 classes, 30m, max CC=20
217
+ 🟡 CC validate_mermaid_file CC=42 (limit:15)
218
+
219
+ REFACTOR[4]:
220
+ 1. split code2flow/core/analyzer.py (god module)
221
+ 2. split 17 high-CC methods (CC>15)
222
+
223
+ COUPLING:
224
+ ┌─────────────┬──────────────────────────────────────┐
225
+ │ Package │ fan-in fan-out status │
226
+ ├─────────────┼──────────────────────────────────────┤
227
+ │ core │ 12 45 !! split needed
228
+ exporters │ 5 28 hub │
229
+ └─────────────┴──────────────────────────────────────┘
230
+
231
+ LAYERS:
232
+ code2flow/ CC̄=5.0 ←in:0 →out:0
233
+ !! toon 982L 1C 29m CC=31
234
+ │ !! analyzer 765L 4C 30m CC=20
235
+
236
+ FUNCTIONS (CC≥10, 39 of 406):
237
+ 56.0 main 19n 4exit cond+ret !! split
238
+ 42.0 validate_mermaid_file 6n 3exit cond+ret !! split
239
+
240
+ HOTSPOTS:
241
+ #1 main fan=45 "calls 45 functions"
242
+ #2 analyze_project fan=18 "analysis pipeline, 18 stages"
243
+
244
+ CLASSES:
245
+ ToonExporter ████████████████████████ 29m CC̄=9.5 max=31 !!
246
+ DataAnalyzer ██████████ 13m CC̄=9.9 max=17 !!
242
247
  ```
243
248
 
244
249
  ### Complexity Tiers
@@ -4,15 +4,17 @@
4
4
 
5
5
  ![img.png](img.png)
6
6
 
7
- ## 🚀 New: TOON Format
7
+ ## 🚀 New: TOON Format v2
8
8
 
9
- **TOON** is the new default output format - optimized for performance and readability:
9
+ **TOON v2** is the default output format - scannable, severity-sorted, prompt-ready:
10
10
 
11
- - **🎯 10x smaller** than standard YAML (204KB vs 2.5MB)
12
- - **⚡ Faster processing** with intelligent sorting
13
- - **📊 Enhanced insights** with complexity analysis
14
- - **🔍 Smart recommendations** for refactoring
15
- - **📋 Complete validation** with built-in testing
11
+ - **🎯 Health-first design** - issues sorted by severity (🔴/🟡)
12
+ - **📊 Coupling matrix** - fan-in/fan-out analysis
13
+ - **🔍 Duplicate detection** - find identical classes
14
+ - **📈 Layered architecture** - package-level metrics
15
+ - **⚡ Inline markers** - `!!` (CC≥15), `!` (CC≥10), `×DUP`
16
+ - **🚫 Smart filtering** - excludes venv, site-packages
17
+ - **📋 Actionable REFACTOR** - concrete steps, not just problems
16
18
 
17
19
  ```bash
18
20
  # Default: TOON format only
@@ -153,43 +155,46 @@ code2flow /path/to/project -o my_analysis
153
155
  | `call_graph.png` | Call graph visualization | ~3.7MB |
154
156
  | `llm_prompt.md` | LLM-ready analysis summary | ~35KB |
155
157
 
156
- ## 🎯 TOON Format Structure
157
-
158
- The TOON format provides optimized, human-readable output:
159
-
160
- ```yaml
161
- meta:
162
- project: /path/to/project
163
- mode: hybrid
164
- generated: '2026-02-28T22:13:30'
165
- version: '2.0'
166
-
167
- stats:
168
- files_processed: 42
169
- functions_found: 443
170
- classes_found: 77
171
- nodes_created: 2734
172
- edges_created: 3223
173
-
174
- functions:
175
- - name: export
176
- module: code2flow.exporters.base.LLMPromptExporter
177
- complexity: 45.0
178
- tier: critical
179
- nodes: 52
180
- has_loops: true
181
- has_conditions: true
182
- has_returns: false
183
-
184
- insights:
185
- complexity_summary:
186
- critical_functions: 115
187
- high_complexity: 64
188
- avg_complexity: 3.17
189
- recommendations:
190
- - type: complexity
191
- priority: high
192
- message: "Refactor 115 critical functions"
158
+ ## 🎯 TOON v2 Format Structure
159
+
160
+ The TOON v2 format is designed for rapid scanning and actionable insights:
161
+
162
+ ```
163
+ # code2flow | 43f 10693L | py:43 | 2026-02-28
164
+ # CC̄=4.6 | critical:39/406 | dups:0 | cycles:0
165
+
166
+ HEALTH[20]:
167
+ 🔴 GOD code2flow/core/analyzer.py = 765L, 4 classes, 30m, max CC=20
168
+ 🟡 CC validate_mermaid_file CC=42 (limit:15)
169
+
170
+ REFACTOR[4]:
171
+ 1. split code2flow/core/analyzer.py (god module)
172
+ 2. split 17 high-CC methods (CC>15)
173
+
174
+ COUPLING:
175
+ ┌─────────────┬──────────────────────────────────────┐
176
+ │ Package │ fan-in fan-out status │
177
+ ├─────────────┼──────────────────────────────────────┤
178
+ │ core │ 12 45 !! split needed
179
+ exporters │ 5 28 hub │
180
+ └─────────────┴──────────────────────────────────────┘
181
+
182
+ LAYERS:
183
+ code2flow/ CC̄=5.0 ←in:0 →out:0
184
+ !! toon 982L 1C 29m CC=31
185
+ │ !! analyzer 765L 4C 30m CC=20
186
+
187
+ FUNCTIONS (CC≥10, 39 of 406):
188
+ 56.0 main 19n 4exit cond+ret !! split
189
+ 42.0 validate_mermaid_file 6n 3exit cond+ret !! split
190
+
191
+ HOTSPOTS:
192
+ #1 main fan=45 "calls 45 functions"
193
+ #2 analyze_project fan=18 "analysis pipeline, 18 stages"
194
+
195
+ CLASSES:
196
+ ToonExporter ████████████████████████ 29m CC̄=9.5 max=31 !!
197
+ DataAnalyzer ██████████ 13m CC̄=9.9 max=17 !!
193
198
  ```
194
199
 
195
200
  ### Complexity Tiers
@@ -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.2.4"
11
+ __version__ = "0.3.2"
12
12
  __author__ = "STTS Project"
13
13
 
14
14
  # Core analysis components
@@ -6,6 +6,9 @@ from .call_graph import CallGraphExtractor
6
6
  from .coupling import CouplingAnalyzer
7
7
  from .smells import SmellDetector
8
8
  from .data_analysis import DataAnalyzer
9
+ from .type_inference import TypeInferenceEngine
10
+ from .side_effects import SideEffectDetector
11
+ from .pipeline_detector import PipelineDetector
9
12
 
10
13
  __all__ = [
11
14
  'CFGExtractor',
@@ -13,5 +16,8 @@ __all__ = [
13
16
  'CallGraphExtractor',
14
17
  'CouplingAnalyzer',
15
18
  'SmellDetector',
16
- 'DataAnalyzer'
19
+ 'DataAnalyzer',
20
+ 'TypeInferenceEngine',
21
+ 'SideEffectDetector',
22
+ 'PipelineDetector',
17
23
  ]