-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
126 lines (110 loc) · 2.84 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# This is the setup file for the tox tool
[tox]
envlist =
{py38,py39,dev,pypy3}-test{,-devdeps}
coverage
build_docs
local_build_docs
linkcheck
codestyle
reformat
# skips packaging
skipsdist = True
isolated_build = true
[testenv]
whitelist_externals=
/bin/bash
/usr/bin/bash
sphinx-build
basepython =
pypy3: pypy3
py38: python3.8
py39: python3.9
{build_docs,local_build_docs,coverage,linkcheck,codestyle,reformat,build}: python3
description =
run tests
devdeps: with the latest developer version of key dependencies
deps =
pytest
pytest-xdist
-rrequirements.txt
# The devdeps factor is intended to be used to install the latest developer version
# of key dependencies.
devdeps: git+https://github.com/numpy/numpy.git#egg=numpy
devdeps: git+https://github.com/astropy/astropy#egg=astropy
devdeps: git+https://github.com/scipy/scipy#egg=scipy
commands =
pip freeze
pytest --pyargs satmad_applications {toxinidir}/docs {posargs:-vv}
[pytest]
norecursedirs = .git .tox dist env _build venv docs
[coverage:report]
omit =
ci-helpers/*
*/tests/*
*__init__.py
exclude_lines =
def __repr__
def __str__
[testenv:coverage]
description = checks coverage
deps =
pytest
coverage
-rrequirements.txt
skip_install = true
commands =
coverage run --source satmad_applications -m pytest
coverage xml
coverage report -m
[testenv:reformat]
description = reformats the code using black and isort
deps =
black
isort
skip_install = true
commands =
isort --project satmad_applications --section-default THIRDPARTY satmad_applications
black satmad_applications
[testenv:codestyle]
description = this environments checks for flake8, black, isort code style
deps =
black
docutils
isort
flake8
mypy
pygments
skip_install = true
commands =
flake8 satmad_applications --count
isort --check-only --diff --project satmad_applications --section-default THIRDPARTY satmad_applications
black --check satmad_applications
mypy --ignore-missing-imports --check-untyped-defs --no-strict-optional satmad_applications
[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
setenv =
READTHEDOCS_PROJECT = satmad_applications
READTHEDOCS_VERSION = latest
extras = docs
commands =
pip freeze
sphinx-build -W --color -b html . _build/html
[testenv:linkcheck]
changedir = docs
description = check the links in the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b linkcheck . _build/html
[testenv:local_build_docs]
changedir = local_docs
description = invoke sphinx-build to build the HTML docs
setenv =
READTHEDOCS_PROJECT = satmad_applications
READTHEDOCS_VERSION = latest
extras = local_docs
commands =
pip freeze
sphinx-build -W --color -b html . _build/html