-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
159 lines (141 loc) · 4.25 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[tox]
basepython = python3.12
envlist =
check,
; py313 # EOL 2029-10-31
py312 # EOL 2028-10-31
py311 # EOL 2027-10-31
py310 # EOL 2026-10-04
py39 # EOL 2025-10-05
py38 # EOL 2024-10-14
; py37 # EOL 2023-06-27
; py36 # EOL 2021-12-21
coverage
skip_missing_interpreters = true
# TOX Test Environment
[testenv]
usedevelop = True
extras =
test
passenv =
LC_ALL
LANG
TRAVIS
TRAVIS_BRANCH
TRAVIS_OS_NAME
TRAVIS_BUILD_ID
setenv =
COVERAGE_FILE = .coverage.{envname}
# Note: also honors .coveragerc:
deps =
PyYAML
pytest
pytest-cov
pytest-html
# requests
semantic_version
snazzy
toml
commands =
# Run everything from /tests folder:
python -V
; pip list
pytest -ra -v -x --durations=10 --cov=yabs --cov-report=xml --html=build/pytest/report-{envname}.html --self-contained-html {posargs}
[testenv:coverage]
skip_install = true
deps =
coverage
setenv =
COVERAGE_FILE = .coverage
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report --fail-under=30.0
[testenv:flake8]
# skip_install = true
deps =
# Required by flake8-bandit
bandit
# Flake8
# Configuration is defined in the [flake8] section of setup.cfg.
# Run `flake8 --help` to see the available options of *installed* plugins.
flake8 ~=6.0
# --- Helper to generate HTML reports:
# flake8-html
# --- Useful flake8 plugins:
flake8-annotations-complexity # TAE002 too complex annotation (X > Y)
# flake8-bandit # Security checks, e.g. S101
flake8-breakpoint # Check forgotten breakpoints and debugger calls
flake8-bugbear ~=23.1 # (B...) Check for error-prone constructs
; flake8-builtins # Check for python builtins being used as variables or parameters (A...)
flake8-coding # C101 Coding magic comment not found, ...
# flake8-commas # C812 missing trailing comma -> Handled by Black
; flake8-comprehensions
# flake8-docstrings
# flake8-eradicate # E800 Found commented out code
flake8-expression-complexity # ECE001 Expression is too complex (X > Y)
# flake8-if-expr # KEK100 don`t use "[on_true] if [expression] else [on_false]" syntax
# flake8-import-order # (we run `isort --check`)
# flake8-isort # (we run `isort --check`)
# flake8-logging-format # G001 Logging statement uses string.format()
flake8-pep3101 # Use "".format instead of %
# flake8-print # T001 print found
# flake8-pytest-style # PT009 use a regular assert instead of unittest-style 'assertTrue'
flake8-quotes ~=3.3 # See also [flake8] config
# flake8-return # R503 you should add explicit return at end of the function if function have return value except None
# flake8-rst-docstrings # Docstrings should work with Sphinx (RSTnnn)
# flake8-string-format # Check for valid string.format() args
# flake8-todo # T000 Todo note found
# mccabe # Check conplexity (see also max_complexity setting)
; pep8-naming
# Flake8 plugin 'wemake'
# (e.g. WPSnnn style errors)
# wemake-python-styleguide
changedir = {toxinidir}
commands =
flake8 yabs tests setup.py --doctests
[testenv:check]
description = Check Black formatting isort compliance
; skip_install = true
deps =
black ~=22.12
isort
{[testenv:flake8]deps}
changedir = {toxinidir}
commands =
{[testenv:flake8]commands}
isort --check-only --profile black yabs tests setup.py
black --check --diff yabs tests setup.py
[testenv:format]
description = Reformat python code using Black and isort
skip_install = true
deps =
{[testenv:check]deps}
changedir = {toxinidir}
commands =
isort --profile black yabs tests setup.py {posargs}
black yabs tests setup.py
{[testenv:flake8]commands}
[testenv:docs]
description = Build Sphinx documentation (output directory: docs/sphinx-build)
changedir = docs
deps =
furo
snazzy
sphinx
sphinx_rtd_theme
myst-parser[linkify]
sphinxcontrib-mermaid
commands =
# http://www.sphinx-doc.org/en/master/man/sphinx-build.html
sphinx-build -b html sphinx sphinx-build
# [testenv:clean]
# commands =
# coverage erase
# [testenv:stats]
# commands =
# coverage combine
# coverage report
# coverage html