-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
102 lines (93 loc) · 2.43 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# The package atldld is a tool to download atlas data.
#
# Copyright (C) 2021 EPFL/Blue Brain Project
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[tox]
minversion = 3.1.0
sources = setup.py src/atldld tests docs
envlist = lint, py{37, 38, 39}
[testenv]
deps =
pytest
pytest-cov
pytest-mock
responses
commands = pytest {posargs}
[testenv:lint]
skip_install = true
deps =
bandit==1.7.0
black==22.3.0
flake8==3.9.2
flake8-bugbear==21.4.3
flake8-comprehensions==3.5.0
flake8-docstrings==1.6.0
isort==5.8.0
mypy==0.910
types-dataclasses==0.1.7; python_version < '3.7'
types-requests==2.25.0
types-setuptools==57.0.0
types-toml==0.1.3
commands =
flake8 {posargs:{[tox]sources}}
isort --check {posargs:{[tox]sources}}
black --check {posargs:{[tox]sources}}
bandit -qr --exclude=tests/ {posargs:{[tox]sources}}
mypy {posargs:{[tox]sources}}
[testenv:format]
skip_install = true
deps =
black==22.3.0
isort==5.8.0
commands =
isort {posargs:{[tox]sources}}
black {posargs:{[tox]sources}}
[testenv:docs]
changedir = docs
extras = docs
allowlist_externals = make
commands =
make clean
make doctest SPHINXOPTS=-W
make html SPHINXOPTS=-W
[pytest]
testpaths = tests
addopts =
-m "not todo and not slow and not internet"
--cov
--cov-config=tox.ini
--no-cov-on-fail
--durations=20
--verbosity=1
--color=yes
markers =
internet: requires connection to the internet
slow: mark denoting a test that is too slow
todo: mark denoting a test that is not written yet
[coverage:run]
source = atldld
branch = true
[coverage:report]
#fail_under = 90
skip_covered = false
show_missing = false
[flake8]
max-line-length = 88
docstring-convention = numpy
extend-ignore = E203
per-file-ignores = tests/*:D
[isort]
profile = black
honor_noqa = true