forked from jonasrauber/eagerpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (70 loc) · 1.95 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.PHONY: test
test:
pytest --pdb --cov-report term-missing --cov=eagerpy --verbose
pytest --pdb --cov-report term-missing --cov=eagerpy --cov-append --verbose --backend numpy
pytest --pdb --cov-report term-missing --cov=eagerpy --cov-append --verbose --backend pytorch
pytest --pdb --cov-report term-missing --cov=eagerpy --cov-append --verbose --backend jax
pytest --pdb --cov-report term-missing --cov=eagerpy --cov-append --verbose --backend tensorflow
pytest --pdb --cov-report term-missing --cov=eagerpy --cov-append --verbose --backend pytorch-gpu
.PHONY: black
black:
black .
.PHONY: blackcheck
blackcheck:
black --check .
.PHONY: flake8
flake8:
flake8
.PHONY: mypy
mypy:
mypy -p eagerpy
mypy tests/
.PHONY: docs
docs:
pydocmd generate
cd docs && vuepress build --temp /tmp/
.PHONY: installvuepress
installvuepress:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
sudo yarn global add vuepress
.PHONY: servedocs
servedocs:
cd docs/.vuepress/dist/ && python3 -m http.server 9999
.PHONY: devdocs
devdocs:
cd docs && vuepress dev --temp /tmp/ --port 9999
.PHONY: pushdocs
pushdocs:
cd docs/.vuepress/dist/ && git init && git add -A && git commit -m 'deploy'
cd docs/.vuepress/dist/ && git push -f [email protected]:jonasrauber/eagerpy.git master:gh-pages
.PHONY: install
install:
pip3 install -e .
.PHONY: devsetup
devsetup:
pre-commit install
.PHONY: build
build:
python3 setup.py sdist
.PHONY: commit
commit:
git add eagerpy/VERSION
git commit -m 'Version $(shell cat eagerpy/VERSION)'
.PHONY: release
release: build
twine upload dist/eagerpy-$(shell cat eagerpy/VERSION).tar.gz
.PHONY: pyre
pyre:
pyre --source-directory . check
.PHONY: pytype
pytype:
pytype .
.PHONY: pyright
pyright:
pyright .
.PHONY: mypyreport
mypyreport:
-mypy . --html-report build
python3 -m http.server 9999