-
Notifications
You must be signed in to change notification settings - Fork 93
/
Makefile
42 lines (34 loc) · 1.1 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
NB = $(sort $(wildcard examples/*.ipynb))
.PHONY: help clean lint test doc dist release
help:
@echo "clean remove non-source files and clean source files"
@echo "lint check style"
@echo "test run tests and check coverage"
@echo "doc generate HTML documentation and check links"
@echo "dist package (source & wheel)"
@echo "release package and upload to PyPI"
clean:
git clean -Xdf
jupyter nbconvert --inplace --ClearOutputPreprocessor.enabled=True $(NB)
lint:
flake8 --doctests --exclude=doc
# Matplotlib doesn't print to screen. Also faster.
export MPLBACKEND = agg
# Virtual framebuffer nonetheless needed for the pyqtgraph backend.
export DISPLAY = :99
test:
Xvfb $$DISPLAY -screen 0 800x600x24 &
coverage run --branch --source pygsp setup.py test
coverage report
coverage html
killall Xvfb
doc:
sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
sphinx-build -b linkcheck -d doc/_build/doctrees doc doc/_build/linkcheck
dist: clean
python setup.py sdist
python setup.py bdist_wheel --universal
ls -lh dist/*
twine check dist/*
release: dist
twine upload dist/*