forked from vouchdev/vouch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.29 KB
/
Copy pathMakefile
File metadata and controls
53 lines (40 loc) · 1.29 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
.PHONY: help install dev test test-cov lint format type check build clean examples-screenshots
PY ?= python
PIP ?= $(PY) -m pip
help:
@echo "vouch developer targets"
@echo ""
@echo " make install editable install with dev extras"
@echo " make test run pytest"
@echo " make test-cov run pytest with coverage"
@echo " make lint ruff check"
@echo " make format ruff format (writes)"
@echo " make type mypy"
@echo " make check lint + type + test"
@echo " make build build sdist + wheel"
@echo " make clean remove caches, build artifacts, *.egg-info"
@echo " make examples-screenshots re-render docs/img/examples/*.svg"
install:
$(PIP) install -e '.[dev]'
dev: install
test:
$(PY) -m pytest
test-cov:
$(PY) -m pytest --cov=vouch --cov-report=term-missing --cov-report=xml
lint:
$(PY) -m ruff check src tests
format:
$(PY) -m ruff format src tests
type:
$(PY) -m mypy src
check: lint type test
examples-screenshots:
$(PY) docs/img/examples/render.py
build:
$(PY) -m pip install --upgrade build
$(PY) -m build
clean:
rm -rf build dist *.egg-info src/*.egg-info \
.pytest_cache .ruff_cache .mypy_cache \
coverage.xml .coverage htmlcov
find . -type d -name __pycache__ -prune -exec rm -rf {} +