-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·38 lines (32 loc) · 1.09 KB
/
setup.sh
File metadata and controls
executable file
·38 lines (32 loc) · 1.09 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
#!/bin/bash
echo "Starting setup..."
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python -m venv venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Install requirements
echo "Installing required packages..."
pip install -r requirements.txt
pip install tqdm
pip install jupyterlab
pip install jupytext
# Run tests if requested
if [ "$1" = "test" ]; then
echo -e "\nRunning tests..."
python tests/run_tests.py
fi
echo -e "\nSetup complete! Virtual environment is activated and packages are installed."
echo -e "\nTo run in JupyterLab:"
echo "1. jupyter lab"
echo "2. Either:"
echo " a) Convert Python script: jupytext --to notebook quantum_percolation_simulation.py"
echo " b) Create new notebook and copy code from quantum_percolation_simulation.py"
echo -e "\nOr to run as Python script:"
echo "python quantum_percolation_simulation.py"
echo -e "\nIf you see any missing package errors, run:"
echo "pip install <package_name>"
echo "pip freeze > requirements.txt"