mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 02:27:24 +00:00
80 lines
2.0 KiB
INI
80 lines
2.0 KiB
INI
[tox]
|
|
envlist =
|
|
py{37,38,39}
|
|
static
|
|
static-tests
|
|
security
|
|
docs
|
|
isolated_build = true
|
|
skip_missing_interpreters = true
|
|
|
|
[testenv]
|
|
description = Run the tests
|
|
require_locked_deps = true
|
|
require_poetry = true
|
|
locked_deps =
|
|
openapi-spec-validator
|
|
pytest
|
|
pytest-cov
|
|
ruamel.yaml
|
|
toml
|
|
commands =
|
|
pytest --cov={envsitepackagesdir}/fresnel_lens --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/
|
|
|
|
[testenv:static]
|
|
description = Static formatting and quality enforcement
|
|
basepython = python3.8
|
|
ignore_errors = true
|
|
skip_install = true
|
|
locked_deps =
|
|
black
|
|
blacken-docs
|
|
mdformat
|
|
mdformat-gfm
|
|
mypy
|
|
reorder-python-imports
|
|
pre-commit
|
|
pre-commit-hooks
|
|
pylint
|
|
commands =
|
|
pre-commit run --all-files
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/fresnel_lens/
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/fresnel_lens/
|
|
|
|
[testenv:static-tests]
|
|
description = Static formatting and quality enforcement for the tests
|
|
basepython = python3.8
|
|
ignore_errors = true
|
|
skip_install = true
|
|
locked_deps =
|
|
pylint
|
|
mypy
|
|
commands =
|
|
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/
|
|
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/
|
|
|
|
[testenv:security]
|
|
description = Security checks
|
|
basepython = python3.8
|
|
skip_install = true
|
|
ignore_errors = true
|
|
locked_deps =
|
|
bandit
|
|
safety
|
|
poetry
|
|
commands =
|
|
bandit --recursive --quiet {toxinidir}/fresnel_lens/
|
|
bandit --recursive --quiet --skip B101 {toxinidir}/tests/
|
|
poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev
|
|
safety check --bare --file {envtmpdir}/requirements.txt
|
|
|
|
[testenv:docs]
|
|
description = Build the documentation
|
|
basepython = python3.8
|
|
locked_deps =
|
|
sphinx
|
|
sphinx-autodoc-typehints
|
|
commands =
|
|
sphinx-apidoc --no-toc --output-dir {toxinidir}/docs/ {toxinidir}/fresnel_lens/
|
|
sphinx-build -W -b html {toxinidir}/docs/ {toxinidir}/docs/_build
|