-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 858 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (32 loc) · 858 Bytes
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
PY := .venv/bin/python
PIP := .venv/bin/pip
.PHONY: help setup lint format test all clean
help:
@echo "Targets:"
@echo " setup - create venv and install dependencies"
@echo " lint - run ruff check, ruff format and mypy"
@echo " format - run ruff format and ruff check --fix"
@echo " test - run pytest"
@echo " all - run setup, lint, format and test"
@echo " clean - remove cache, venv and build artifacts"
setup:
python3 -m venv .venv
$(PIP) install -e .[dev]
lint:
$(PY) -m ruff check --fix
$(PY) -m mypy --install-types --non-interactive .
format:
$(PY) -m ruff format
test:
$(PY) -m pytest
all: setup lint format test
clean:
rm -rf .venv/
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -name __pycache__ -exec rm -rf {} +
rm -f uv.lock