-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.sh
More file actions
executable file
·83 lines (70 loc) · 1.9 KB
/
demo.sh
File metadata and controls
executable file
·83 lines (70 loc) · 1.9 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
#!/bin/bash
# Demo script for LLX + Pyqual integration
# Run from examples/llx directory
set -e
echo "=== LLX + Pyqual Integration Demo ==="
echo
# Check if we're in the right directory
if [ ! -f "pyqual-llx.yaml" ]; then
echo "Error: Run this script from examples/llx directory"
exit 1
fi
# Ensure tools are installed
echo "1. Checking dependencies..."
check_tool() {
if command -v "$1" >/dev/null 2>&1; then
echo " ✓ $1"
else
echo " ✗ $1 - Install with: $2"
missing=true
fi
}
missing=false
check_tool "llx" "pip install llx[prellm]"
check_tool "pyqual" "pip install pyqual"
check_tool "code2llm" "pip install code2llm"
check_tool "vallm" "pip install vallm"
if [ "$missing" = true ]; then
echo "Install missing dependencies first"
exit 1
fi
echo
echo "2. Setting up project..."
# Go to project root
cd ../..
# Copy configuration if not exists
if [ ! -f "pyqual.yaml" ]; then
cp examples/llx/pyqual-llx.yaml pyqual.yaml
echo " ✓ Created pyqual.yaml with LLX integration"
else
echo " ✓ Using existing pyqual.yaml"
fi
# Initialize llx if not exists
if [ ! -f "llx.toml" ]; then
llx init . >/dev/null 2>&1
echo " ✓ Created llx.toml"
else
echo " ✓ Using existing llx.toml"
fi
echo
echo "3. Pipeline configuration:"
echo " - Analyze code with code2llm"
echo " - Validate with vallm"
echo " - Generate fixes with LLX (model auto-selected based on metrics)"
echo " - Run tests"
echo " - Loop until quality gates pass"
echo
echo "4. Running quality pipeline..."
echo " Press Ctrl+C to stop"
echo
# Run the pipeline
pyqual run
echo
echo "=== Demo Complete ==="
echo
echo "Check .pyqual/ directory for results:"
echo " - errors.json (validation errors found)"
echo " - coverage.json (test coverage results)"
echo
echo "LLX selected the optimal model based on your project metrics."
echo "Review the generated fixes in the output above."