-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
58 lines (52 loc) · 1.29 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
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 88
# max-complexity = 18
select = B,C,E,F,W,T4,B9
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
[tox]
envlist = quality, test
[testenv]
basepython =
py36: {env:PYTHON:python3.6}
py37: {env:PYTHON:python3.7}
py38: {env:PYTHON:python3.8}
{quality,reformat,test,coverage}: {env:PYTHON:python3}
setenv =
PYTHONUNBUFFERED=yes
extras = dev
commands =
pytest {posargs:-vv}
[testenv:coverage]
description = measures code coverage
usedevelop = True
commands =
pytest --cov gdalos {posargs:--cov-report=term-missing}
[testenv:quality]
description = checks code quality
deps =
black
flake8
isort
mypy>=0.710
skip_install = true
commands =
python setup.py check --strict --metadata
flake8 src tests setup.py
isort --check-only --diff --recursive src tests setup.py
black --check src tests setup.py --exclude=_version.py
# mypy --ignore-missing-imports --check-untyped-defs --no-strict-optional src tests setup.py
[testenv:reformat]
description = reformats the code using black and isort
deps =
black
isort
skip_install = true
commands =
isort --recursive src tests setup.py
black src tests setup.py --exclude=_version.py