-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
61 lines (49 loc) · 1.38 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
.PHONY: all init check test coverage html pdf clean clean-all apidoc
module=yzal
all:
@echo 'init install development requirements'
@echo 'check run static code checkers'
@echo 'test run unit tests'
@echo 'coverage generate HTML coverage report'
@echo 'html build HTML documentation'
@echo 'pdf build PDF documentation (requires LaTeX)'
@echo 'package build source and binary packages'
@echo 'clean cleanup source tree'
@echo 'clean-all also removes tox and eggs'
init:
@pip install -q -r dev-requirements.txt
test: check
@python -m pytest --cov=$(module) --cov-branch
coverage: check
@python -m pytest --cov=$(module) --cov-branch \
--cov-report html
check:
@python -m pylint --rcfile=pylintrc $(module)
@python -m pycodestyle $(module) tests
@python -m pydocstyle $(module)
@mypy $(module)
apidoc:
@sphinx-apidoc -o docs/api -e -P $(module)
@rm docs/api/modules.rst
html: apidoc
@$(MAKE) -C docs html
pdf: apidoc
@$(MAKE) -C docs latexpdf
package: test
@python setup.py sdist
@python setup.py bdist_wheel
clean:
@rm -f docs/api/*.rst
@rm -f *.pyc
@rm -f tests/*.pyc
@rm -rf tests/.pytest_cache
@rm -f tests/.coverage
@rm -f .coverage
@rm -rf htmlcov
@rm -rf __pycache__
@rm -rf *.egg-info
@rm -rf dist
clean-all: clean
@rm -rf .tox
@rm -rf .eggs
@$(MAKE) -C docs clean