-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 690 Bytes
/
Makefile
File metadata and controls
42 lines (32 loc) · 690 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
SRC_PATH = turbo_broccoli
VENV_PATH = venv
DOCS_PATH = docs
PDOC = pdoc -d google --math
PYTHON = python3.11
.ONESHELL:
all: format typecheck lint
.PHONY: clean
clean:
-rm -r out/test/*
.PHONY: docs
docs:
-@mkdir $(DOCS_PATH) > /dev/null 2>&1
$(PYTHON) -m $(PDOC) --output-directory $(DOCS_PATH) $(SRC_PATH)
.PHONY: docs-browser
docs-browser:
-@mkdir $(DOCS_PATH) > /dev/null 2>&1
$(PYTHON) -m $(PDOC) -h 0.0.0.0 -p 8081 -n $(SRC_PATH)
.PHONY: format
format:
ruff check --select I --fix
ruff format
.PHONY: lint
lint:
ruff check
.PHONY: test
test:
-mkdir -p out/test
TB_ARTIFACT_PATH=out/test pytest -v
.PHONY: typecheck
typecheck:
$(PYTHON) -m mypy -p $(SRC_PATH)