-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
204 lines (172 loc) · 4.94 KB
/
Copy pathTaskfile.yml
File metadata and controls
204 lines (172 loc) · 4.94 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
version: '3'
name: vallm
description: Vallm - Python Code Flow Analysis with LLM Integration and TOON Format
vars:
APP_NAME: vallm
PYTHON: python3
VENV: .venv
PIP: "{{.VENV}}/bin/pip"
PY: "{{.VENV}}/bin/python"
env:
PYTHONPATH: src/
pipeline:
python_version: "3.12"
runner_image: ubuntu-latest
branches: [main]
cache: [~/.cache/pip]
artifacts: [dist/]
stages:
- name: install
tasks: [venv, install]
- name: lint
tasks: [lint]
- name: test
tasks: [test]
- name: build
tasks: [build]
when: "branch:main"
tasks:
venv:
desc: Create Python virtual environment
cmds:
- |
if [ ! -d "{{.VENV}}" ]; then
echo "Creating virtual environment in {{.VENV}}..."
{{.PYTHON}} -m venv "{{.VENV}}"
fi
silent: true
install:
desc: Install package in editable mode
deps: [venv]
cmds:
- "{{.PIP}} install -e .[dev]"
- 'echo "vallm installed with dev dependencies"'
test:
desc: Run full pyqual quality pipeline
cmds:
- pyqual run
lint:
desc: Check quality gates via pyqual
cmds:
- pyqual check-gates
fmt:
desc: Auto-format code with ruff
cmds:
- "{{.VENV}}/bin/ruff format src/"
fmt-check:
desc: Check code formatting without fixing
cmds:
- "{{.VENV}}/bin/ruff format --check src/"
check:
desc: Run all quality checks
deps: [fmt-check, lint, typecheck, test]
fix:
desc: Run pyqual pipeline with auto-fix
cmds:
- pyqual run --auto-fix
typecheck:
desc: Run mypy type checking
cmds:
- "{{.PY}} -m mypy src/vallm/ --ignore-missing-imports 2>/dev/null || echo 'mypy not installed'"
build:
desc: Build wheel and sdist
deps: [test]
cmds:
- "{{.PY}} -m build"
clean:
desc: Remove build artifacts
cmds:
- rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
test-fast:
desc: Run fast unit tests only
cmds:
- "{{.PY}} -m pytest -m 'not slow and not integration' -v --tb=short -n auto"
test-cov:
desc: Run tests with coverage
cmds:
- "{{.PY}} -m pytest tests/ --cov=src/vallm --cov-report=html --cov-report=term-missing"
vallm-self:
desc: Run vallm self-analysis
cmds:
- "echo 'Running vallm self-analysis...'"
- "{{.VENV}}/bin/vallm batch src --recursive --format toon --output ./analysis --exclude .git,{{.VENV}},dist,__pycache__"
publish-test:
desc: Publish to TestPyPI
deps: [build]
cmds:
- |
if [ -z "${TWINE_USERNAME}" ] && [ -z "${TWINE_PASSWORD}" ] && [ -z "${PYPI_API_TOKEN}" ]; then
echo "No PyPI credentials found. Set TWINE_USERNAME/TWINE_PASSWORD or PYPI_API_TOKEN"
exit 0
fi
"{{.PY}}" -m twine upload --repository testpypi dist/*
publish:
desc: Publish to PyPI
deps: [build]
cmds:
- |
if [ -z "${TWINE_USERNAME}" ] && [ -z "${TWINE_PASSWORD}" ] && [ -z "${PYPI_API_TOKEN}" ]; then
echo "No PyPI credentials found"
exit 0
fi
"{{.PY}}" -m twine upload dist/*
all:
desc: Full CI pipeline
deps: [install, check, build]
sumd:
desc: Generate SUMD
cmds:
- echo "# vallm" > SUMD.md
- echo "" >> SUMD.md
- echo "Vallm - Python Code Flow Analysis" >> SUMD.md
sumr:
desc: Generate SUMR
cmds:
- echo "# vallm - Summary" > SUMR.md
metrics:
desc: Show project metrics
cmds:
- |
py_files=$(find src -name '*.py' 2>/dev/null | wc -l)
lines=$(find src -name '*.py' -exec cat {} \; 2>/dev/null | wc -l)
echo "Metrics: $py_files files, $lines lines"
redsl-dry:
desc: Run ReDSL analysis (dry-run, no changes)
cmds:
- "{{.VENV}}/bin/redsl refactor . --dry-run -f text"
redsl-refactor:
desc: Run ReDSL automated refactoring with auto-apply
cmds:
- "{{.VENV}}/bin/redsl refactor . --apply -n 5"
redsl-improve:
desc: Run ReDSL self-improvement cycle (autonomous mode)
cmds:
- "{{.VENV}}/bin/redsl improve . --mode autonomous -n 5"
redsl-heal:
desc: Diagnose and fix project issues
cmds:
- "{{.VENV}}/bin/redsl doctor heal ."
redsl-health:
desc: Check project health (diagnosis only)
cmds:
- "{{.VENV}}/bin/redsl health ."
redsl-watch:
desc: Start redsl self-improvement scheduler (runs periodically)
cmds:
- "{{.VENV}}/bin/redsl watch . --interval 3600"
quality:
desc: Full quality pipeline - pyqual + redsl + vallm
deps: [test, redsl-dry, vallm-self]
refactor-all:
desc: Full autonomous refactoring - pyqual fix + redsl heal + commit
cmds:
- task: fix
- task: redsl-heal
- |
if [ -n "$(git status --porcelain)" ]; then
git add -A
git commit -m "refactor: autonomous refactoring via redsl + pyqual" || true
echo "Changes committed. Review and push manually."
else
echo "No changes made."
fi