-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
38 lines (30 loc) · 991 Bytes
/
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
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
test:
coverage run --branch --source pyunlocbox setup.py test
coverage report
coverage html
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/*