forked from poliastro/poliastro
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
82 lines (76 loc) · 2.13 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
[tox]
description = list of environments againts tox runs the tests
envlist =
reformat
check
py3-fast
# See https://tox.readthedocs.io/en/latest/example/package.html#flit
isolated_build = True
isolated_build_env = build
skip_missing_interpreters = False
[testenv]
whitelist_externals=
/bin/bash
/usr/bin/bash
basepython =
pypy3: pypy3
py37: python3.7
py38: python3.8
py39: python3.9
docs: python3.8
{check,reformat,build}: python3
setenv =
PYTHONUNBUFFERED = yes
PIP_PREFER_BINARY = 1
coverage: NUMBA_DISABLE_JIT = 1
fast: PYTEST_MARKERS = -m "not slow and not mpl_image_compare"
online: PYTEST_MARKERS = -m "remote_data"
slow: PYTEST_MARKERS = -m "slow"
images: PYTEST_MARKERS = -m "mpl_image_compare"
PYTEST_EXTRA_ARGS = --mypy
online: PYTEST_EXTRA_ARGS = --remote-data=any
slow: PYTEST_EXTRA_ARGS =
images: PYTEST_EXTRA_ARGS = --mpl
coverage: PYTEST_EXTRA_ARGS = --cov
passenv =
*
extras =
dev
cesium
# This is already the default, but we include it here
# to remind ourselves that usedevelop is incompatible with flit,
# see https://tox.readthedocs.io/en/latest/config.html#conf-usedevelop
usedevelop = False
commands =
lint-imports
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}
[testenv:check]
description = this environments checks for flake8, black, isort and poliastro code style
deps =
black==21.10b0
docutils
isort
flake8
build
skip_install = true
commands =
flake8 src tests
isort --check-only --diff --project poliastro --section-default THIRDPARTY src tests
black --check --diff src tests
python -m build
[testenv:reformat]
description = reformats the code using black and isort
deps =
black==21.10b0
isort
skip_install = true
commands =
isort --project poliastro --section-default THIRDPARTY src tests
black src tests
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
setenv =
READTHEDOCS_PROJECT = poliastro
READTHEDOCS_VERSION = latest
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -vW -bhtml