-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·65 lines (52 loc) · 1.7 KB
/
setup-dev.sh
File metadata and controls
executable file
·65 lines (52 loc) · 1.7 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
#!/bin/bash
# Setup script for development environment
set -e
echo "🔧 IPTV Proxy v2 - Development Setup"
echo "===================================="
echo ""
# Check Python version
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
echo "✓ Python version: $PYTHON_VERSION"
# Install dependencies
echo ""
echo "📦 Installing dependencies..."
pip install -r requirements.txt
pip install -r requirements-dev.txt
echo ""
echo "✓ Dependencies installed"
# Check linting tool versions
echo ""
echo "📋 Checking linting tool versions..."
BLACK_VERSION=$(black --version 2>&1 | grep -oP 'version \K[0-9.]+' | head -1)
ISORT_VERSION=$(isort --version 2>&1 | grep -oP 'VERSION \K[0-9.]+' | head -1)
FLAKE8_VERSION=$(flake8 --version 2>&1 | grep -oP '^[0-9.]+' | head -1)
echo " black: $BLACK_VERSION (expected: 23.12.1)"
echo " isort: $ISORT_VERSION (expected: 5.13.2)"
echo " flake8: $FLAKE8_VERSION (expected: 7.0.0)"
# Run initial format
echo ""
echo "🎨 Formatting code..."
black . 2>&1 | head -n 5
isort . 2>&1 | head -n 5
echo ""
echo "✓ Code formatted"
# Run linting
echo ""
echo "🔍 Running linting checks..."
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true
echo ""
echo "✓ Linting complete"
# Run tests
echo ""
echo "🧪 Running tests..."
pytest tests/ -v --cov=. --cov-report=term-missing --cov-fail-under=70
echo ""
echo "✅ Setup complete!"
echo ""
echo "Available commands:"
echo " make test - Run tests with coverage"
echo " make test-fast - Run tests without coverage"
echo " make lint - Check code quality"
echo " make format - Auto-format code"
echo " make run - Run the application"
echo " make help - Show all commands"