-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (45 loc) · 1.33 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
45
46
47
48
49
50
51
52
53
54
55
56
57
# PyMailAI Makefile
.PHONY: help install install-hooks test test-cov format lint type-check clean build deploy
help:
@echo "Available commands:"
@echo " make install Install development dependencies"
@echo " make install-hooks Install pre-commit hooks"
@echo " make test Run tests"
@echo " make test-cov Run tests with coverage report"
@echo " make format Format code with black and isort"
@echo " make lint Run linting checks"
@echo " make type-check Run type checking"
@echo " make clean Remove build artifacts"
@echo " make build Build distribution packages"
@echo " make deploy Upload to PyPI (requires PyPI token)"
install:
pip install -e ".[dev]"
pre-commit install
install-hooks:
pre-commit install
test:
pytest tests/ -v
test-cov:
pytest tests/ -v --cov=pymailai --cov-report=term-missing
format:
black src/ tests/ examples/
isort src/ tests/ examples/
lint:
black --check src/ tests/ examples/
isort --check-only src/ tests/ examples/
flake8 src/ tests/ examples/
type-check:
mypy src/ tests/ examples/
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache
rm -rf .coverage
rm -rf .mypy_cache
rm -rf __pycache__
find . -type d -name "__pycache__" -exec rm -r {} +
build: clean
python -m build
deploy: build
python -m twine upload dist/*