-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
54 lines (41 loc) · 1.03 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
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
PKG ?= src
.PHONY: init fmt check types qa clean patch compile help
init:
./dev_scripts/rebuild_env.sh
python -m pre_commit install
hooks:
python -m pre_commit install
patch:
./dev_scripts/patch.sh
compile:
./dev_scripts/patch.sh compile
fmt:
ruff check $(PKG) --fix
ruff format $(PKG)
check:
ruff check $(PKG)
ruff format $(PKG) --check
types:
mypy $(PKG)
vulture:
vulture $(PKG) --min-confidence 80
qa: fmt types vulture
clean:
rm -rf .venv .mypy_cache .ruff_cache
find . -name "__pycache__" -type d -exec rm -rf {} +
test:
pytest
help:
@echo "Targets:"
@echo " init : rebuild environment"
@echo " patch : dependency patch management"
@echo " compile : recompile lock files"
@echo " fmt : auto-fix lint + format"
@echo " check : lint + format check"
@echo " types : run mypy"
@echo " qa : fmt + types + vulture"
@echo " clean : remove caches"
@echo " test : run test suite"
@echo " vulture : run vulture for dead code detection"