-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (66 loc) · 2.1 KB
/
Makefile
File metadata and controls
77 lines (66 loc) · 2.1 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: help test test-coverage test-fast lint format clean install dev-install docs
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install the package
uv sync
dev-install: ## Install development dependencies
uv sync --group dev
test: ## Run tests
uv run pytest
test-fast: ## Run tests in parallel
uv run pytest -n auto
test-coverage: ## Run tests with coverage
@echo "🧪 Running tests with coverage..."
uv run pytest \
--cov=src/stac_auth_proxy \
--cov-report=term-missing \
--cov-report=html \
--cov-report=xml \
--cov-fail-under=85 \
-v
@echo "✅ Coverage report generated!"
@echo "📊 HTML report available at: htmlcov/index.html"
@echo "📄 XML report available at: coverage.xml"
@if [ "$(CI)" = "true" ]; then \
echo "🚀 Running in CI environment"; \
else \
echo "💻 Running locally - opening HTML report..."; \
if command -v open >/dev/null 2>&1; then \
open htmlcov/index.html; \
elif command -v xdg-open >/dev/null 2>&1; then \
xdg-open htmlcov/index.html; \
else \
echo "Please open htmlcov/index.html in your browser to view the coverage report"; \
fi; \
fi
lint: ## Run linting
uv run pre-commit run ruff-check --all-files
uv run pre-commit run mypy --all-files
format: ## Format code
uv run pre-commit run ruff-format --all-files
clean: ## Clean up generated files
rm -rf htmlcov/
rm -rf .coverage
rm -rf coverage.xml
rm -rf .pytest_cache/
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -type d -name __pycache__ -delete
find . -type f -name "*.pyc" -delete
ci: ## Run CI checks locally
uv run pre-commit run --all-files
@echo "🧪 Running tests with coverage..."
uv run pytest \
-n auto \
--cov=src/stac_auth_proxy \
--cov-report=term-missing \
--cov-report=html \
--cov-report=xml \
--cov-fail-under=85 \
-v
@echo "✅ CI checks completed!"
docs: ## Serve documentation locally
uv sync --extra docs
DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib uv run mkdocs serve