-
Notifications
You must be signed in to change notification settings - Fork 24
/
tox.ini
89 lines (78 loc) · 2.05 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
[tox]
# These are the default environments that will be run
# when ``tox`` is run without arguments.
envlist =
py39
py310
py311
py312
coverage
mypy
pep8
docs
skip_missing_interpreters = true
[flake8]
# Use the more relaxed max line length permitted in PEP8.
max-line-length = 99
# Enforce the Google Python style for grouping and sorting imports:
# https://github.com/google/styleguide/blob/gh-pages/pyguide.md#313-imports-formatting
import-order-style = google
# Inform flake8-import-order plugin that `cryptosteganography` should be treated as a local package name.
application-import-names = cryptosteganography
exclude = .tox,*.egg,build,dist,venv,miniconda3
max-complexity = 10
[testenv]
passenv = TOXENV,CODECOV_*
setenv =
COVERAGE_FILE = .coverage.{envname}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
# Use -Werror to treat warnings as errors.
python -bb -Werror -m pytest --cov="{envsitepackagesdir}/cryptosteganography" {posargs}
codecov -e TOXENV
[testenv:coverage]
skip_install = true
depends = py39,py310,py311,py312
# Set blank setenv to overwrite setenv from [testenv] (inherited).
setenv =
deps =
-r{toxinidir}/dev-requirements.txt
commands =
coverage combine
coverage html
[testenv:mypy]
skip_install = true
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
mypy src
[testenv:pep8]
skip_install = true
setenv =
deps =
-r{toxinidir}/dev-requirements.txt
commands =
flake8 src tests
[testenv:docs]
skip_install = true
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
changedir = {toxinidir}/docs
commands =
sphinx-apidoc --force --output-dir apidoc {toxinidir}/src/cryptosteganography
sphinx-build -a -W . _build
[testenv:licenses]
skip_install = true
setenv =
deps =
-r{toxinidir}/requirements.txt
pip-licenses
commands =
pip-licenses --from=mixed {posargs}