-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (36 loc) · 1.01 KB
/
Makefile
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
IN_PROJECT?=true
.PHONY: init
init:
rm -r ./.venv || true
poetry config virtualenvs.in-project ${IN_PROJECT}
poetry install
.PHONY: mypy
mypy:
poetry run mypy src
.PHONY: format
format:
poetry run python3 -m ruff format
poetry run python3 -m ruff check --fix
.PHONY: test
test:
poetry run pytest tests -m "not e2e_test and not gpu_test" --cov=src --cov-report term-missing --durations 5
.PHONY: e2e_test
e2e_test:
poetry run pytest tests -m "e2e_test"
.PHONY: gpu_test
gpu_test:
poetry run pytest tests -m "gpu_test"
.PHONY: lint
lint:
poetry run python3 -m ruff check --output-format=full
poetry run python3 -m ruff format --diff
# $(MAKE) mypy
.PHONY: dev-install
dev-install: init
poetry run python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
.PHONY: document
document:
rm -rf docs/build || true
rm -rf docs/source/reference/generated || true
rm -rf docs/source/tutorials/basic_usages || true
poetry run sphinx-build -M html docs/source docs/build