Add Setup Script (#1438)
authorSantiago Soto <santiago@soto.uy>
Thu, 4 Jul 2024 11:14:51 +0000 (08:14 -0300)
committerGitHub <noreply@github.com>
Thu, 4 Jul 2024 11:14:51 +0000 (13:14 +0200)
Basic setup script

scripts/setup.sh [new file with mode: 0755]

diff --git a/scripts/setup.sh b/scripts/setup.sh
new file mode 100755 (executable)
index 0000000..ad1587d
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Setups the repository.
+
+# Stop on errors
+set -e
+
+cd "$(dirname "$0")/.."
+
+env_name=${1:-".venv"}
+
+if [ -d "$env_name" ]; then
+  echo "Virtual environment '$env_name' already exists."
+else
+  echo "Creating Virtual environment..."
+  python -m venv .venv
+fi
+echo "Activating virtual environment..."   
+source .venv/bin/activate
+
+echo "Installing development dependencies..."
+
+pip install -e ".[server]"
+pip install -e ".[test]"
+pre-commit install
+pip install -r requirements_all.txt