-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
58 lines (48 loc) · 1.04 KB
/
tox.ini
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
[tox]
# these are the default environments, i.e. the list of tests running when you
# execute `tox` in the command-line without anything else
envlist =
tests
lint
[testenv]
passenv = *
lint_folders =
"{toxinidir}/torch_alchemical/" \
"{toxinidir}/tests/"
[testenv:tests]
setenv =
PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
deps =
pytest
commands =
# Run unit tests
pytest
[testenv:lint]
description = Run linters and type checks
package = skip
deps =
black
flake8
flake8-bugbear
mypy
isort
commands =
flake8 {[testenv]lint_folders}
black --check --diff {[testenv]lint_folders}
isort --check-only --diff {[testenv]lint_folders}
mypy torch_alchemical/
[testenv:format]
description = Abuse tox to do actual formatting on all files.
package = skip
deps =
black
isort
commands =
black {[testenv]lint_folders}
isort {[testenv]lint_folders}
[flake8]
# longer lines for compatibility with other linters
max_line_length = 88
extend-ignore = E203
[isort]
profile = black