-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.doql.css
More file actions
351 lines (307 loc) · 13.7 KB
/
Copy pathapp.doql.css
File metadata and controls
351 lines (307 loc) · 13.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
app {
name: "vallm";
version: "0.1.75";
}
interface[type="cli"] {
framework: argparse;
}
interface[type="cli"] page[name="vallm"] {
}
workflow[name="venv"] {
trigger: "manual";
step-1: run cmd=if [ ! -x "$(PYTHON)" ]; then \;
step-2: run cmd=echo "Creating virtual environment in $(VENV)..."; \;
step-3: run cmd=python3 -m venv "$(VENV)"; \;
step-4: run cmd=fi;
}
workflow[name="install"] {
trigger: "manual";
step-1: run cmd=$(PIP) install -e .;
step-2: run cmd=echo "✓ code2llm installed with TOON format support";
}
workflow[name="dev-install"] {
trigger: "manual";
step-1: run cmd=$(PIP) install -e ".[dev]";
step-2: run cmd=echo "✓ code2llm installed with dev dependencies";
}
workflow[name="test"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest tests/ -v --tb=short;
}
workflow[name="test-fast"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest -m "not slow and not integration" -v --tb=short -n auto;
}
workflow[name="test-slow"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest -m "slow" -v --tb=short;
}
workflow[name="test-integration"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest -m "integration" -v --tb=short;
}
workflow[name="test-unit"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest -m "unit" -v --tb=short;
}
workflow[name="test-cov"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m pytest tests/ --cov=code2llm --cov-report=html --cov-report=term 2>/dev/null || echo "No tests yet";
}
workflow[name="test-toon"] {
trigger: "manual";
step-1: run cmd=echo "🎯 Testing TOON format...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./test_toon -m hybrid -f toon;
step-3: run cmd=$(PYTHON) validate_toon.py test_toon/analysis.toon;
step-4: run cmd=echo "✓ TOON format test complete";
}
workflow[name="validate-toon"] {
trigger: "manual";
step-1: depend target=test-toon;
}
workflow[name="test-all-formats"] {
trigger: "manual";
step-1: run cmd=echo "📊 Testing all output formats...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./test_all -m hybrid -f all;
step-3: run cmd=$(PYTHON) validate_toon.py test_all/analysis.toon;
step-4: run cmd=echo "✓ All formats test complete";
}
workflow[name="test-comprehensive"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Running comprehensive test suite...";
step-2: run cmd=bash project.sh;
step-3: run cmd=echo "✓ Comprehensive tests complete";
}
workflow[name="lint"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m flake8 code2llm/ --max-line-length=100 --ignore=E203,W503 2>/dev/null || echo "flake8 not installed";
step-2: run cmd=$(PYTHON) -m black --check code2llm/ 2>/dev/null || echo "black not installed";
step-3: run cmd=echo "✓ Linting complete";
}
workflow[name="format"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m black code2llm/ --line-length=100 2>/dev/null || echo "black not installed, run: pip install black";
step-2: run cmd=echo "✓ Code formatted";
}
workflow[name="typecheck"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m mypy code2llm/ --ignore-missing-imports 2>/dev/null || echo "mypy not installed";
}
workflow[name="check"] {
trigger: "manual";
step-1: run cmd=echo "✓ All checks passed";
}
workflow[name="run"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) -m code2llm ../python/stts_core -v -o ./output;
}
workflow[name="analyze"] {
trigger: "manual";
step-1: run cmd=echo "🎯 Running TOON format analysis on current project...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./analysis -m hybrid -f toon;
step-3: run cmd=$(PYTHON) validate_toon.py analysis/analysis.toon;
step-4: run cmd=echo "✓ TOON analysis complete - check analysis/analysis.toon";
}
workflow[name="analyze-all"] {
trigger: "manual";
step-1: run cmd=echo "📊 Running analysis with all formats...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./analysis_all -m hybrid -f all;
step-3: run cmd=$(PYTHON) validate_toon.py analysis_all/analysis.toon;
step-4: run cmd=echo "✓ All formats analysis complete - check analysis_all/";
}
workflow[name="toon-demo"] {
trigger: "manual";
step-1: run cmd=echo "🎯 Quick TOON format demo...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./demo -m hybrid -f toon;
step-3: run cmd=echo "📁 Generated: demo/analysis.toon";
step-4: run cmd=echo "📊 Size: $$(du -h demo/analysis.toon | cut -f1)";
step-5: run cmd=echo "🔍 Preview:";
step-6: run cmd=head -20 demo/analysis.toon;
}
workflow[name="toon-compare"] {
trigger: "manual";
step-1: run cmd=echo "📊 Comparing TOON vs YAML formats...";
step-2: run cmd=$(PYTHON) -m code2llm ./ -v -o ./compare -m hybrid -f toon,yaml;
step-3: run cmd=echo "📁 Files generated:";
step-4: run cmd=echo " - TOON: compare/analysis.toon ($$(du -h compare/analysis.toon | cut -f1))";
step-5: run cmd=echo " - YAML: compare/analysis.yaml ($$(du -h compare/analysis.yaml | cut -f1))";
step-6: run cmd=echo " - Ratio: $$(echo "scale=1; $$(du -k compare/analysis.yaml | cut -f1) / $$(du -k compare/analysis.toon | cut -f1)" | bc)x smaller";
step-7: run cmd=$(PYTHON) validate_toon.py compare/analysis.yaml compare/analysis.toon;
}
workflow[name="toon-validate"] {
trigger: "manual";
step-1: run cmd=echo "🔍 Validating TOON format structure...";
step-2: run cmd=$(PYTHON) validate_toon.py analysis/analysis.toon 2>/dev/null || $(PYTHON) validate_toon.py test_toon/analysis.toon 2>/dev/null || echo "Run 'make test-toon' first";
}
workflow[name="build"] {
trigger: "manual";
step-1: run cmd=rm -rf build/ dist/ *.egg-info;
step-2: run cmd=$(PYTHON) -m build;
step-3: run cmd=echo "✓ Build complete - check dist/";
}
workflow[name="publish-test"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Publishing to TestPyPI...";
step-2: run cmd=bash -c 'if [ -z "$${TWINE_USERNAME}" ] && [ -z "$${TWINE_PASSWORD}" ] && [ -z "$${PYPI_API_TOKEN}" ]; then \;
step-3: run cmd=echo "⚠️ No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD or PYPI_API_TOKEN"; \;
step-4: run cmd=echo " Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish-test"; \;
step-5: run cmd=echo " Skipping publish-test."; \;
step-6: run cmd=else \;
step-7: run cmd=$(PYTHON) -m venv publish-test-env && \;
step-8: run cmd=publish-test-env/bin/pip install twine && \;
step-9: run cmd=publish-test-env/bin/python -m twine upload --repository testpypi dist/* && \;
step-10: run cmd=rm -rf publish-test-env && \;
step-11: run cmd=echo "✓ Published to TestPyPI"; \;
step-12: run cmd=fi';
}
workflow[name="bump-patch"] {
trigger: "manual";
step-1: run cmd=echo "🔢 Bumping patch version...";
step-2: run cmd=$(PYTHON) scripts/bump_version.py patch 2>/dev/null || echo "Create scripts/bump_version.py or edit pyproject.toml manually";
}
workflow[name="bump-minor"] {
trigger: "manual";
step-1: run cmd=echo "🔢 Bumping minor version...";
step-2: run cmd=$(PYTHON) scripts/bump_version.py minor 2>/dev/null || echo "Create scripts/bump_version.py or edit pyproject.toml manually";
}
workflow[name="bump-major"] {
trigger: "manual";
step-1: run cmd=echo "🔢 Bumping major version...";
step-2: run cmd=$(PYTHON) scripts/bump_version.py major 2>/dev/null || echo "Create scripts/bump_version.py or edit pyproject.toml manually";
}
workflow[name="publish"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Publishing to PyPI...";
step-2: run cmd=bash -c 'if [ -z "$${TWINE_USERNAME}" ] && [ -z "$${TWINE_PASSWORD}" ] && [ -z "$${PYPI_API_TOKEN}" ]; then \;
step-3: run cmd=echo "⚠️ No PyPI credentials found. Set TWINE_USERNAME and TWINE_PASSWORD or PYPI_API_TOKEN"; \;
step-4: run cmd=echo " Example: TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxx make publish"; \;
step-5: run cmd=echo " Skipping publish."; \;
step-6: run cmd=else \;
step-7: run cmd=echo "🔢 Bumping patch version..."; \;
step-8: run cmd=$(MAKE) bump-patch; \;
step-9: run cmd=echo "🔨 Rebuilding package with new version..."; \;
step-10: run cmd=$(MAKE) build; \;
step-11: run cmd=echo "📦 Publishing to PyPI..."; \;
step-12: run cmd=$(PYTHON) -m venv publish-env; \;
step-13: run cmd=publish-env/bin/pip install twine; \;
step-14: run cmd=publish-env/bin/python -m twine upload dist/*; \;
step-15: run cmd=rm -rf publish-env; \;
step-16: run cmd=echo "✓ Published to PyPI"; \;
step-17: run cmd=fi';
}
workflow[name="mermaid-png"] {
trigger: "manual";
step-1: run cmd=$(PYTHON) mermaid_to_png.py --batch output output;
}
workflow[name="install-mermaid"] {
trigger: "manual";
step-1: run cmd=npm install -g @mermaid-js/mermaid-cli;
}
workflow[name="check-mermaid"] {
trigger: "manual";
step-1: run cmd=echo "Checking available Mermaid renderers...";
step-2: run cmd=which mmdc > /dev/null && echo "✓ mmdc (mermaid-cli)" || echo "✗ mmdc (run: npm install -g @mermaid-js/mermaid-cli)";
step-3: run cmd=which npx > /dev/null && echo "✓ npx (for @mermaid-js/mermaid-cli)" || echo "✗ npx (install Node.js)";
step-4: run cmd=which puppeteer > /dev/null && echo "✓ puppeteer" || echo "✗ puppeteer (run: npm install -g puppeteer)";
}
workflow[name="clean"] {
trigger: "manual";
step-1: run cmd=rm -rf build/ dist/ *.egg-info;
step-2: run cmd=rm -rf .pytest_cache .coverage htmlcov/;
step-3: run cmd=rm -rf code2llm/__pycache__ code2llm/*/__pycache__;
step-4: run cmd=rm -rf test_* demo compare analysis analysis_all output_* 2>/dev/null || true;
step-5: run cmd=find . -name "*.pyc" -delete 2>/dev/null || true;
step-6: run cmd=find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true;
step-7: run cmd=echo "✓ Cleaned build artifacts and test outputs";
}
workflow[name="clean-png"] {
trigger: "manual";
step-1: run cmd=rm -f output/*.png;
step-2: run cmd=echo "✓ Cleaned PNG files";
}
workflow[name="quickstart"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Quick Start with code2llm TOON format:";
step-2: run cmd=echo "";
step-3: run cmd=echo "1. Install: make install";
step-4: run cmd=echo "2. Test TOON: make test-toon";
step-5: run cmd=echo "3. Analyze: make analyze";
step-6: run cmd=echo "4. Compare: make toon-compare";
step-7: run cmd=echo "5. All formats: make test-all-formats";
step-8: run cmd=echo "";
step-9: run cmd=echo "📖 For more: make help";
}
workflow[name="fmt"] {
trigger: "manual";
step-1: run cmd=ruff format .;
}
workflow[name="health"] {
trigger: "manual";
step-1: run cmd=docker compose ps;
step-2: run cmd=docker compose exec app echo "Health check passed";
}
workflow[name="import-makefile-hint"] {
trigger: "manual";
step-1: run cmd=echo 'Run: taskfile import Makefile to import existing targets.';
}
workflow[name="help"] {
trigger: "manual";
step-1: run cmd=echo "code2llm - Python Code Flow Analysis Tool with LLM Integration and TOON;
step-2: run cmd=echo "";
step-3: run cmd=echo \"\U0001F680 Installation:\;
step-4: run cmd=echo " make install - Install package";
step-5: run cmd=echo " make dev-install - Install with development dependencies";
step-6: run cmd=echo "";
step-7: run cmd=echo \"\U0001F9EA Testing:\;
step-8: run cmd=echo " make test - Run test suite";
step-9: run cmd=echo " make test-toon - Test TOON format only";
step-10: run cmd=echo " make validate-toon - Validate TOON format output";
step-11: run cmd=echo " make test-all-formats - Test all output formats";
step-12: run cmd=echo "";
step-13: run cmd=echo \"\U0001F527 Code Quality:\;
step-14: run cmd=echo " make lint - Run linters (flake8, black --check)";
step-15: run cmd=echo " make format - Format code with black";
step-16: run cmd=echo " make typecheck - Run mypy type checking";
step-17: run cmd=echo " make check - Run all quality checks";
step-18: run cmd=echo "";
step-19: run cmd=echo \"\U0001F4CA Analysis:\;
step-20: run cmd=echo " make analyze - Run analysis on current project (TOON format)";
step-21: run cmd=echo " make run - Run with example arguments";
step-22: run cmd=echo " make analyze-all - Run analysis with all formats";
step-23: run cmd=echo "";
step-24: run cmd=echo \"\U0001F3AF TOON Format:\;
step-25: run cmd=echo " make toon-demo - Quick TOON format demo";
step-26: run cmd=echo " make toon-compare - Compare TOON vs YAML formats";
step-27: run cmd=echo " make toon-validate - Validate TOON format structure";
step-28: run cmd=echo "";
step-29: run cmd=echo \"\U0001F4E6 Building & Release:\;
step-30: run cmd=echo " make build - Build distribution packages";
step-31: run cmd=echo " make publish - Publish to PyPI (with version bump)";
step-32: run cmd=echo " make publish-test - Publish to TestPyPI";
step-33: run cmd=echo " make bump-patch - Bump patch version";
step-34: run cmd=echo " make bump-minor - Bump minor version";
step-35: run cmd=echo " make bump-major - Bump major version";
step-36: run cmd=echo "";
step-37: run cmd=echo \"\U0001F3A8 Visualization:\;
step-38: run cmd=echo " make mermaid-png - Generate PNG from all Mermaid files";
step-39: run cmd=echo " make install-mermaid - Install Mermaid CLI renderer";
step-40: run cmd=echo " make check-mermaid - Check available Mermaid renderers";
step-41: run cmd=echo "";
step-42: run cmd=echo \"\U0001F9F9 Maintenance:\;
step-43: run cmd=echo " make clean - Remove build artifacts";
step-44: run cmd=echo " make clean-png - Clean PNG files";
step-45: run cmd=echo "";
}
deploy {
target: docker;
}
environment[name="local"] {
runtime: docker;
env_file: ".env";
}
workflow[name="all"] {
trigger: "manual";
step-1: run cmd=taskfile run install;
step-2: run cmd=taskfile run lint;
step-3: run cmd=taskfile run test;
}