-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (34 loc) · 1.15 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
EGG_NAME=clictagger
SHELL=/bin/bash -o pipefail
all: compile test lint
bin/pip:
python3 -m venv .
lib/.requirements: dev-requirements.txt setup.py bin/pip
# Install requirements
./bin/pip install -r dev-requirements.txt
touch lib/.requirements
compile: lib/.requirements
test: compile
./bin/pytest $(EGG_NAME) tests
lint: lib/.requirements
./bin/python3 setup.py sdist
./bin/twine check dist/*
./bin/black --diff $(EGG_NAME)/ tests/ conftest.py
lint-apply: lib/.requirements
./bin/black $(EGG_NAME)/ tests/ conftest.py
coverage: compile
./bin/coverage run ./bin/py.test $(EGG_NAME)/ tests/
./bin/coverage html
mkdir -p ../client/www/coverage
ln -frs htmlcov ../client/www/coverage/server
echo Visit http://$(WWW_SERVER_NAME)/coverage/server/index.html
notebook: bin/pip
./bin/pip install notebook ipywidgets
./bin/jupyter nbextension enable --py widgetsnbextension --sys-prefix
./bin/jupyter notebook --ip='0.0.0.0'
serve-docs: bin/pip
make -C docs clean dirhtml SPHINXBUILD=../bin/sphinx-build
./bin/python3 -m http.server -d docs/_build/dirhtml
release: test lint
./bin/fullrelease
.PHONY: compile test lint lint-apply coverage notebook release