-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (41 loc) · 982 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
ACTIVATE_VENV = pipenv run
PLATFORM := $(shell uname -s)
.PHONY:
black-format \
black-format-check \
bootstrap \
cheeseshop \
flake8 \
install-precommit \
isort \
isort-check \
nuke-venv \
run-tests \
black-format:
@$(ACTIVATE_VENV) black .
black-format-check:
@$(ACTIVATE_VENV) black . --check -q
bootstrap: nuke-venv cheeseshop install-precommit
cheeseshop:
@if [ $(PLATFORM) = 'Darwin' ]; then\
export CFLAGS='-Wno-implicit-function-declaration' && export LANG='en_US.UTF-8' && pipenv install --dev;\
else\
pipenv install --dev;\
fi
flake8:
@$(ACTIVATE_VENV) flake8 .
install-precommit:
@$(ACTIVATE_VENV) pre-commit install
isort:
@$(ACTIVATE_VENV) isort . --tc
isort-check:
@$(ACTIVATE_VENV) isort . --check-only --tc -q
nuke-venv:
@pipenv --rm;\
EXIT_CODE=$$?;\
if [ $$EXIT_CODE -eq 1 ]; then\
echo Skipping virtualenv removal;\
fi
run-tests:
@$(ACTIVATE_VENV) coverage run -m pytest -s $(EXTRA_ARGS)
@$(ACTIVATE_VENV) coverage report