-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
83 lines (64 loc) · 2.4 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
PYTHON = python
FLAKE = flake8
COVERAGE = coverage
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " init to install required packages"
@echo " build to build the python package(s)"
@echo " install to build and install the python package(s)"
@echo " develop to build and install the python package(s) for development"
@echo " test to run all integration and unit tests"
@echo " htmldoc to make the HTML documentation and open it with the default browser"
@echo " coverage to run tests, build coverage HTML report and open it with the default browser"
@echo ""
@echo "Advanced targets"
@echo " apidoc to generate API docs *.rst files from sources"
@echo " coverage-only to run tests and build coverage report"
@echo " coverage-open to open coverage HTML report in the default browser"
@echo " htmlclean to remove all generated documentation"
@echo " htmldoc-only to make the HTML documentation"
@echo " htmldoc-open to open the HTML documentation with the default browser"
@echo " pdfdoc to make the LaTeX sources and build the PDF of the documentation"
init:
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
build:
$(PYTHON) setup.py build
install: build
$(PYTHON) setup.py install
develop: build
$(PYTHON) setup.py develop
test:
pip install -r requirements-dev.txt
tox
flake:
$(FLAKE) pyuoi/
$(FLAKE) tests/
$(FLAKE) --ignore E402,W504 docs/gallery
checkpdb:
find {pyuoi,tests} -name "*.py" -exec grep -Hn pdb {} \;
#devtest:
#$(PYTHON) -W ignore:::pynwb.form.build.map: test.py -fpi
testclean:
rm *.npy *.nwb *.yaml
apidoc:
pip install -r requirements-doc.txt
cd docs && $(MAKE) apidoc
htmldoc-only: apidoc
cd docs && $(MAKE) html
htmlclean:
cd docs && $(MAKE) clean
htmldoc-open:
@echo ""
@echo "To view the HTML documentation open: docs/_build/html/index.html"
open docs/_build/html/index.html || xdg-open docs/_build/html/index.html
htmldoc: htmldoc-only htmldoc-open
pdfdoc:
cd docs && $(MAKE) latexpdf
@echo ""
@echo "To view the PDF documentation open: docs/_build/latex/PyNWB.pdf"
coverage-only:
tox -e localcoverage
coverage-open:
@echo "To view coverage data open: ./tests/coverage/htmlcov/index.html"
open ./tests/coverage/htmlcov/index.html || xdg-open ./tests/coverage/htmlcov/index.html
coverage: coverage-only coverage-open