-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
98 lines (74 loc) · 1.7 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
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
98
.PHONY: test pep8 pylama clean docs tox jslint
# The source director
SRC=abilian
# The package name
PKG=abilian
# On a 4 core laptop, 2 is optimal
NCPU=2
# pytest-sugar seems to be incompatible with pytest-xdist
PYTEST_MULTI=-n $(NCPU) -p no:sugar
all: test
#
# testing & checking
#
test:
py.test $(PYTEST_MULTI) $(PKG) tests
test-with-coverage:
py.test $(PYTEST_MULTI) \
--cov $(PKG) \
--cov-config etc/coverage.rc \
--cov-report term-missing $(PKG) tests
tox:
tox
vagrant-tests:
vagrant up
vagrant ssh -c /vagrant/deploy/vagrant_test.sh
#
# Various Checkers
#
pep8:
pep8 -r $(SRC)
pep8-stats:
pep8 -r --statistics -qq $(SRC) | sort -nr
pytest-pep8:
py.test --pep8 -m pep8 $(SRC) tests
pytest-flake:
py.test --flakes -m flakes $(SRC) tests
flake8:
flake8 $(SRC)
pylama:
pylama $(SRC)
pylint:
pylint --rcfile=etc/pylintrc $(SRC)
jslint:
npm run lint --silent
check-docs:
sphinx-build -W -b html docs/ docs/_build/html
#
# Everything else
#
install:
python setup.py install
doc: doc-html doc-pdf
doc-html:
sphinx-build -b html docs/ docs/_build/html
doc-pdf:
sphinx-build -b latex docs/ docs/_build/latex
make -C docs/_build/latex all-pdf
clean:
find . -name "*.pyc" | xargs rm -f
find . -name __pycache__ | xargs rm -rf
find . -name abilian.db | xargs rm -f
rm -rf *.egg-info *.egg .coverage
rm -rf whoosh tests/whoosh tests/integration/whoosh
rm -rf docs/_build docs/cache docs/tmp
rm -rf $(SRC)/static/gen
rm -rf dist build
rm -rf htmlcov coverage.xml
rm -rf docs/_build
rm -f junit-py27.xml
tidy: clean
rm -rf .tox .dox .travis-solo
update-pot:
# _n => ngettext, _l => lazy_gettext
python setup.py extract_messages update_catalog compile_catalog