-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (59 loc) · 1.91 KB
/
Makefile
File metadata and controls
73 lines (59 loc) · 1.91 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
# Makefile for Telebrief
.PHONY: help install install-dev test lint format clean run
help:
@echo "Available commands:"
@echo " make install - Install production dependencies"
@echo " make install-dev - Install development dependencies"
@echo " make test - Run tests with coverage"
@echo " make test-fast - Run tests without coverage"
@echo " make lint - Run all linters"
@echo " make format - Format code with black and isort"
@echo " make clean - Remove build artifacts"
@echo " make run - Run the application"
@echo " make pre-commit - Install pre-commit hooks"
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements-dev.txt
pre-commit install
test:
pytest --cov=src --cov-report=html --cov-report=term-missing -v
test-fast:
pytest -v
test-unit:
pytest -v -m unit
test-integration:
pytest -v -m integration
lint:
@echo "Running Black..."
black --check src tests
@echo "\nRunning isort..."
isort --check-only src tests
@echo "\nRunning Flake8..."
flake8 src tests
@echo "\nRunning MyPy..."
mypy src
@echo "\nRunning Pylint..."
pylint src tests --fail-under=8.0
@echo "\nRunning Vulture (unused code detection)..."
vulture src vulture_whitelist.py --min-confidence 80
format:
black src tests
isort src tests
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .mypy_cache -exec rm -rf {} + 2>/dev/null || true
find . -type d -name htmlcov -exec rm -rf {} + 2>/dev/null || true
find . -type f -name '*.pyc' -delete
find . -type f -name '*.pyo' -delete
find . -type f -name coverage.xml -delete
find . -type f -name .coverage -delete
rm -rf dist build *.egg-info
run:
python main.py
pre-commit:
pre-commit install
@echo "Pre-commit hooks installed!"
check: lint test
@echo "All checks passed!"