-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·51 lines (41 loc) · 1.39 KB
/
setup-dev.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.39 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
#!/usr/bin/env bash
# Copyright 2025 rainoftime
# Development setup script for PyFlow
set -e
echo "Setting up PyFlow development environment..."
# Check if Python 3.10+ is available
python_version=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
required_version="3.10"
if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" != "$required_version" ]; then
echo "Error: Python 3.10 or higher is required. Found: $python_version"
exit 1
fi
echo "Python version: $python_version ✓"
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Upgrade pip, setuptools, and wheel
echo "Upgrading pip, setuptools, and wheel..."
pip install --upgrade pip setuptools wheel
# Install the package in development mode (includes all dev dependencies from pyproject.toml)
echo "Installing PyFlow in development mode..."
pip install -e ".[dev]"
echo ""
echo "Development environment setup complete!"
echo ""
echo "To activate the virtual environment in the future, run:"
echo " source venv/bin/activate"
echo ""
echo "To run tests:"
echo " pytest"
echo ""
echo "To format code:"
echo " black src/ tests/"
echo ""
echo "To run all checks:"
echo " make all-checks"