-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 902 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
SRC_CORE=src
SRC_TEST=tests
PYTHON=python3
PIP=pip3
test: ## Test the code
@type coverage >/dev/null 2>&1 || (echo "Run '$(PIP) install coverage' first." >&2 ; exit 1)
@coverage run --source . -m unittest
@coverage report
@coverage html
test_integration: ## Test the code
@type coverage >/dev/null 2>&1 || (echo "Run '$(PIP) install coverage' first." >&2 ; exit 1)
@coverage run --source . -m $(SRC_TEST).integration.test_api_integration
@coverage report
clean: ## Cleanup
@rm -f $(SRC_CORE)/*.pyc
@rm -rf $(SRC_CORE)/__pycache__
@rm -f $(SRC_TEST)/*.pyc
@rm -rf $(SRC_TEST)/__pycache__
@rm -rf dist
@rm -rf htmlcov
@rm -rf $(SRC_CORE)/*.egg-info
build: ## build project
$(PYTHON) -m pip install --upgrade build ; \
$(PYTHON) -m build
upload:
$(PYTHON) -m twine upload dist/*
lint:
pylint ./
autoformat:
autopep8 --in-place --recursive ./