-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
63 lines (43 loc) · 1.03 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
MODULE_NAME = movici_simulation_core
unittest:
NUMBA_DISABLE_JIT=1 pytest -v tests/
coverage:
NUMBA_DISABLE_JIT=1 pytest --cov $(MODULE_NAME) --cov-report=term-missing --cov-report=xml tests/
flake8:
flake8
bandit:
bandit --recursive $(MODULE_NAME) bin
bandit -f json -o bandit-report.json --recursive $(MODULE_NAME) bin
safety:
safety check -r requirements.txt --full-report
pylint:
pylint $(MODULE_NAME) --exit-zero -r n | tee pylint.txt
mypy:
- mypy $(MODULE_NAME)
clean:
rm -rf dist/
docker:
docker build -t model-engine .
benchmark:
pytest --benchmark-only tests/
test-numba:
pytest -v tests/
black-check:
black --check .
isort:
isort .
isort-check:
isort -c .
lint: flake8 black-check isort-check bandit safety mypy
test-all: coverage lint
level=patch
export level
bump-version:
bumpversion --config-file .bumpversion.app $(level)
@NEW_VERSION=$$(tail -1 VERSION);\
echo New version: $$NEW_VERSION
.PHONY: docs
docs:
cd docs/ && $(MAKE) html SPHINXOPTS="-W --keep-going"
doctest:
cd docs/ && $(MAKE) doctest