-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 885 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 885 Bytes
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
LINT_FILES = *.py algorithms
define echotask
@tput setaf 6
@echo -n " $1"
@tput setaf 8
@echo -n " - "
@tput sgr0
@echo $2
endef
help:
@echo
$(call echotask,"deps","installs and updates all dependencies for developing")
$(call echotask,"format","formats code using isort and black")
$(call echotask,"formatcheck","checks format using isort and black")
$(call echotask,"flake8","lints code using flake8")
$(call echotask,"lint","lints all code using flake8 isort and black")
$(call echotask,"formatlint","formats and lints code using flake8 isort and black")
@echo
deps:
pip install -U pip
pip install -Ur requirements.txt
format:
isort --filter-files $(LINT_FILES)
black $(LINT_FILES)
formatcheck:
isort --check-only --filter-files $(LINT_FILES)
black --check $(LINT_FILES)
flake8:
flake8 $(LINT_FILES)
lint: flake8 formatcheck
formatlint: format flake8