-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·68 lines (57 loc) · 1.68 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·68 lines (57 loc) · 1.68 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
66
67
68
#!/bin/bash
# RapidAI Setup Script
set -e
echo "🚀 Setting up RapidAI development environment..."
echo ""
# Check Python version
python_version=$(python --version 2>&1 | awk '{print $2}')
echo "✓ Found Python $python_version"
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python -m venv venv
echo "✓ Virtual environment created"
else
echo "✓ Virtual environment already exists"
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip > /dev/null 2>&1
echo "✓ pip upgraded"
# Install package in editable mode with dev dependencies
echo "Installing RapidAI with dependencies..."
pip install -e ".[dev,anthropic,openai]" > /dev/null 2>&1
echo "✓ RapidAI installed"
# Create .env if it doesn't exist
if [ ! -f ".env" ]; then
echo "Creating .env file..."
cp .env.example .env
echo "✓ .env file created"
echo ""
echo "⚠️ IMPORTANT: Edit .env and add your API keys:"
echo " - ANTHROPIC_API_KEY"
echo " - OPENAI_API_KEY"
else
echo "✓ .env file already exists"
fi
# Install pre-commit hooks
echo "Installing pre-commit hooks..."
pre-commit install > /dev/null 2>&1
echo "✓ Pre-commit hooks installed"
# Run tests
echo ""
echo "Running tests..."
pytest -v
echo ""
echo "✅ Setup complete!"
echo ""
echo "Next steps:"
echo " 1. Activate the virtual environment: source venv/bin/activate"
echo " 2. Edit .env and add your API keys"
echo " 3. Run an example: python examples/chatbot.py"
echo " 4. Read QUICKSTART.md for more information"
echo ""
echo "Happy coding! 🎉"