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.
- {code2flow_toon-0.2.4/code2flow_toon.egg-info → code2flow_toon-0.3.2}/PKG-INFO +50 -45
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/README.md +49 -44
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/__init__.py +1 -1
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/__init__.py +7 -1
- code2flow_toon-0.3.2/code2flow/analysis/pipeline_detector.py +445 -0
- code2flow_toon-0.3.2/code2flow/analysis/side_effects.py +313 -0
- code2flow_toon-0.3.2/code2flow/analysis/type_inference.py +306 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/cli.py +44 -15
- code2flow_toon-0.3.2/code2flow/exporters/__init__.py +35 -0
- code2flow_toon-0.2.4/code2flow/exporters/llm_exporter.py → code2flow_toon-0.3.2/code2flow/exporters/context_exporter.py +11 -3
- code2flow_toon-0.3.2/code2flow/exporters/flow_exporter.py +570 -0
- code2flow_toon-0.3.2/code2flow/exporters/llm_exporter.py +12 -0
- code2flow_toon-0.3.2/code2flow/exporters/map_exporter.py +218 -0
- code2flow_toon-0.3.2/code2flow/exporters/toon.py +982 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/__init__.py +1 -1
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2/code2flow_toon.egg-info}/PKG-INFO +50 -45
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/SOURCES.txt +11 -1
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/pyproject.toml +1 -1
- code2flow_toon-0.3.2/tests/test_format_quality.py +351 -0
- code2flow_toon-0.3.2/tests/test_sprint2_flow.py +452 -0
- code2flow_toon-0.3.2/tests/test_sprint3_pipelines.py +416 -0
- code2flow_toon-0.3.2/tests/test_toon_v2.py +293 -0
- code2flow_toon-0.2.4/code2flow/exporters/__init__.py +0 -17
- code2flow_toon-0.2.4/code2flow/exporters/toon.py +0 -401
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/LICENSE +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/__main__.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/call_graph.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/cfg.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/coupling.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/data_analysis.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/dfg.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/analysis/smells.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/__init__.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/analyzer.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/config.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/models.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/core/streaming_analyzer.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/base.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/json_exporter.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/mermaid_exporter.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/exporters/yaml_exporter.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/llm_flow_generator.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/llm_task_generator.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/mermaid_generator.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/config.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/entity_resolution.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/intent_matching.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/normalization.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/nlp/pipeline.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/patterns/__init__.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/patterns/detector.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/refactor/__init__.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/refactor/prompt_engine.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/visualizers/__init__.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow/visualizers/graph.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/dependency_links.txt +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/entry_points.txt +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/requires.txt +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/code2flow_toon.egg-info/top_level.txt +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/setup.cfg +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/setup.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_advanced_analysis.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_analyzer.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_edge_cases.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_nlp_pipeline.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_refactoring_engine.py +0 -0
- {code2flow_toon-0.2.4 → code2flow_toon-0.3.2}/tests/test_sprint4.py +0 -0
- {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
|
|
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
|

|
|
55
55
|
|
|
56
|
-
## 🚀 New: TOON Format
|
|
56
|
+
## 🚀 New: TOON Format v2
|
|
57
57
|
|
|
58
|
-
**TOON** is the
|
|
58
|
+
**TOON v2** is the default output format - scannable, severity-sorted, prompt-ready:
|
|
59
59
|
|
|
60
|
-
- **🎯
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
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
|
|
208
|
-
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|

|
|
6
6
|
|
|
7
|
-
## 🚀 New: TOON Format
|
|
7
|
+
## 🚀 New: TOON Format v2
|
|
8
8
|
|
|
9
|
-
**TOON** is the
|
|
9
|
+
**TOON v2** is the default output format - scannable, severity-sorted, prompt-ready:
|
|
10
10
|
|
|
11
|
-
- **🎯
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
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
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
|
@@ -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
|
]
|