-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
34 lines (26 loc) · 850 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
help:
@echo 'make: Display this message'
@echo 'make clean: Remove the compiled files (*.pyc, *.pyo)'
@echo 'make pylint: Test using pylint'
@echo 'make flake8: Test using flake8'
@echo 'make black: Run black formatter'
@echo 'make todo: Look for TODO and XXX markers in the source code'
clean:
find reach -regex .\*\.py[co]\$$ -delete
find reach -depth -name __pycache__ -type d -exec rm -r -- {} \;
TEST_PATHS = reach tests/*.py
pylint:
@echo "Running pylint..."
pylint --rcfile=setup.cfg $(TEST_PATHS)
flake8:
@echo "Running flake8..."
flake8 $(TEST_PATHS)
test:
@echo "Running tests..."
pytest tests
black:
@echo "Running black..."
black $(TEST_PATHS)
todo:
-@grep --color -Ion '\(TODO\|XXX\).*' -r reach
.PHONY: clean default help test pylint flake8 todo