-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (28 loc) · 1023 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
.PHONY: help format lint mypy test test-all vulncheck
help:
@echo "format - Format python code with isort and black"
@echo "lint - Check style with pylint"
@echo "mypy - Run the static type checker"
@echo "test - Run tests suite with python"
@echo "test-all - Run lint, and test coverage"
@echo "vulncheck - Check for packages vulnerabilities with pipenv"
format:
isort -rc --apply nestor_api tests validator yaml_lib ./**.py
black nestor_api tests validator yaml_lib
lint:
isort -rc -c nestor_api tests validator yaml_lib ./**.py
black --check nestor_api tests validator yaml_lib
pylint tests --rcfile=tests/.pylintrc
pylint nestor_api ./**.py --rcfile=nestor_api/.pylintrc
pylint validator ./**.py --rcfile=nestor_api/.pylintrc
pylint yaml_lib ./**.py --rcfile=nestor_api/.pylintrc
mypy:
mypy nestor_api tests validator yaml_lib
test:
coverage run -m unittest discover -v -s ./tests
coverage report
coverage html
coverage xml
test-all: lint mypy test
vulncheck:
pipenv check