-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.sh
More file actions
executable file
·37 lines (29 loc) · 962 Bytes
/
check.sh
File metadata and controls
executable file
·37 lines (29 loc) · 962 Bytes
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
#!/usr/bin/env bash
set -e
# Check if --fix argument was passed
if [[ "$1" == "--fix" ]]; then
echo "🛠️ Auto-fixing issues..."
ruff check src/ --fix
ruff format src/
echo "✅ Fixes applied."
echo "-------------------------------------"
fi
echo "🚀 Starting PyOB Validation Suite..."
echo "-------------------------------------"
echo "🧹 1. Running Ruff (Linter & Imports)..."
ruff check src/ --fix
echo "-------------------------------------"
echo "🪄 2. Formatting Code with Ruff..."
ruff format src/ tests/
echo "-------------------------------------"
echo "🔎 3. Running Mypy (Type Checking)..."
mypy src/
echo "-------------------------------------"
echo "🧪 4. Running Pytest (Unit Tests)..."
if [ -d "tests" ] && [ "$(ls -A tests 2>/dev/null)" ]; then
pytest tests/
else
echo "⚠️ No tests found in 'tests/' directory."
fi
echo "-------------------------------------"
echo "✅ All checks passed!"