forked from ianchen-tw/invisible-hand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 863 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
.PHONY: clean format lint better test test-cov
ALL: test
clean:
find . -name "*.py[co]" -o -name __pycache__ -exec rm -rf {} +
better: format lint
format:
isort --force-single-line-imports invisible_hand
# remove unused imports
autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place invisible_hand --exclude=__init__.py
# sort and gather imports
isort invisible_hand
# formatter
black invisible_hand
format-test-src:
isort --force-single-line-imports tests
# remove unused imports
autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place tests --exclude=__init__.py
# sort and gather imports
isort tests
# formatter
black tests
lint:
pyflakes invisible_hand
pyflakes tests
test:
pytest tests -s -v
test-cov:
# see test coverage report
pytest --cov=invisible_hand tests