-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (30 loc) · 794 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
POETRY ?= poetry
name = pyflipt
_default: test
clean:
find . -name '__pycache__' | xargs rm -rf
find . -type f -name "*.pyc" -delete
install-dev:
$(POETRY) install
install:
$(POETRY) install --no-dev
format:
$(POETRY) run isort $(name) tests
$(POETRY) run black $(name) tests
lint:
$(POETRY) run isort --check-only $(name) tests
$(POETRY) run black --check $(name) tests
$(POETRY) run flake8 --config setup.cfg $(name) tests
mypy:
$(POETRY) run mypy -p $(name) && $(POETRY) run mypy -p tests
test:
$(POETRY) run pytest tests
coverage: install-dev
$(POETRY) run pytest tests --cov=$(name)
version:
$(POETRY) version $(version)
release:
# can only support wheels here
$(POETRY) build -f wheel
$(POETRY) run twine upload dist/*
.PHONY: clean install install-dev test