Skip to content

Commit 176e346

Browse files
committed
makefile update
1 parent 2cdae98 commit 176e346

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

makefile

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ help:
2020
@echo " run yapf to format all .py files"
2121

2222
build:
23-
@echo "Generate protobuf message"
24-
@protoc -I=banditpylib --python_out=banditpylib banditpylib/data.proto --mypy_out=banditpylib
23+
@echo "\033[0;32mGenerate protobuf message\033[0m"
24+
protoc -I=banditpylib --python_out=banditpylib banditpylib/data.proto --mypy_out=banditpylib
2525

2626
install_requirements:
2727
pip install --upgrade pip
@@ -31,29 +31,30 @@ install: install_requirements
3131
pip install -e .
3232

3333
test:
34-
@${PYTHON} -m pytest banditpylib
34+
@echo "\033[0;32mRun tests\033[0m"
35+
${PYTHON} -m pytest banditpylib
3536

3637
lint:
37-
@echo "Check static errors"
38-
@${PYTHON} -m pylint --jobs=8 banditpylib
39-
@echo "Check static typing errors"
40-
@${PYTHON} -m mypy banditpylib
38+
@echo "\033[0;32mCheck static errors\033[0m"
39+
${PYTHON} -m pylint --jobs=8 banditpylib
40+
@echo "\033[0;32mCheck static typing errors\033[0m"
41+
${PYTHON} -m mypy banditpylib
4142

4243
clean-pyc:
43-
@find . -name '*.pyc' -delete
44-
@find . -name '*.pyo' -delete
45-
@find . -name '*~' -delete
46-
@find . -name '__pycache__' -type d | xargs rm -fr
47-
@find . -name '.pytest_cache' -type d | xargs rm -fr
48-
@find . -name '.ipynb_checkpoints' -type d | xargs rm -fr
49-
@rm -rf .mypy_cache
44+
@echo "\033[0;32mClean cache files\033[0m"
45+
find . -name '*.pyc' -delete
46+
find . -name '*.pyo' -delete
47+
find . -name '*~' -delete
48+
find . -name '__pycache__' -type d | xargs rm -fr
49+
find . -name '.pytest_cache' -type d | xargs rm -fr
50+
find . -name '.ipynb_checkpoints' -type d | xargs rm -fr
51+
rm -rf .mypy_cache
5052

5153
clean: clean-pyc
52-
@echo "Clean cache files"
5354

5455
freeze:
5556
python3 -m pip freeze > requirements.txt
5657

5758
fix:
58-
@echo "Format code"
59-
@yapf -irp --style="{indent_width: 2}" --exclude 'banditpylib/data_pb2.py' banditpylib
59+
@echo "\033[0;32mFormat code\033[0m"
60+
yapf -irp --style="{indent_width: 2}" --exclude 'banditpylib/data_pb2.py' banditpylib

0 commit comments

Comments
 (0)