forked from poliastro/czml3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
62 lines (56 loc) · 1.42 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
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 80
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 =
pypy: {env:PYTHON:pypy}
pypy3: {env:PYTHON:pypy3}
py36: {env:PYTHON:python3.6}
py37: {env:PYTHON:python3.7}
py38: {env:PYTHON:python3.8}
py39: {env:PYTHON:python3.9}
{quality,reformat,test,coverage}: {env:PYTHON:python3}
setenv =
PYTHONUNBUFFERED = yes
PYTEST_EXTRA_ARGS = --mypy
extras = dev
commands =
pytest {env:PYTEST_EXTRA_ARGS:} src tests {posargs:-vv}
[testenv:coverage]
description = measures code coverage
usedevelop = True
commands =
pytest --cov czml3 {posargs:--cov-report=term-missing}
[testenv:quality]
description = checks code quality
deps =
black==22.3.0
build
flake8
isort
skip_install = true
commands =
python setup.py check --strict --metadata
flake8 src tests setup.py
isort --check-only --diff --project czml3 --section-default THIRDPARTY src tests
black --check src tests --exclude=_version.py
python -m build .
[testenv:reformat]
description = reformats the code using black and isort
deps =
black
isort
skip_install = true
commands =
isort --project czml3 --section-default THIRDPARTY src tests setup.py
black src tests setup.py --exclude=_version.py