mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
- Add check for @defaultPackageName@-devenv in activateDevenv.sh - Add check for uv command in initPython.sh - Add check for git command in initProject.sh (with graceful degradation) - Add checks for wget, sed, nix in updateDeps.sh - Provide clear error messages when commands are not available - Prevent scripts from failing with cryptic errors when tools are missing Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
30 lines
1.1 KiB
Bash
30 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Check if uv command is available
|
|
if ! command -v uv &> /dev/null; then
|
|
echo "❌ Command 'uv' not found."
|
|
echo "UV is required for Python project management."
|
|
echo "Ensure UV is properly installed in your environment."
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -f "pyproject.toml" ]]; then
|
|
echo "🐍 Initializing UV project..."
|
|
uv init
|
|
echo "📦 Adding IPython and Marimo..."
|
|
uv add ipython
|
|
uv add marimo
|
|
echo "--------------------------------------------------------------------------"
|
|
echo "✅ Python project initialized!"
|
|
echo "run 'uv add PACKAGE' to add more python packages."
|
|
echo "--------------------------------------------------------------------------"
|
|
else
|
|
echo "--------------------------------------------------------------------------"
|
|
echo "🔄 Existing Python project detected."
|
|
echo "📦 Ensuring IPython and Marimo are installed..."
|
|
uv add ipython
|
|
uv add marimo
|
|
echo "Run '@defaultPackageName@-updateDeps' to update dependencies."
|
|
echo "--------------------------------------------------------------------------"
|
|
fi
|