-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 663 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
TEST_DIR ?= tests
PROJECT_DIR ?= levy
install:
@echo "Installing requirements..."
pip install -r requirements.txt
install_test:
@echo "Installing test requirements..."
pip install -r requirements-test.txt
precommit_install:
@echo "Installing pre-commit hooks"
@echo "Make sure to first run `make install_test`"
pre-commit install
isort:
isort $(PROJECT_DIR)
lint:
pylint --rcfile=.pylintrc $(PROJECT_DIR)
black:
black $(PROJECT_DIR) $(TEST_DIR)
black_check:
black --check --diff $(PROJECT_DIR)
unit:
coverage erase
coverage run -m pytest --doctest-modules $(TEST_FOLDER)
coverage xml -i
test_all: install install_test black_check lint unit