-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (60 loc) · 1.36 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
sinclude .env # create from example.env
.PHONY: install lint test watch all clean check typecheck
PROJECT=quiltcore
TEST_README=--codeblocks
LOCAL_ONLY=False
ifeq ($(TEST_OS),windows-latest)
TEST_README=''
endif
all: lock install update test
clean:
rm -f *.log
rm -rf .coverage* coverage*
rm -rf quiltplus/.pytest_cache .mypy_cache .quilt
lock:
poetry lock
install:
poetry install
update:
poetry update
check:
poetry check
make typecheck
make lint
test: clean check
poetry run pytest $(TEST_README) --cov --cov-report xml:coverage.xml
test-readme:
poetry run pytest $(TEST_README)
test-local:
export LOCAL_ONLY=True; poetry run pytest
lint:
poetry run black $(PROJECT) tests
poetry run flake8 $(PROJECT) tests
typecheck:
poetry run mypy $(PROJECT) tests
coverage:
poetry run pytest --cov --cov-report html:coverage_html
open coverage_html/index.html
watch:
poetry run ptw .
tag:
git tag `poetry version | awk '{print $$2}'`
git push --tags
pypi: clean tag clean-git
poetry version
poetry build
poetry publish --dry-run
clean-git:
git branch | grep -v '*' | grep -v 'main' | xargs git branch -D
which:
which $(PROJECT)
$(PROJECT) --version
pip-install:
python3 -m pip install $(PROJECT)
make which
pip-upgrade:
python3 -m pip install --upgrade $(PROJECT)
make which
pip-update:
poetry self update
python3 -m pip install --upgrade pip