forked from Molecolab-Pisa/GPX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
74 lines (59 loc) · 1.32 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[tox]
# what is run if you type "tox" with no argument
envlist =
tests
lint
[flake8]
ignore=
# Line break before binary operator (black allows it)
W503
exclude=
.git
__pycache__,
.pytest_cache,
gpx/models/regression.py,
per-file-ignores =
# imported but unused, blank line at end of file
__init__.py: F401, W391
# line breaks before binary operator
gpx/models/gpr.py: W503
gpx/models/sgpr.py: W503
max_line_length = 88
max-complexity = 10
[pytest]
testpaths =
tests
[testenv]
skip_install = True
[testenv:tests]
description = runs the test with pytest
deps =
pytest
jax[cpu]
numpy
tabulate
typing_extensions
tqdm
optax
nlopt
commands =
pytest
[testenv:lint]
description = checks python code with flake8, black, and isort
deps =
flake8
flake8-bugbear
black
isort
commands =
flake8 {toxinidir}/gpx {toxinidir}/setup.py
black --check --diff {toxinidir}/gpx {toxinidir}/setup.py
isort --check-only --diff {toxinidir}/gpx {toxinidir}/setup.py --profile black
[testenv:format]
description = formats the code through tox, using black and isort
deps =
black
isort
commands =
black {toxinidir}/gpx {toxinidir}/setup.py {toxinidir}/tests
isort {toxinidir}/gpx {toxinidir}/setup.py {toxinidir}/tests --profile black