-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (37 loc) · 1.11 KB
/
Makefile
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
.PHONY: test clean lint format help coverage mypy
# Default target
help:
@echo "Available commands:"
@echo " make test - Run all tests"
@echo " make lint - Run linter"
@echo " make format - Format code"
@echo " make clean - Clean up cache files"
@echo " make coverage - Run tests with coverage"
@echo " make mypy - Run type checker"
# Test targets
test:
PYTHONPATH=${PWD} pytest -v tests/core tests/interface tests/integration tests/tools
# Coverage
coverage:
PYTHONPATH=${PWD} pytest --cov=src --cov-report=html --cov-report=term tests/
# Type checking
mypy:
mypy src/ tests/
# Linting
lint:
ruff check .
# Formatting
format:
black .
isort .
# Cleanup
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type f -name "*.pyd" -delete
find . -type f -name ".coverage" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".ruff_cache" -exec rm -rf {} +
find . -type d -name "htmlcov" -exec rm -rf {} +