-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (32 loc) · 915 Bytes
/
Makefile
File metadata and controls
45 lines (32 loc) · 915 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
PYTHON ?= python3
.PHONY: docs docs-live docs-clean clean format format-check typecheck typecheck_pyright lint test test_fastfail audit
serve:
python3 ./serve_dynamic.py
generate:
python3 ./publish_static.py
serve_static: generate
echo "Open:"
echo "* http://localhost:8080/index.html"
cd public && python3 -m http.server 8080
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -f
find . -name "*~" -print0 | xargs -0 rm -f
find . -name "__pycache__" -print0 | xargs -0 rm -rf
format:
$(PYTHON) -m ruff check src examples --select F401 --fix
$(PYTHON) -m isort src
$(PYTHON) -m black src
format-check:
$(PYTHON) -m isort --check-only src
$(PYTHON) -m black --check src
lint:
$(PYTHON) -m ruff check src
typecheck_pyright:
$(PYTHON) -m pyright
typecheck:
$(PYTHON) -m mypy
test:
$(PYTHON) -m pytest
test_fastfail:
$(PYTHON) -m pytest -q -x
ci: format-check lint typecheck test_fastfail