Files
overwatch/scripts/setup_environment.sh
thebadking 34d4406611
Some checks failed
AERIS-10 CI / Python Lint + Tests (push) Has been cancelled
AERIS-10 CI / MCU Firmware Tests (push) Has been cancelled
AERIS-10 CI / FPGA Regression (push) Has been cancelled
AERIS-10 CI / Cross-Layer Contract Tests (push) Has been cancelled
Initial commit.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 07:49:17 +00:00

37 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Create the Overwatch Python environment and install the operator UI dependencies.
set -Eeuo pipefail
ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
SIM="${ROOT}/simulation"
FRONT="${SIM}/frontend"
for command in python3 pnpm node; do
if ! command -v "${command}" >/dev/null 2>&1; then
echo "Required command not found: ${command}" >&2
exit 1
fi
done
python3 - << 'PY'
import sys
if sys.version_info < (3, 11):
raise SystemExit(f"Python 3.11 or newer is required, found {sys.version.split()[0]}")
PY
if [[ ! -x "${SIM}/.venv/bin/python" ]]; then
echo "Creating ${SIM}/.venv"
python3 -m venv "${SIM}/.venv"
fi
echo "Installing the Overwatch Python package..."
"${SIM}/.venv/bin/python" -m pip install --upgrade pip
"${SIM}/.venv/bin/python" -m pip install -e "${SIM}[server,dev,flight,performance]"
echo "Installing the operator UI..."
(cd "${FRONT}" && pnpm install)
echo "Environment ready."
echo " Python: ${SIM}/.venv"
echo " UI: ${FRONT}/node_modules"