-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (36 loc) · 977 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
.PHONY: tests
# Clean
clean:
@find . -name '__pycache__' | xargs rm -fr {} \;
@find . -name '.coverage' | xargs rm -fr {} \;
@find . -name 'build' | xargs rm -fr {} \;
@find . -name 'dist' | xargs rm -fr {} \;
@find . -name '.pytest_cache' | xargs rm -fr {} \;
@find . -type d -name '*.egg-info' | xargs rm -fr {} \;
@find . -type d -name '*.eggs' | xargs rm -fr {} \;
# Install
install:
@pip install .
dev_install:
@pip install -e .
# Tests
qa_check_code:
@find ./src -name "*.py" | xargs flake8 --exclude *.eggs*
unittest:
@pytest -v --cov=akutils --cov-report term-missing src/**/tests/unit
typetest:
@find ./src -name "*.py" | xargs mypy
tests:
@make qa_check_code
@make unittest
@make typetest
@make clean
# Deploy to PyPi
build_pkg:
@make clean
@python3 -m pip install --upgrade build
@python3 -m pip install --upgrade twine
@python3 -m build
build_and_deploy_to_pypi:
@make build_pkg
@python3 -m twine upload --verbose --repository pypi dist/*