-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (57 loc) · 1.58 KB
/
Makefile
File metadata and controls
72 lines (57 loc) · 1.58 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
.PHONY: help install lint format test test-cov clean run docker-up docker-down docker-build docker-restart
# Default target
help:
@echo "Available targets:"
@echo " make install - Install dependencies"
@echo " make lint - Check code with ruff"
@echo " make format - Format code with ruff"
@echo " make test - Run tests"
@echo " make test-cov - Run tests with coverage"
@echo " make clean - Clean up generated files"
@echo " make run - Run the application"
@echo " make docker-up - Start Docker services"
@echo " make docker-down - Stop Docker services"
@echo " make docker-build - Build Docker image"
@echo " make docker-restart - Restart Docker services"
# Install dependencies
install:
uv sync
# Lint code
lint:
uv run ruff check
# Format code
format:
uv run ruff format
# Run tests
test:
uv run pytest
# Run tests with coverage
test-cov:
./test.sh
# Clean up generated files
clean:
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
rm -rf .ruff_cache/
rm -rf __pycache__/
find . -type d -name __pycache__ -exec rm -r {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
# Run the application (user should run this manually)
run:
@echo "Running application..."
./run.sh
# Docker commands
docker-up:
docker-compose up -d
docker-down:
docker-compose down
docker-build:
docker-compose build
docker-restart: docker-down docker-up
# Combined targets
check: lint test
@echo "Lint and test checks passed!"
format-check: format lint
@echo "Code formatted and linted!"