-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
108 lines (98 loc) · 2.38 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
[base]
name = dir_content_diff
files = {[base]name} tests docs/source/conf.py setup.py
[tox]
envlist =
check-packaging
lint
docs
min_versions
missing_deps
py{39,310,311,312}
coverage
minversion = 3.18
[testenv]
extras =
all_comparators
test
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
PYTEST_ADDOPTS = -m "not comparators_missing_deps"
commands =
coverage run \
--source={[base]name} \
--branch \
-m pytest \
--basetemp={envtmpdir} \
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
--durations 10 \
--durations-min=2.0 \
{posargs}
coverage html -d reports/coverage-{envname}
coverage xml -o reports/coverage-{envname}.xml
coverage report --fail-under=100 -m
[testenv:check-packaging]
skip_install = true
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:min_versions]
basepython = python3.9
deps =
Requirements-Builder
setenv =
COVERAGE_RCFILE=.coveragerc_min_versions
PYTEST_ADDOPTS = -m "not comparators_missing_deps"
commands_pre =
requirements-builder --level=min --extras=all_comparators,test -o {envtmpdir}/requirements_min.txt setup.py
pip install -r {envtmpdir}/requirements_min.txt
pip freeze
[testenv:missing_deps]
extras =
pandas
test
setenv:
PYTEST_ADDOPTS = -m comparators_missing_deps
commands =
pytest \
--basetemp={envtmpdir} \
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
{posargs}
[testenv:lint]
basepython = python3.9
deps =
pre-commit
pylint
commands =
pre-commit run --all-files --show-diff-on-failure
pylint -j {env:PYLINT_NPROCS:1} {[base]files}
[testenv:format]
basepython = python3.9
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -x .codespellignorelines -w {[base]files} README.md CHANGELOG.md docs/source
pre-commit run --all-files
[testenv:docs]
basepython = python3.10
changedir = docs
extras = docs
allowlist_externals =
make
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
[gh-actions]
python =
3.9: py39, lint
3.10: py310, check-packaging
3.11: py311, docs
3.12: py312