-
Notifications
You must be signed in to change notification settings - Fork 252
/
Makefile
71 lines (57 loc) · 1.55 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
.PHONY: install-dev
install-dev:
pip install -r requirements/dev.txt
.PHONY: install
install:
pip install -e .[all]
.PHONY: test
test:
pytest alibi
.PHONY: lint
lint:
flake8 alibi
.PHONY: mypy
mypy:
mypy alibi
.PHONY: build_docs
build_docs:
# readthedocs.org build command
python -m sphinx -T -b html -d doc/_build/doctrees -D language=en doc/source doc/_build/html
.PHONY: build_latex
build_latex: ## Build the documentation into a pdf
# readthedocs.org build command
# explicit cd here due to a bug in latexmk 4.41
python -m sphinx -b latex -d doc/_build/doctrees -D language=en doc/source doc/_build/latex && \
cd doc/_build/latex && \
latexmk -pdf -f -dvi- -ps- -jobname=alibi -interaction=nonstopmode
.PHONY: clean_docs
clean_docs:
$(MAKE) -C doc clean
rm -r doc/source/api
.PHONY: build_pypi
build_pypi:
python setup.py sdist bdist_wheel
.PHONY: push_pypi_test
push_pypi_test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: push_pypi
push_pypi:
twine upload dist/*
.PHONY: licenses
licenses:
# create a tox environment and pull in license information
tox --recreate -e licenses
cut -d, -f1,3 ./licenses/license_info.csv \
> ./licenses/license_info.no_versions.csv
.PHONY: check_licenses
# check if there has been a change in license information, used in CI
check_licenses:
git --no-pager diff --exit-code ./licenses/license_info.no_versions.csv
.PHONY: repl
tox-env=default
repl:
env COMMAND="python" tox -e $(tox-env)
.PHONY: test
test:
TF_USE_LEGACY_KERAS=1 pytest -m "tf1" alibi
pytest -m "not tf1" alibi