tox.ini
[tox]
envlist =
black
blacken
docs
isort
isort_format
pep8
pypi-description
towncrier
py{38,37,36,35}
passenv = LANG
skip_missing_interpreters = True
[testenv]
commands = {env:COMMAND:python} setup.py test
deps =
-r{toxinidir}/requirements-test.txt
passenv =
COMMAND
PYTEST_*
recreate = True
setenv =
LANGUAGE = en_US.UTF-8
LC_NUMERIC = en_US.UTF-8
[testenv:coverage]
commands =
coverage run setup.py test
coverage report -m
recreate = False
[testenv:pep8]
commands =
{envpython} -m flake8
{envpython} -minterrogate -c pyproject.toml djangocms_installer tests
deps =
interrogate
flake8
flake8-broken-line
flake8-bugbear
flake8-builtins
flake8-coding
flake8-commas
flake8-comprehensions
flake8-eradicate
flake8-quotes
flake8-tidy-imports
pep8-naming
recreate = False
skip_install = true
[testenv:isort]
commands =
{envpython} -m isort -c --df djangocms_installer tests
deps = isort>5,<6
recreate = False
skip_install = true
[testenv:isort_format]
commands =
{envpython} -m isort djangocms_installer tests
deps = {[testenv:isort]deps}
recreate = False
skip_install = true
[testenv:black]
commands =
{envpython} -m black --check --diff .
deps = black
recreate = False
skip_install = true
[testenv:blacken]
commands =
{envpython} -m black .
deps = {[testenv:black]deps}
recreate = False
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
recreate = False
skip_install = true
[testenv:pypi-description]
commands =
{envpython} -m invoke clean
{envpython} -m check_manifest
{envpython} -m pep517.build .
{envpython} -m twine check dist/*
deps =
invoke
check-manifest
pep517
twine
recreate = False
skip_install = true
[testenv:release]
commands =
{envpython} -m invoke clean
{envpython} -m check_manifest
{envpython} -m pep517.build .
{envpython} -m twine upload {posargs} dist/*
deps = {[testenv:pypi-description]deps}
passenv =
TWINE_*
recreate = False
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_installer
line_length = 119
multi_line_output = 3
skip = data, .tox
use_parentheses = True
[check-manifest]
ignore =
.*
*.ini
*.toml
*.json
*.sample
*.txt
*.yml
*.yaml
.tx/**
changes/**
docs/**
tasks.py
tests/**
*.mo
ignore-bad-ideas =
*.mo