# Justfile for selectui development tasks # Unset VIRTUAL_ENV to avoid conflicts with uv export VIRTUAL_ENV := "" # Default recipe - show available commands default: @just --list # Install dependencies (including dev dependencies) install: uv sync --all-groups # Run all checks (ruff + mypy) check: check-ruff check-mypy # Run ruff linter check-ruff: @echo "Running ruff..." uv run ruff check src/ tests/ examples/ # Run mypy type checker check-mypy: @echo "Running mypy..." uv run mypy src/ tests/ examples/ # Run all tests with pytest test: @echo "Running pytest..." uv run pytest tests/ -v --tb=short # Run tests with coverage report test-cov: @echo "Running pytest with coverage..." uv run pytest tests/ -v --cov=src/selectui --cov-report=term-missing --cov-report=html # Fix all auto-fixable issues fix: fix-ruff # Run ruff with auto-fix fix-ruff: @echo "Running ruff --fix..." uv run ruff check src/ tests/ examples/ --fix # Format code with ruff fmt: @echo "Formatting code with ruff..." uv run ruff format src/ tests/ examples/ # Run all checks and tests ci: check test @echo "✅ All checks and tests passed!" # Clean build artifacts clean: @echo "Cleaning build artifacts..." rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache htmlcov/ .coverage find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true # Run the demo (interactive) demo: @echo "Running interactive demo..." @echo "This will launch the selectui with sample data" @echo "Press Ctrl+C to exit" @echo "" cat examples/example.json | jq -c '.[]' | uv run selectui # Run a specific example example NUM: @echo "Running example {{NUM}}..." uv run python examples/pydantic_example.py {{NUM}} # Watch tests (requires entr) watch-test: @echo "Watching for changes..." find src tests -name "*.py" | entr -c just test # Show project info info: @echo "Project: selectui" @echo "Python: $(uv run python --version)" @echo "Dependencies:" @uv pip list # Lint everything (alias for check) lint: check # Run pre-commit checks (check + test) pre-commit: check test @echo "✅ Pre-commit checks passed!"