-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
32 lines (23 loc) · 824 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
SRC_DIR=ncbitax2lin
TESTS_DIR=tests
# https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE:
format: FORCE
poetry run autoflake --recursive --in-place --remove-all-unused-imports $(SRC_DIR) $(TESTS_DIR) \
&& poetry run black $(SRC_DIR) $(TESTS_DIR) \
&& poetry run isort $(SRC_DIR) $(TESTS_DIR) \
black: FORCE
poetry run black --check $(SRC_DIR) $(TESTS_DIR)
isort: FORCE
poetry run isort --check $(SRC_DIR) $(TESTS_DIR)
mypy: FORCE
poetry run mypy $(SRC_DIR) $(TESTS_DIR)
pylint: FORCE
poetry run pylint $(SRC_DIR) $(TESTS_DIR)
test: FORCE
PYTHONHASHSEED=1 \
&& poetry run coverage run --source=$(SRC_DIR) --module pytest --durations=10 --failed-first $(1) \
&& poetry run coverage report --show-missing \
&& poetry run coverage html
lint: black isort mypy pylint
all: lint pytest