This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
62 lines (51 loc) · 1.84 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
.PHONY: test
test:
pytest --pdb --cov=foolbox.ext.native
pytest --pdb --cov=foolbox.ext.native --cov-append --backend pytorch
pytest --pdb --cov=foolbox.ext.native --cov-append --backend tensorflow
pytest --pdb --cov=foolbox.ext.native --cov-append --backend jax
pytest --pdb --cov=foolbox.ext.native --cov-append --backend numpy
.PHONY: test
testskipslow:
pytest --pdb --skipslow --cov=foolbox.ext.native
pytest --pdb --skipslow --cov=foolbox.ext.native --cov-append --backend pytorch
pytest --pdb --skipslow --cov=foolbox.ext.native --cov-append --backend tensorflow
pytest --pdb --skipslow --cov=foolbox.ext.native --cov-append --backend jax
pytest --pdb --skipslow --cov=foolbox.ext.native --cov-append --backend numpy
.PHONY: testattacks
testattacks:
pytest --pdb --cov=foolbox.ext.native.attacks tests/test_attacks.py tests/attacks/
pytest --pdb --cov=foolbox.ext.native.attacks tests/test_attacks.py tests/attacks/ --cov-append --backend pytorch
pytest --pdb --cov=foolbox.ext.native.attacks tests/test_attacks.py tests/attacks/ --cov-append --backend tensorflow
pytest --pdb --cov=foolbox.ext.native.attacks tests/test_attacks.py tests/attacks/ --cov-append --backend jax
pytest --pdb --cov=foolbox.ext.native.attacks tests/test_attacks.py tests/attacks/ --cov-append --backend numpy
.PHONY: black
black:
black .
.PHONY: blackcheck
blackcheck:
black --check .
.PHONY: flake8
flake8:
flake8
.PHONY: mypy
mypy:
mypy -p foolbox.ext.native
mypy tests/
# mypy tests/attacks/
.PHONY: install
install:
pip3 install -e .
.PHONY: devsetup
devsetup:
pre-commit install
.PHONY: build
build:
python3 setup.py sdist
.PHONY: commit
commit:
git add foolbox/ext/native/VERSION
git commit -m 'Version $(shell cat foolbox/ext/native/VERSION)'
.PHONY: release
release: build
twine upload dist/foolbox-native-$(shell cat foolbox/ext/native/VERSION).tar.gz