-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·49 lines (39 loc) · 1.05 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
PROJECT_PATH=./tests
help:
@echo " clean-pyc"
@echo " Remove python artifacts."
@echo " clean-build"
@echo " Remove build artifacts."
@echo " isort"
@echo " Sort import statements."
@echo " lint"
@echo " Fix pep8 style with autopep8."
@echo " Check style with flake8."
@echo " test"
@echo " run tests with unittest."
@echo " init."
@echo " install requirements."
init:
pip install -r requirements.txt
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-build:
rm -rf build/
rm -rf dist/
rm -rf docs/_build
rm -rf *.egg-info
isort:
isort $(PROJECT_PATH)
lint: isort
autopep8 --verbose --recursive --in-place --aggressive $(PROJECT_PATH)
#flake8 $(PROJECT_PATH)
test: lint
python3 -m unittest discover -s $(PROJECT_PATH)
docs: clean-build
cd docs && make html
upload: clean-build
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository pypi dist/*
.PHONY: clean-pyc clean-build