Files
openworker/packaging/setup_dev_env.sh
Xiaonan Cui 1b0e269672 setup_dev_env.sh: install the bedrock extra so a fresh env passes the test suite
CI installs .[messaging,dev,bedrock] but the bootstrap script only installs
[messaging,dev]. The bedrock test suite imports boto3 directly, so a fresh
dev env fails 7 tests out of the box.

Closes #284
2026-07-28 18:33:03 +08:00

25 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# One-time dev bootstrap for a fresh checkout: creates the Python venv every
# from-source flow expects at .venv — the browser dev flow runs its
# openworker-server directly, and the Tauri desktop shell falls back to it when
# no packaged sidecar binary is present (src-tauri/src/lib.rs, resolution step 3).
#
# Usage: bash packaging/setup_dev_env.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
VENV="$ROOT/.venv"
python3 -m venv "$VENV"
# The coworker package (server, engine, connectors) + inbound-messaging extras.
# aisuite comes in as a regular dependency (git-pinned in pyproject.toml until
# the next PyPI release).
"$VENV/bin/pip" install --quiet --upgrade pip
# Keep the extras in step with CI (.github/workflows/ci.yml) — the bedrock test
# suite imports boto3 directly, so skipping that extra leaves a fresh env red.
"$VENV/bin/pip" install --quiet -e "$ROOT[messaging,dev,bedrock]"
"$VENV/bin/python" -c 'import aisuite, coworker' # fail loudly if the wiring broke
echo "Ready: $VENV"
echo " server: $VENV/bin/openworker-server --cwd /path/to/your/project --port 8765"