forked from jorgepiloto/poliastro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
89 lines (76 loc) · 1.93 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
[tox]
description = list of environments againts tox runs the tests
envlist =
clean
check
docs
py35
py36
py37
py38
pypy
pypy3
coverage
skipsdist = True
[testenv]
basepython =
pypy: {env:PYTHON:pypy}
pypy3: {env:PYTHON:pypy3}
py35: {env:PYTHON:python3.5}
{py36,docs}: {env:PYTHON:python3.6}
py37: {env:PYTHON:python3.7}
py38: {env:PYTHON:python3.8}
{clean,check,reformat,images,coverage}: {env:PYTHON:python3}
setenv =
PYTHONUNBUFFERED=yes
passenv =
*
deps =
flit >=2,<3
pygments
commands =
# TODO: Warning because poliastro does not have test and doc extras
flit install --deps develop --extras=dev,cesium
pytest -m "not mpl_image_compare" {posargs:--mypy -vv}
[testenv:coverage]
description = measures code coverage
commands =
flit install --symlink --deps develop --extras=dev,cesium
pytest --cov {posargs:--cov-report=term-missing}
[testenv:images]
commands =
flit install
pytest -m "mpl_image_compare" --mpl {posargs:-vv}
[testenv:check]
description = this environments checks for flake8, black, isort and poliastro code style
deps =
black
docutils
isort
flake8
mypy
pygments
skip_install = true
commands =
flake8 src
isort --check-only --diff --recursive --project poliastro --section-default THIRDPARTY src
black --check src
mypy --ignore-missing-imports --check-untyped-defs --no-strict-optional src
[testenv:reformat]
description = reformats the code using black and isort
deps =
black
isort
skip_install = true
commands =
isort --recursive --project poliastro --section-default THIRDPARTY src
black src
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
whitelist_externals = sphinx-build
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml
[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage