-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
38 lines (32 loc) · 892 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
.PHONY: clean
clean:
rm -rf ./build
rm -rf ./dist
rm -rf ./mypy_cache
rm -rf ./pytest_cache
.PHONY: format
format:
black --line-length 100 .
.PHONY: lint
lint:
flake8 --count --max-line-length 100 .
black --check --diff --line-length 100 .
mypy --ignore-missing-imports .
# pylint disables:
# * C0301: line too long
# * C0103: snake-case naming
# * C0330: wrong hanging indent before block
# * E0401: unable to import
# * R0903: too few public methods
# * W0212: access to protected member
pylint --disable=C0103,C0301,C0330,E0401,R0903,W0212 dask_pytorch_ddp/
.PHONY: unit-tests
unit-tests:
pip uninstall -y dask-pytorch-ddp
python setup.py develop
pytest --cov=dask_pytorch_ddp tests/
.PHONY: test
test: clean lint unit-tests
.PHONY: format
@echo -e '\n\nCheck formatting with Black...'
black --line-length 100 --exclude '/(\.vscode|node_modules)/' .