-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (40 loc) · 795 Bytes
/
Makefile
File metadata and controls
48 lines (40 loc) · 795 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
LINT_FIX = 1
COVERAGE = 0
.PHONY: lint_ruff
lint_ruff:
ifeq ($(LINT_FIX),1)
ruff . --fix
else
ruff .
endif
.PHONY: lint_black
lint_black:
ifeq ($(LINT_FIX),1)
black .
else
black --check .
endif
.PHONY: lint_mypy
lint_mypy:
mypy . --check-untyped-defs
.PHONY: lint
lint: lint_ruff lint_black lint_mypy
.PHONY: test
test:
ifeq ($(COVERAGE),0)
pytest tests
else
pytest --no-cov-on-fail --cov=distributed_lock --cov-report=term --cov-report=html --cov-report=xml tests
endif
.PHONY: apidoc
apidoc:
@rm -Rf apihtml
pdoc -d google -o apihtml distributed_lock
.PHONY: clean
clean:
rm -Rf apihtml htmlcov
rm -Rf .mypy_cache .ruff_cache .pytest_cache
find . -type d -name __pycache__ -exec rm -Rf {} \; 2>/dev/null || true
.PHONY: bump_version
bump_version:
python ./bump_version.py