nephila/djangocms-blog

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    black
    blacken
    docs
    isort
    isort_format
    ruff
    pypi-description
    towncrier
    py{311,310,39}-django{42,41}-cms{311}
    py{311,310,39}-django{32}-cms{39}

[testenv]
commands = {env:COMMAND:python} cms_helper.py djangocms_blog test {posargs}
deps =
    django32: Django~=3.2.0
    django32: django-mptt>=0.9
    django32: django-filer>=2.0
    django32: django-appdata>=0.3.2
    django41: Django~=4.1.0
    django41: django-mptt>=0.9
    django41: django-filer>=2.0
    django41: django-appdata>=0.3.2
    django42: Django~=4.2.0
    django42: django-mptt>=0.9
    django42: django-filer>=2.0
    django42: django-appdata>=0.3.2
    cms39: https://github.com/django-cms/django-cms/archive/release/3.9.x.zip
    cms311: https://github.com/yakky/django-cms/archive/release/3.11.x.zip
    channels[daphne]~=4.0.0
    django-knocker~=0.5.1
    channels-redis
    -r{toxinidir}/requirements-test.txt
passenv =
    COMMAND
    PYTEST_*

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

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

[testenv:isort_format]
commands =
    {envpython} -m isort djangocms_blog 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

[flake8]
exclude = *.egg-info,.git,.settings,.tox,build,dist,docs,requirements,tmp,*migrations*,tests,data
ignore = E800, W503, C812, C813, C815, C818, C819, C408
max-line-length = 119
# flake8-quotes
inline-quotes = double
# flake8-coding
no-accept-encodings = True
# flake8-tidy-imports
banned-modules = __future__ = this project supports python3 only

[isort]
combine_as_imports = true
default_section = THIRDPARTY
force_grid_wrap = 0
include_trailing_comma = true
known_first_party = djangocms_blog
line_length = 119
multi_line_output = 3
skip = data, .tox
use_parentheses = 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