-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 1.23 KB
/
Makefile
File metadata and controls
49 lines (37 loc) · 1.23 KB
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
.PHONY: help install install-tools install-tests update format format-check isort black test typecheck
POETRY = env -u VIRTUAL_ENV poetry
help:
@echo "Available targets:"
@echo " help Show this help message"
@echo " install Install root and tests dependencies"
@echo " install-tools Install root project dependencies"
@echo " install-tests Install tests project dependencies"
@echo " update Update root and tests dependencies"
@echo " format Format code with isort and black"
@echo " format-check Check formatting with isort and black"
@echo " isort Run isort"
@echo " black Run black"
@echo " typecheck Run pyright"
@echo " test Run tests (use ARG=... for extra pytest args)"
install:
$(MAKE) install-tools
$(MAKE) install-tests
install-tools:
$(POETRY) sync --with dev --no-root
install-tests:
$(POETRY) -C tests sync --with dev --no-root
update:
$(POETRY) update
$(POETRY) -C tests update
format: isort black
format-check:
$(POETRY) run isort --check-only --diff .
$(POETRY) run black --check .
isort:
$(POETRY) run isort .
black:
$(POETRY) run black .
typecheck:
$(POETRY) run pyright
test:
$(POETRY) -C tests run pytest -vv . ${ARG}