-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 855 Bytes
/
Makefile
File metadata and controls
53 lines (37 loc) · 855 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
41
42
43
44
45
46
47
48
49
50
51
52
53
SHELL := /usr/bin/env TZ=UTC bash
SRC := $(CURDIR)/src
ifndef verbose
.SILENT:
endif
all: inspect
distclean:
@echo "++ $@"
find . \( -name "__pycache__" -or -path "./build*" -or -path "./.pytest_cache*" -or -path "./dist" \) -exec rm -Rf {} +
pristine: distclean
@echo "++ $@"
-git checkout .
-git reset --hard HEAD
-git clean -fdx
show-make:
which make
make --version
install-deps:
@echo "++ $@"
poetry install
check: test
inspect: check lint
precommit: format inspect
test: pytest
pytest: | install-deps
@echo "++ $@"
poetry run pytest
lint: $(SRC) | install-deps
@echo "++ $@"
poetry run ruff check $^
format: $(SRC) | install-deps
@echo "++ $@"
poetry run ruff format $^
fix: $(SRC) | install-deps
@echo "++ $@"
poetry run ruff check --fix $^
.PHONY: all check fix format inspect lint test precommit pytest show-make