Add catalog prices for the radar parts and scripts that bring Overwatch up.
The cost note can now be added from published distributor prices, and a fresh checkout can install its environment and start the stack without hand-written paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
36
scripts/setup_environment.sh
Executable file
36
scripts/setup_environment.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/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"
|
||||
12
scripts/start_stack.sh
Executable file
12
scripts/start_stack.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Bring up Overwatch: auth stack, operator UI, and the simulation backend.
|
||||
set -Eeuo pipefail
|
||||
|
||||
ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
SIM="${ROOT}/simulation"
|
||||
|
||||
if [[ ! -x "${SIM}/.venv/bin/python" || ! -d "${SIM}/frontend/node_modules" ]]; then
|
||||
"${ROOT}/scripts/setup_environment.sh"
|
||||
fi
|
||||
|
||||
exec "${SIM}/rebuild_restart.sh"
|
||||
Reference in New Issue
Block a user