mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-23 15:07:13 +00:00
Overhaul tox config for new locked dependency standards
This commit is contained in:
parent
ac3910ca62
commit
179771adc0
97
tox.ini
97
tox.ini
@ -1,69 +1,74 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py37, py38, static, static-tests, security, docs
|
envlist =
|
||||||
|
py{37,38,39}
|
||||||
|
static
|
||||||
|
static-tests
|
||||||
|
security
|
||||||
|
docs
|
||||||
isolated_build = true
|
isolated_build = true
|
||||||
skip_missing_interpreters = true
|
skip_missing_interpreters = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
description = Run the tests
|
description = Run the tests
|
||||||
deps =
|
require_locked_deps = true
|
||||||
pytest == 5.4.3
|
locked_deps =
|
||||||
pytest-cov == 2.9.0
|
pytest
|
||||||
toml == 0.10.1
|
pytest-cov
|
||||||
|
toml
|
||||||
commands =
|
commands =
|
||||||
pytest --cov={envsitepackagesdir}/imagemonk --cov-config ./.coveragerc tests/ --cov-report term-missing
|
pytest --cov={envsitepackagesdir}/imagemonk --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/
|
||||||
|
|
||||||
[testenv:static]
|
[testenv:static]
|
||||||
description = Static code analysis
|
description = Static formatting and quality enforcement
|
||||||
basepython = python3.7
|
basepython = python3.8
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
deps =
|
skip_install = true
|
||||||
pre-commit == 2.4.0
|
locked_deps =
|
||||||
pylint == 2.5.2
|
black
|
||||||
mypy == 0.782
|
blacken-docs
|
||||||
|
mypy
|
||||||
|
reorder-python-imports
|
||||||
|
pre-commit
|
||||||
|
pre-commit-hooks
|
||||||
|
pylint
|
||||||
commands =
|
commands =
|
||||||
pre-commit run --all-files
|
pre-commit run --all-files
|
||||||
pylint imagemonk/
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/imagemonk/
|
||||||
mypy imagemonk/ --ignore-missing-imports --no-strict-optional
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/imagemonk/
|
||||||
|
|
||||||
[testenv:static-tests]
|
[testenv:static-tests]
|
||||||
description = Tests code analysis for tests
|
description = Static formatting and quality enforcement for the tests
|
||||||
basepython = python3.7
|
basepython = python3.8
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
deps =
|
skip_install = true
|
||||||
pre-commit == 2.4.0
|
locked_deps =
|
||||||
pylint == 2.5.2
|
pylint
|
||||||
mypy == 0.782
|
mypy
|
||||||
pytest == 5.4.3
|
|
||||||
allowlist_externals =
|
|
||||||
bash
|
|
||||||
commands =
|
commands =
|
||||||
pre-commit run --all-files
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
|
||||||
bash -c "pylint tests/*.py"
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
|
||||||
mypy tests/ --ignore-missing-imports --no-strict-optional
|
|
||||||
|
|
||||||
[testenv:security]
|
[testenv:security]
|
||||||
description = Security checks (bandit+safety)
|
description = Security checks
|
||||||
basepython = python3.7
|
basepython = python3.8
|
||||||
|
skip_install = true
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
deps =
|
locked_deps =
|
||||||
bandit == 1.6.2
|
bandit
|
||||||
safety == 1.9.0
|
safety
|
||||||
allowlist_externals =
|
poetry
|
||||||
bash
|
|
||||||
commands =
|
commands =
|
||||||
bandit imagemonk/ --recursive
|
bandit --recursive --quiet {toxinidir}/imagemonk/
|
||||||
bandit tests/ --recursive --skip B101
|
bandit --recursive --quiet --skip B101 {toxinidir}/tests/
|
||||||
bash -c "poetry export --format requirements.txt --without-hashes --dev | safety check --stdin --bare"
|
poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev
|
||||||
|
safety check --bare --file {envtmpdir}/requirements.txt
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
description = Build the html documentation with Sphinx
|
description = Build the documentation
|
||||||
basepython = python3.7
|
basepython = python3.8
|
||||||
deps =
|
locked_deps =
|
||||||
sphinx == 3.0.4
|
sphinx
|
||||||
sphinx-autodoc-typehints == 1.10.3
|
sphinx-autodoc-typehints
|
||||||
allowlist_externals =
|
|
||||||
rm
|
|
||||||
commands =
|
commands =
|
||||||
sphinx-apidoc -o docs/ imagemonk
|
sphinx-apidoc --no-toc --output-dir {toxinidir}/docs/ {toxinidir}/imagemonk/
|
||||||
rm docs/modules.rst
|
sphinx-build -W -b html {toxinidir}/docs/ {toxinidir}/docs/_build
|
||||||
sphinx-build -M html docs/ docs/_build -W
|
|
||||||
|
Loading…
Reference in New Issue
Block a user