-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
46 lines (34 loc) · 867 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
43
44
45
46
PYTHON = python
PYTEST = pytest
PYLINT = pylint
BLACK = black
SOURCE_DIR = deeprob
TESTS_DIR = tests
.PHONY: all clean
# Perform tests and print static code quality
all: pytest pylint
# Run black (check only)
black_check:
$(BLACK) "$(SOURCE_DIR)" --check --diff --color
# Run black (format files)
black:
$(BLACK) "$(SOURCE_DIR)"
# Run tests with HTML coverage output
pytest:
$(PYTEST) --cov "$(SOURCE_DIR)" --cov-report=html
# Run tests for Codecov
pytest_codecov:
$(PYTEST) --cov "$(SOURCE_DIR)" --cov-report=xml
# Print static code quality to stdout
pylint:
$(PYLINT) "$(SOURCE_DIR)"
# Upload the PIP package
pip_upload: pip_package
$(PYTHON) -m twine upload dist/*
# Build the PIP package
pip_package:
$(PYTHON) -m build .
# Clean files
clean:
rm -rf .pytest_cache htmlcov .coverage coverage.xml
rm -rf deeprob_kit.egg-info dist