forked from wmayner/pyphi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 969 Bytes
/
Copy pathMakefile
File metadata and controls
48 lines (36 loc) · 969 Bytes
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
.PHONY: test docs
src = pyphi
tests = test
docs = docs
docs_build = docs/_build
docs_html = docs/_build/html
benchmarks = benchmarks
test: coverage watch-tests
coverage:
coverage run --source $(src) -m py.test
coverage html
open htmlcov/index.html
watch-tests:
watchmedo shell-command \
--command='make coverage' \
--recursive --drop --ignore-directories \
--patterns="*.py" $(src) $(tests)
# TODO: watch test config files
docs: build-docs open-docs
watch-docs:
watchmedo shell-command \
--command='make docs' \
--recursive --drop --ignore-directories \
--patterns="*.py;*.rst" $(src) $(docs)
rm-docs:
rm -rf $(docs_build)
build-docs:
cd $(docs) && make html
cp $(docs)/_static/* $(docs_html)/_static
open-docs:
open $(docs_html)/index.html
upload-docs: build-docs
cp -r $(docs_html) ../pyphi-docs
cd ../pyphi-docs && git commit -a -m 'Update docs' && git push origin gh-pages
benchmark:
cd $(benchmarks) && asv continuous develop