-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
65 lines (54 loc) · 1.55 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
[tox]
envlist = py3{10,11,12}
isolated_build = True
skip_missing_interpreters = True
[testenv]
description = Runs all tests
deps = .[test]
commands =
py.test --cov=conan --cov-branch --cov-report=html:./reports/ut_cov_{envname} --html=./reports/ut_report_{envname}.html --self-contained-html {posargs} -Werror
coverage xml -o ./reports/coverage.xml
coverage report
[testenv:formatter]
description = formatter
deps = .[lint]
commands =
isort src tests
black src tests
[testenv:lint]
description = Runs linters
deps = .[lint]
allowlist_externals = black
commands =
flake8 src tests
black --check src tests
[testenv:docs]
description = Build documentation
deps = .[doc]
allowlist_externals = bash
commands =
- bash -c "rm -rf ./docs/source/_autodoc"
- bash -c "rm -rf ./docs/source/_autosummary"
sphinx-build -M html ./docs/source ./docs/build -vv --jobs=auto --show-traceback --fail-on-warning --keep-going
[gh]
python =
3.12 = py312
3.11 = py311, type
3.10 = py310
[pytest]
testpaths = tests
addopts = --self-contained-html --cov=conan --cov-config=.coveragerc --cov-branch
[flake8]
max-line-length = 120
ignore = E701,
# multiple statements on one line (colon)
W503,
# line break before binary operator
E402,
# module level import not at top of file
F811,
# redefinition of unused
E203,
# whitespace before ':' are fine according to pep8
# see https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices for more
# information