-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·35 lines (27 loc) · 1.14 KB
/
setup.sh
File metadata and controls
executable file
·35 lines (27 loc) · 1.14 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
#!/bin/bash
# This script sets up the test environment for the Parroty VSCode extension.
# It creates a Python virtual environment and installs the required dependencies.
# Exit immediately if a command exits with a non-zero status.
set -e
# The directory of this script.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# The backend directory.
BACKEND_DIR="$SCRIPT_DIR/extension/backend"
# The virtual environment directory.
VENV_DIR="$BACKEND_DIR/.venv"
# Create the virtual environment if it doesn't exist.
if [ ! -d "$VENV_DIR" ]; then
echo "Creating Python virtual environment at $VENV_DIR..."
python3 -m venv "$VENV_DIR"
fi
# Activate the virtual environment and install dependencies.
echo "Installing dependencies from requirements.txt..."
source "$VENV_DIR/bin/activate"
pip install -r "$BACKEND_DIR/requirements.txt"
echo "Setup complete."
echo ""
echo "Note: The extension will automatically use the virtual environment."
echo "Make sure to set your Gemini API key in VS Code settings:"
echo " 1. Open VS Code Settings (Cmd + , on Mac; Ctrl + , on Windows/Linux)"
echo " 2. Search for 'Parroty'"
echo " 3. Enter your Gemini API key"