Spaces:
Running
Running
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
|