-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (43 loc) · 834 Bytes
/
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
52
53
54
55
56
MAKEFLAGS += --no-print-directory
PROGRAM := paperd
PROGRAM_FULLPATH := $(shell which $(PROGRAM) 2>/dev/null)
DEBUG_PORT = 5678
VERBOSE =
all: test typecheck lint
test:
ifdef VERBOSE
poetry run pytest -vvv
else
@poetry run pytest
endif
typecheck:
ifdef VERBOSE
poetry run mypy
else
@poetry run mypy
endif
lint:
ifdef VERBOSE
flake8
else
@flake8
endif
debug:
python -m debugpy --wait-for-client --listen 127.0.0.1:$(DEBUG_PORT) \
$(PROGRAM_FULLPATH) $(OPTS)
shell:
poetry shell
push-all: test typecheck lint
@git remote | xargs -L1 git push --all
build: test typecheck lint
poetry build -f wheel
coverage:
coverage run -m pytest
coverage report -m
release: build
poetry publish
release-test: build
poetry publish -r test-pypi
clean:
rm -rf dist
find . -type d -name __pycache__ -print0 | xargs -0 rm -rf