nephila/django-knocker

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    docs
    ruff
    isort
    py{311,310,39}-django{42,41,40,32}
skip_missing_interpreters = true

[testenv]
setenv =
    PYTHONPATH = {toxinidir}:{toxinidir}/knocker
commands = {env:COMMAND:python} cms_helper.py test
deps =
    -r{toxinidir}/requirements-test.txt
    django32: Django~=3.2.0
    django40: Django~=4.0.1
    django41: Django~=4.1.2
    django42: Django~=4.2.0

[testenv:ruff]
commands =
    {envpython} -m ruff check knocker tests
    {envpython} -minterrogate -c pyproject.toml knocker tests
deps =
    interrogate
    ruff
skip_install = true

[testenv:isort]
commands =
    {envpython} -m isort -c --df knocker tests
deps = isort>=5.12.0,<5.13.0
skip_install = true

[testenv:isort_format]
commands =
    {envpython} -m isort knocker tests
deps = {[testenv:isort]deps}
skip_install = true

[testenv:black]
commands =
    {envpython} -m black --check --diff .
deps = black
skip_install = true

[testenv:blacken]
commands =
    {envpython} -m black .
deps = {[testenv:black]deps}
skip_install = true

[testenv:docs]
commands =
    {envpython} -m invoke docbuild
deps =
    invoke
    sphinx
    sphinx-rtd-theme
    sphinx-autobuild
    livereload~=2.6
    -rrequirements-test.txt
skip_install = true

[testenv:towncrier]
commands =
    {envpython} -m invoke towncrier-check
deps =
    invoke
skip_install = true

[testenv:pypi-description]
commands =
    {envpython} -m invoke clean
    {envpython} -m check_manifest
    {envpython} -m build .
    {envpython} -m twine check dist/*
deps =
    invoke
    check-manifest
    build
    twine
skip_install = true

[testenv:release]
commands =
    {envpython} -m invoke clean
    {envpython} -m check_manifest
    {envpython} -m build .
    {envpython} -m twine upload {posargs} dist/*
deps = {[testenv:pypi-description]deps}
passenv =
    TWINE_*
skip_install = true

[check-manifest]
ignore =
    .*
    *.ini
    *.toml
    *.json
    *.txt
    *.yml
    *.yaml
    .tx/**
    changes/**
    docs/**
    cms_helper.py
    aldryn_config.py
    tasks.py
    tests/**
    *.mo
ignore-bad-ideas =
    *.mo

[pytest]
DJANGO_SETTINGS_MODULE = cms_helper
python_files = test_*.py
traceback = short
addopts = --reuse-db