Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make the demo script runnable by ensuring the project root is discoverable by Python, and updates ignore rules for third-party dependencies.
Changes:
- Export
PYTHONPATHinscripts/test_demo.shto include the VidBot root path. - Add
third_party/to.gitignore.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/test_demo.sh | Adds a PYTHONPATH export intended to make imports work when running demo commands. |
| .gitignore | Ignores the third_party/ directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set -euo pipefail | ||
|
|
||
| # Ensure VidBot root is on PYTHONPATH | ||
| export PYTHONPATH="/x2robot_v2/neo/VidBot:${PYTHONPATH:-}" |
There was a problem hiding this comment.
The script hard-codes an absolute, machine-specific VidBot path in PYTHONPATH ("/x2robot_v2/neo/VidBot"), which will be incorrect for most checkouts and can even cause Python to import a different copy of the project if that path exists on a developer/CI machine. Please derive the repo root dynamically from the script location (or an env var override) and construct PYTHONPATH without introducing an empty entry (e.g., avoid a trailing ":" when PYTHONPATH is unset).
| export PYTHONPATH="/x2robot_v2/neo/VidBot:${PYTHONPATH:-}" | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| REPO_ROOT="${VIDBOT_REPO_ROOT:-$(cd "$SCRIPT_DIR/.." && pwd)}" | |
| if [ -n "${PYTHONPATH:-}" ]; then | |
| export PYTHONPATH="$REPO_ROOT:$PYTHONPATH" | |
| else | |
| export PYTHONPATH="$REPO_ROOT" | |
| fi |
No description provided.