forked from einsteinpy/einsteinpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
73 lines (65 loc) · 1.65 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
[tox]
description = list of environments againts tox runs the tests
envlist =
clean,
check,
docs,
py35,
py36
py37
pypy,
pypy3
[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}
{clean,check,reformat}: {env:PYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
passenv =
*
usedevelop = false
deps =
pytest-cov
ipywidgets
skip_install = false
commands =
{posargs:pytest --cov --cov-report=term-missing -vv src/einsteinpy/tests}
[testenv:check]
description = this environments checks for flake8, black, isort and einsteinpy code style
deps =
black
docutils
isort
flake8
mypy
pygments
skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
flake8 src setup.py
isort --check-only --diff --recursive --project einsteinpy --section-default THIRDPARTY src setup.py
black --check src setup.py
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 einsteinpy --section-default THIRDPARTY src setup.py
black src setup.py
[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