2019-08-03 18:39:58 +00:00
|
|
|
[tox]
|
2020-03-09 03:53:52 +00:00
|
|
|
envlist = py36, py37, py38, format, static, docs
|
|
|
|
skip_missing_interpreters = true
|
2020-02-19 03:37:39 +00:00
|
|
|
isolated_build = true
|
|
|
|
|
|
|
|
[testenv]
|
2020-03-09 03:53:52 +00:00
|
|
|
description = Run unit tests (pytest+{basepython})
|
2020-02-19 03:37:39 +00:00
|
|
|
deps =
|
2020-02-25 05:00:50 +00:00
|
|
|
marshmallow == 3.5.0
|
|
|
|
passlib == 1.7.2
|
|
|
|
peewee == 3.13.1
|
|
|
|
pytest == 5.3.5
|
|
|
|
pytest-cov == 2.8.1
|
|
|
|
toml == 0.10.0
|
2020-02-19 04:02:43 +00:00
|
|
|
commands =
|
2020-02-24 01:24:39 +00:00
|
|
|
pytest --cov={envsitepackagesdir}/keyosk --cov-config .coveragerc tests/ --cov-report term-missing
|
2019-08-03 18:39:58 +00:00
|
|
|
|
2020-03-09 03:53:52 +00:00
|
|
|
[testenv:format]
|
|
|
|
description = Enforce code formatting (pre-commit)
|
|
|
|
skip_install = true
|
2019-08-03 18:39:58 +00:00
|
|
|
deps =
|
2020-02-25 05:00:50 +00:00
|
|
|
pre-commit == 2.1.0
|
2019-08-03 18:39:58 +00:00
|
|
|
commands =
|
2020-02-19 03:37:39 +00:00
|
|
|
pre-commit run --all-files
|
2019-08-03 18:39:58 +00:00
|
|
|
|
2020-03-09 03:53:52 +00:00
|
|
|
[testenv:static]
|
|
|
|
description = Static code analysis (mypy+pylint+bandit)
|
|
|
|
skip_install = true
|
|
|
|
ignore_errors = true
|
2020-02-19 04:02:43 +00:00
|
|
|
deps =
|
2020-03-09 03:53:52 +00:00
|
|
|
pylint == 2.3.1
|
|
|
|
astroid == 2.2.5
|
2020-02-25 05:00:50 +00:00
|
|
|
mypy == 0.761
|
|
|
|
bandit == 1.6.2
|
2020-02-19 03:37:39 +00:00
|
|
|
commands =
|
2020-03-09 03:53:52 +00:00
|
|
|
mypy keyosk --ignore-missing-imports --no-strict-optional
|
|
|
|
pylint keyosk --rcfile .pylintrc
|
2020-02-19 03:37:39 +00:00
|
|
|
bandit --recursive keyosk
|
2019-08-03 18:39:58 +00:00
|
|
|
|
2020-02-19 03:37:39 +00:00
|
|
|
[testenv:docs]
|
2020-03-09 03:53:52 +00:00
|
|
|
description = Build documentation (sphinx)
|
2020-02-19 03:37:39 +00:00
|
|
|
deps =
|
2020-02-25 05:00:50 +00:00
|
|
|
sphinx == 2.4.2
|
|
|
|
sphinx-autodoc-typehints == 1.10.3
|
2020-02-19 03:37:39 +00:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
|
|
|
commands =
|
|
|
|
sphinx-apidoc -o "./docs/" "keyosk"
|
|
|
|
rm "docs/modules.rst"
|
2020-02-23 04:17:27 +00:00
|
|
|
sphinx-build -M html "./docs/" "./docs/_build" -W
|
|
|
|
sphinx-build -M latex "./docs/" "./docs/_build" -W
|