nephila/djangocms-helper

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    black
    blacken
    docs
    isort
    isort_format
    ruff
    pypi-description
    towncrier
    py{3.12}-django{50,42}-{cms311,nocms,async}
    py{3.11}-django{50,42,41,40,32}-{cms311,nocms,async}
    py{3.10}-django{50,42,41,40,32}-{cms311,nocms,async}
    py{3.9}-django{32}-{cms311,nocms,async}
    py{3.8}-django{32}-{cms311,nocms,async}
minversion = 3.23

[testenv]
commands = {env:COMMAND:python} helper.py {posargs}
deps=
    django32: django~=3.2.0
    django40: django~=4.0.0
    django41: django~=4.1.0
    django42: django~=4.2.0
    django50: django~=5.0.0
    cms311: https://github.com/django-cms/django-cms/archive/develop.zip
    cms311: djangocms-text-ckeditor>=5.0,<6.0
    -r{toxinidir}/requirements-test.txt
    async: channels[daphne]~=4.0.0
passenv =
    COMMAND
    PYTEST_*

[testenv:nocms]
alwayscopy = True

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

[testenv:isort]
commands =
    {envpython} -m isort -c --df app_helper tests
deps = isort~=5.12.0
skip_install = true

[testenv:isort_format]
commands =
    {envpython} -m isort app_helper 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
    django<4.0
    -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/**
    helper.py
    tasks.py
    tests/**
    *.mo
ignore-bad-ideas =
    *.mo

[pytest]
DJANGO_SETTINGS_MODULE = helper
python_files = test_*.py
traceback = short
addopts = --reuse-db -p no:warnings