(Chore): Commit the helper scripts.

This commit is contained in:
2026-01-05 22:16:05 +00:00
parent b9224dd031
commit 2e501a5c25
2 changed files with 62 additions and 0 deletions

29
scripts/setup.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Setup script for fastapi-route-loader development
set -e
echo "🚀 Setting up fastapi-route-loader development environment..."
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv .venv
fi
# Activate virtual environment
echo "🔌 Activating virtual environment..."
source .venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip
# Install package in editable mode with dev dependencies
echo "📥 Installing package with dev dependencies..."
pip install -e ".[dev]"
echo "✅ Setup complete!"
echo ""
echo "To activate the virtual environment, run:"
echo " source .venv/bin/activate"

33
scripts/verify.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Verification script for code quality checks
set -e
echo "🔍 Running code quality checks..."
echo ""
# Run ruff linter
echo "📋 Running ruff linter..."
ruff check src/ tests/ examples/
echo "✅ Ruff linter passed!"
echo ""
# Run ruff formatter check
echo "🎨 Checking code formatting..."
ruff format --check src/ tests/ examples/
echo "✅ Code formatting is correct!"
echo ""
# Run pyright type checker
echo "🔬 Running pyright type checker..."
pyright src/
echo "✅ Pyright type checking passed!"
echo ""
# Run tests with coverage
echo "🧪 Running tests with coverage..."
pytest
echo "✅ All tests passed!"
echo ""
echo "🎉 All checks passed successfully!"