-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
109 lines (94 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
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
# This is the setup file for the tox tool
[tox]
envlist =
{py38,py39, pypy3}-test
coverage
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,coverage,linkcheck,codestyle,reformat,build}: python3
description =
run tests
devdeps: with the latest developer version of key dependencies
deps =
pytest
pytest-xdist
-rrequirements.txt
commands =
pip freeze
pytest --pyargs ccsds_ndm {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 ccsds_ndm -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 ccsds_ndm --section-default THIRDPARTY ccsds_ndm
black ccsds_ndm
[testenv:codestyle]
description = this environments checks for flake8, black, isort code style
deps =
black
docutils
isort
flake8
mypy
pygments
skip_install = true
commands =
flake8 ccsds_ndm --count
isort --check-only --diff --project ccsds_ndm --section-default THIRDPARTY ccsds_ndm
black --check ccsds_ndm
mypy --ignore-missing-imports --check-untyped-defs --no-strict-optional ccsds_ndm
[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
setenv =
READTHEDOCS_PROJECT = ccsds-ndm
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