Files

71 lines
2.2 KiB
Makefile
Raw Permalink Normal View History

.PHONY: help install dev-install format lint type-check security check-all clean pre-commit setup-dev dev
2025-08-08 20:36:44 -07:00
help:
@echo "Available commands:"
@echo " setup-dev - Install all development dependencies and setup pre-commit"
@echo " install - Install production dependencies"
@echo " dev-install - Install development dependencies"
@echo ""
@echo "Code Quality:"
@echo " format - Format code with ruff"
@echo " lint - Lint code with ruff"
2025-08-08 20:36:44 -07:00
@echo " type-check - Run type checking with mypy and pyright"
@echo " security - Run security checks with bandit"
@echo " check-all - Run all code quality checks"
@echo ""
@echo "Development:"
@echo " pre-commit - Run pre-commit hooks on all files"
@echo " clean - Clean up cache files and artifacts"
install:
2026-03-31 17:20:41 -07:00
uv sync --no-dev
2025-08-08 20:36:44 -07:00
dev-install:
2026-03-31 17:20:41 -07:00
uv sync
2025-08-08 20:36:44 -07:00
setup-dev: dev-install
2026-03-31 17:20:41 -07:00
uv run pre-commit install
2025-08-08 20:36:44 -07:00
@echo "✅ Development environment setup complete!"
@echo "Run 'make check-all' to verify everything works correctly."
format:
@echo "🎨 Formatting code with ruff..."
2026-03-31 17:20:41 -07:00
uv run ruff format .
2025-08-08 20:36:44 -07:00
@echo "✅ Code formatting complete!"
lint:
@echo "🔍 Linting code with ruff..."
2026-03-31 17:20:41 -07:00
uv run ruff check . --fix
2025-08-08 20:36:44 -07:00
@echo "✅ Linting complete!"
type-check:
@echo "🔍 Type checking with mypy..."
2026-03-31 17:20:41 -07:00
uv run mypy strix/
2025-08-08 20:36:44 -07:00
@echo "🔍 Type checking with pyright..."
2026-03-31 17:20:41 -07:00
uv run pyright strix/
2025-08-08 20:36:44 -07:00
@echo "✅ Type checking complete!"
security:
@echo "🔒 Running security checks with bandit..."
2026-03-31 17:20:41 -07:00
uv run bandit -r strix/ -c pyproject.toml
2025-08-08 20:36:44 -07:00
@echo "✅ Security checks complete!"
check-all: format lint type-check security
@echo "✅ All code quality checks passed!"
pre-commit:
@echo "🔧 Running pre-commit hooks..."
2026-03-31 17:20:41 -07:00
uv run pre-commit run --all-files
2025-08-08 20:36:44 -07:00
@echo "✅ Pre-commit hooks complete!"
clean:
@echo "🧹 Cleaning up cache files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
@echo "✅ Cleanup complete!"
dev: format lint type-check
2025-08-08 20:36:44 -07:00
@echo "✅ Development cycle complete!"