Files

49 lines
1.3 KiB
Bash

#!/bin/bash
set -e
echo "Setting up development environment..."
# Navigate to workspace directory (try common mount points)
if [ -d "/workspaces/datasets" ]; then
cd /workspaces/datasets
elif [ -d "/app" ]; then
cd /app
elif [ -d "/workspace" ]; then
cd /workspace
else
# Try to find the workspace from current directory
cd "$(dirname "$0")/.." || cd "$HOME" || cd /
fi
echo "Working directory: $(pwd)"
# Install project dependencies using uv
if command -v uv &> /dev/null; then
echo "Installing project dependencies with uv..."
uv pip install --system -e ".[tests,docs]"
else
echo "uv not found, falling back to pip..."
pip install -e ".[tests,docs]"
fi
# Verify installation
echo "Verifying installation..."
python --version
python -c "import sys; print(f'Python path: {sys.executable}')"
# Run nox to verify everything works
if command -v nox &> /dev/null; then
echo "Running quick verification..."
nox -s lint -- -q || echo "Lint check had issues (this is okay for first setup)"
fi
echo "Development environment setup complete!"
echo ""
echo "You can now:"
echo " - Run 'nox -s lint' to check code quality"
echo " - Run 'nox -s format' to format code"
echo " - Run 'nox -s typecheck' to check types"
echo " - Run 'nox -s unit_tests' to run tests"
echo " - Run 'nox -s serve_docs' to serve documentation"