File size: 1,199 Bytes
fb7643a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# Development syntax checker script

echo "πŸ” Running development syntax check..."

# Check Python syntax using built-in compile
echo "1️⃣ Python syntax validation..."
find . -name "*.py" -not -path "./__pycache__/*" -not -path "./.*" | while read file; do
    python -m py_compile "$file" 2>/dev/null
    if [ $? -eq 0 ]; then
        echo "  βœ… $file"
    else
        echo "  ❌ $file - SYNTAX ERROR"
        python -m py_compile "$file"
        exit 1
    fi
done

echo ""
echo "2️⃣ Running comprehensive validation..."
python validate_startup.py

echo ""
echo "3️⃣ Quick import test..."
python -c "
try:
    import app
    print('  βœ… app.py imports successfully')
except Exception as e:
    print(f'  ❌ app.py import failed: {e}')
    exit(1)

try:
    from src.agent.research_agent import Web3ResearchAgent
    print('  βœ… research_agent.py imports successfully')
except Exception as e:
    print(f'  ❌ research_agent.py import failed: {e}')
    exit(1)
"

if [ $? -eq 0 ]; then
    echo ""
    echo "πŸŽ‰ All syntax checks passed! Ready for deployment."
else
    echo ""
    echo "❌ Syntax check failed. Please fix errors before deploying."
    exit 1
fi