Spaces:
Running
Running
File size: 1,334 Bytes
4e9eb6a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # DevOps Toolkit - Backend Makefile
.PHONY: help install install-dev test test-cov lint type-check clean run format check all
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
install: ## Install production dependencies
pip install -e .
install-dev: ## Install development dependencies
pip install -e ".[dev]"
test: ## Run tests
python -m pytest
test-cov: ## Run tests with coverage
python -m pytest --cov --cov-report=term-missing --cov-report=html
lint: ## Run linting
flake8 app/ tests/
type-check: ## Run type checking
mypy app/
format: ## Format code with black and isort
black app/ tests/
isort app/ tests/
check: ## Run all checks (lint, type-check, test)
$(MAKE) lint
$(MAKE) type-check
$(MAKE) test
clean: ## Clean up generated files
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf .coverage htmlcov/ .pytest_cache/ .mypy_cache/
run: ## Run the application
python run.py
run-dev: ## Run the application in development mode with auto-reload
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
all: install-dev check ## Install dev dependencies and run all checks |