-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
277 lines (237 loc) · 6.18 KB
/
Taskfile.yml
File metadata and controls
277 lines (237 loc) · 6.18 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
# Taskfile.yml - Task runner for mdflow project
# Usage: task <task-name>
# Install task: https://taskfile.dev/installation/
version: "3"
vars:
PROJECT_NAME: mdflow
PYTHON_VERSION: "3.11"
VENV_DIR: .venv
OUTPUT_DIR: output
tasks:
default:
desc: Show available tasks
cmds:
- task --list
# Setup tasks
setup:
desc: Install dependencies and setup virtual environment
cmds:
- python -m venv {{.VENV_DIR}}
- "{{.VENV_DIR}}/bin/pip install --upgrade pip"
- "{{.VENV_DIR}}/bin/pip install -e .[dev]"
- echo "✓ Setup complete"
silent: true
install:
desc: Install package in editable mode
cmds:
- "{{.VENV_DIR}}/bin/pip install -e ."
silent: true
# Development tasks
dev:
desc: Install development dependencies
cmds:
- "{{.VENV_DIR}}/bin/pip install -e .[dev]"
silent: true
# Testing tasks
test:
desc: Run all tests
cmds:
- "{{.VENV_DIR}}/bin/pytest tests/ -v"
silent: false
test-coverage:
desc: Run tests with coverage report
cmds:
- "{{.VENV_DIR}}/bin/pytest tests/ --cov=mdflow --cov-report=html --cov-report=term"
silent: false
test-watch:
desc: Run tests in watch mode
cmds:
- "{{.VENV_DIR}}/bin/pytest-watch tests/"
silent: false
# Code quality tasks
lint:
desc: Run linting
cmds:
- "{{.VENV_DIR}}/bin/ruff check mdflow/"
- "{{.VENV_DIR}}/bin/ruff check tests/"
silent: false
format:
desc: Format code with ruff
cmds:
- "{{.VENV_DIR}}/bin/ruff format mdflow/"
- "{{.VENV_DIR}}/bin/ruff format tests/"
silent: false
format-check:
desc: Check if code is formatted
cmds:
- "{{.VENV_DIR}}/bin/ruff format --check mdflow/"
- "{{.VENV_DIR}}/bin/ruff format --check tests/"
silent: false
# Build tasks
build:
desc: Build package
cmds:
- "{{.VENV_DIR}}/bin/python -m build"
silent: false
# Documentation tasks
docs:
desc: Generate documentation
cmds:
- mkdir -p {{.OUTPUT_DIR}}
- "{{.VENV_DIR}}/bin/python examples/basic_usage.py"
silent: false
docs-all:
desc: Generate all example documentation
cmds:
- mkdir -p {{.OUTPUT_DIR}}
- "{{.VENV_DIR}}/bin/python examples/basic_usage.py"
- "{{.VENV_DIR}}/bin/python examples/advanced_analysis.py"
- "{{.VENV_DIR}}/bin/python examples/directory_scan.py"
- "{{.VENV_DIR}}/bin/python examples/custom_diagrams.py"
silent: false
# Example tasks
example-basic:
desc: Run basic usage example
cmds:
- "{{.VENV_DIR}}/bin/python examples/basic_usage.py"
silent: false
example-advanced:
desc: Run advanced analysis example
cmds:
- "{{.VENV_DIR}}/bin/python examples/advanced_analysis.py"
silent: false
example-scan:
desc: Run directory scan example
cmds:
- "{{.VENV_DIR}}/bin/python examples/directory_scan.py"
silent: false
example-diagrams:
desc: Run custom diagrams example
cmds:
- "{{.VENV_DIR}}/bin/python examples/custom_diagrams.py"
silent: false
# CLI tasks
cli-analyze:
desc: Analyze a file with CLI
cmds:
- "{{.VENV_DIR}}/bin/mdflow analyze SUMR.md --output {{.OUTPUT_DIR}}"
silent: false
cli-scan:
desc: Scan directory with CLI
cmds:
- "{{.VENV_DIR}}/bin/mdflow scan mdflow/ --output {{.OUTPUT_DIR}}/scan"
silent: false
# Clean tasks
clean:
desc: Clean build artifacts
cmds:
- rm -rf build/
- rm -rf dist/
- rm -rf *.egg-info/
- rm -rf .pytest_cache/
- rm -rf .ruff_cache/
- rm -rf {{.OUTPUT_DIR}}/
- echo "✓ Clean complete"
silent: true
clean-all:
desc: Clean everything including venv
cmds:
- task: clean
- rm -rf {{.VENV_DIR}}/
- echo "✓ Full clean complete"
silent: true
# Code quality tasks (pyqual + prefact)
quality:
desc: Run full quality gate loop (prefact + lint + test)
cmds:
- pyqual run
silent: false
quality-gates:
desc: Check quality gates without running pipeline
cmds:
- pyqual gates
silent: false
prefact:
desc: Run prefact scan on source
cmds:
- prefact scan -p .
silent: false
prefact-fix:
desc: Run prefact fix (auto-repair issues)
cmds:
- prefact fix -p .
silent: false
# Planfile tasks
planfile-validate:
desc: Validate planfile configuration
cmds:
- planfile validate planfile.yaml
silent: false
planfile-review:
desc: Review planfile strategy
cmds:
- planfile review
silent: false
planfile-apply:
desc: Apply planfile strategy
cmds:
- planfile apply planfile.yaml
silent: false
# TestQL tasks
testql-run:
desc: Run all testql scenarios
cmds:
- for: {glob: testql-scenarios/0*.testql.toon.yaml}
cmd: testql run {{.ITEM}}
silent: false
testql-smoke:
desc: Run smoke tests only (01_cli_help_version)
cmds:
- testql run testql-scenarios/01_cli_help_version.testql.toon.yaml
silent: false
testql-e2e:
desc: Run E2E tests (analyze, scan, diagram, semcod projects, mermaid validation)
cmds:
- testql run testql-scenarios/02_cli_analyze_e2e.testql.toon.yaml
- testql run testql-scenarios/03_cli_scan_e2e.testql.toon.yaml
- testql run testql-scenarios/04_cli_diagram_e2e.testql.toon.yaml
- testql run testql-scenarios/05_e2e_semcod_projects.testql.toon.yaml
- testql run testql-scenarios/06_e2e_mermaid_validation.testql.toon.yaml
silent: false
testql-init:
desc: Initialize testql configuration
cmds:
- testql init
silent: false
# Release tasks
version:
desc: Show current version
cmds:
- cat VERSION
silent: true
bump-patch:
desc: Bump patch version
cmds:
- goal bump patch
silent: false
bump-minor:
desc: Bump minor version
cmds:
- goal bump minor
silent: false
bump-major:
desc: Bump major version
cmds:
- goal bump major
silent: false
# Git tasks
git-status:
desc: Show git status
cmds:
- git status
silent: false
git-log:
desc: Show git log
cmds:
- git log --oneline -10
silent: false