tox.ini
[tox]
# These are the default environments that will be run
# when ``tox`` is run without arguments.
envlist =
py35
py36
py37
py38
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
[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_* 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 = py35,py36,py37
# 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}