-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
74 lines (60 loc) · 1.34 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
POETRY = $(shell which poetry)
POETRY_VERSION = 1.1.2
# Env stuff
.PHONY: get-poetry
get-poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --version $(POETRY_VERSION)
.PHONY: venv-with-dependencies
venv-with-dependencies:
python3 -m venv .venv
$(POETRY) run pip install --upgrade pip
$(POETRY) run poetry install
# Tests
.PHONY: tests
tests:
$(POETRY) run pytest --cov=asymmetric --cov-report=term-missing --cov-report=xml tests
# Passive linters
.PHONY: black
black:
$(POETRY) run black asymmetric tests --check
.PHONY: flake8
flake8:
$(POETRY) run flake8 asymmetric tests
.PHONY: isort
isort:
$(POETRY) run isort asymmetric tests --profile=black --check
.PHONY: mypy
mypy:
$(POETRY) run mypy asymmetric tests
.PHONY: pylint
pylint:
$(POETRY) run pylint asymmetric
# Aggresive linters
.PHONY: black!
black!:
$(POETRY) run black asymmetric tests
.PHONY: isort!
isort!:
$(POETRY) run isort asymmetric tests --profile=black
# Aggregated
.PHONY: linters
linters:
$(MAKE) isort
$(MAKE) black
$(MAKE) flake8
$(MAKE) mypy
$(MAKE) pylint
.PHONY: linters!
linters!:
$(MAKE) isort!
$(MAKE) black!
$(MAKE) flake8
$(MAKE) mypy
$(MAKE) pylint
# Utilities
.PHONY: bump!
bump!:
sh scripts/bump.sh $(filter-out $@,$(MAKECMDGOALS))
# Receive args (use like `$(filter-out $@,$(MAKECMDGOALS))`)
%:
@: