-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (80 loc) · 2.04 KB
/
Copy pathMakefile
File metadata and controls
97 lines (80 loc) · 2.04 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
NAME=contours
.PHONY: list
list:
@echo "dev - installs all packages needed for development"
@echo "check:"
@echo " codestyle - run the PEP8 (style) checker on the project"
@echo " docstyle - run the PEP257 (docstrings) checker on the project"
@echo " lint - run pylint on the project"
@echo "doc:"
@echo " html - build HTML documentation"
@echo " pdf - build PDF documentation (requires pdflatex)"
@echo " man - build man page documentation"
@echo " info - build texinfo documentation (requires makeinfo)"
@echo " doctest - check documentation examples"
@echo " coverage - check documentation coverage"
@echo " server - start a webserver serving the documentation (port=8000)"
@echo "test - run all unit tests"
.PHONY: all
all: check doc test
.PHONY: dev
dev:
pip install -r requirements.txt
.PHONY: check
check: codestyle docstyle lint
.PHONY: codestyle
codestyle:
pycodestyle --exclude=.ropeproject,.eggs .
.PHONY: docstyle
docstyle:
pydocstyle --match-dir='^(?!tests|docs|\.).*$$'
.PHONY: lint
lint:
pylint $(NAME) setup.py docs/conf.py tests
.PHONY: doc
doc: html pdf man info doctest coverage
.PHONY: html
html:
$(MAKE) -C docs html
.PHONY: pdf
pdf:
$(MAKE) -C docs latexpdf
.PHONY: man
man:
$(MAKE) -C docs man
.PHONY: info
info:
$(MAKE) -C docs info
.PHONY: doctest
doctest:
$(MAKE) -C docs doctest
.PHONY: coverage
coverage:
$(MAKE) -C docs coverage
@echo ""
@echo ""
@echo ""
@echo ""
@echo "**************************************"
@echo "*** Documentation Coverage Summary ***"
@echo "**************************************"
@echo ""
@echo ""
@cat docs/_build/coverage/c.txt
@echo ""
@cat docs/_build/coverage/python.txt
.PHONY: server
server:
cd docs/_build/html; python -m http.server
.PHONY: test
test:
coverage erase
coverage run --branch --source $(NAME) -m unittest discover tests
coverage html
coverage report --fail-under=90 --show-missing
.PHONY: clean
clean:
rm -rf `find -name "__pycache__"`
rm -rf `find -name ".ropeproject"`
rm -rf htmlcov
$(MAKE) -C docs clean