Setting the file. One moment. Setup · Eval Driven Dev · github/awesome-copilot · Skills Docs(opens in a new tab)
resources/setup.sh
Shell·110 lines·3 KB
15
npx
skills
update
github/awesome-copilot
--skill
eval-driven-dev
-g
-y
&&
npx
skills
update
github/awesome-copilot
--skill
eval-driven-dev
-p
-y
||
{
16 echo "(skill update failed — proceeding with existing version)"
17}
18
19echo ""
20echo "=== Installing / upgrading pixie-qa[all] ==="
21
22# Helper: check if pixie CLI is importable
23_pixie_available() {
24 if [ -f uv.lock ]; then
25 uv run python -c "import pixie" 2>/dev/null
26 elif [ -f poetry.lock ]; then
27 poetry run python -c "import pixie" 2>/dev/null
28 else
29 python -c "import pixie" 2>/dev/null
30 fi
31}
32
33# Check if pixie is already installed before attempting upgrade
34PIXIE_WAS_INSTALLED=false
35if _pixie_available; then
36 PIXIE_WAS_INSTALLED=true
37fi
38
39INSTALL_OK=false
40if [ -f uv.lock ]; then
41 # uv add does universal resolution across all Python versions in
42 # requires-python. If the host project supports a Python version
43 # where pixie-qa is unavailable (e.g. <3.10), uv add fails.
44 # Fall back to uv pip install which only targets the active interpreter.
45 if uv add "pixie-qa[all]>=0.8.4,<0.9.0" --upgrade 2>&1; then
46 INSTALL_OK=true
47 else
48 echo "(uv add failed — falling back to uv pip install)"
49 if uv pip install "pixie-qa[all]>=0.8.4,<0.9.0" 2>&1; then
50 INSTALL_OK=true
51 fi
52 fi
53elif [ -f poetry.lock ]; then
54 if poetry add "pixie-qa[all]>=0.8.4,<0.9.0"; then
55 INSTALL_OK=true
56 fi
57else
58 if pip install --upgrade "pixie-qa[all]>=0.8.4,<0.9.0"; then
59 INSTALL_OK=true
60 fi
61fi
62
63if [ "$INSTALL_OK" = false ]; then
64 if [ "$PIXIE_WAS_INSTALLED" = true ]; then
65 echo "(pixie-qa upgrade failed — proceeding with existing version)"
66 else
67 echo ""
68 echo "ERROR: pixie-qa is not installed and installation failed."
69 echo "The eval-driven-dev workflow requires the pixie-qa package."
70 echo "Please install it manually and re-run this script."
71 exit 1
72 fi
73fi
74
75echo ""
76echo "=== Initializing pixie working directory ==="
77if [ -f uv.lock ]; then
78 uv run pixie init
79elif [ -f poetry.lock ]; then
80 poetry run pixie init
81else
82 pixie init
83fi
84
85if [ $? -ne 0 ]; then
86 echo ""
87 echo "ERROR: Failed to initialize pixie working directory."
88 echo "Please check the error above and fix it before continuing."
89 exit 1
90fi
91
92echo ""
93echo "=== Starting web UI server (background) ==="
94if [ -f uv.lock ]; then
95 uv run pixie start
96elif [ -f poetry.lock ]; then
97 poetry run pixie start
98else
99 pixie start
100fi
101
102if [ $? -ne 0 ]; then
103 echo ""
104 echo "ERROR: Failed to start the web UI server."
105 echo "Please check the error above and fix it before continuing."
106 exit 1
107fi
108
109echo ""
110echo "=== Setup complete ==="