[tox] envlist = black docs isort pep8 pydocstyle pypi-description towncrier py{39,38,37}-django{31}-cms{38} py{39,38,37}-django{30}-cms{38,37} py{39,38,37}-django{22}-cms{38,37} skip_missing_interpreters = true skipsdist = True [testenv:coverage] setenv = PYTHONDONTWRITEBYTECODE = 1 PYTEST_ARGS = --cov=dea_dam [testenv] alwayscopy = True basepython = python3 commands = - {envpython} -mpip install -r requirements-test.txt - {env:COMMAND_PRE:python -c "print('test start')"} {env:COMMAND:python} -mpytest {posargs} {env:PYTEST_ARGS:""} - {env:COMMAND_POST:python -c "print('test end')"} deps = django22: django~=2.2.0 django30: django~=3.0.0 django31: django~=3.1.0 cms37: django-cms~=3.7.4 cms38: django-cms~=3.8.0 -r{toxinidir}/requirements-test.txt passenv = TERM* PIP_* PYTEST_* COMMAND* BUILD_DIR DAM_* DEA_* DATABASE_* setenv = PYTHONDONTWRITEBYTECODE = 1 DAM_INDEX_NS=tox_dea_dam_test [testenv:docs] commands = - {envpython} -mpip install -r requirements-test.txt {envpython} -m invoke docbuild deps = invoke sphinx sphinx-rtd-theme livereload~=2.6 django<3.1 -r{toxinidir}/requirements-test.txt setenv = BUILD_DIR=../{env:BUILD_DIR:"docs/_build/html"} skip_install = true [testenv:black] commands = {envpython} -m black --check --diff . deps = black==20.8b1 skip_install = true [testenv:blacken] commands = {envpython} -m black . deps = {[testenv:black]deps} skip_install = true [testenv:isort] commands = {envpython} -misort -c --df dea_dam tests deps = isort>5.4,<5.5 skip_install = true [testenv:isort_format] commands = {envpython} -misort dea_dam tests deps = {[testenv:isort]deps} skip_install = true [testenv:pep8] commands = {envpython} -m flake8 deps = flake8 flake8-broken-line flake8-bugbear flake8-builtins flake8-coding flake8-commas flake8-comprehensions flake8-eradicate flake8-quotes flake8-tidy-imports pep8-naming skip_install = true [testenv:pydocstyle] commands = {envpython} -mpydocstyle dea_dam deps = pydocstyle 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 skip_install = true [testenv:towncrier] commands = {envpython} -m invoke towncrier-check deps = invoke 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_* skip_install = true [pydocstyle] convention = pep257 # http://www.pydocstyle.org/en/stable/error_codes.html add_ignore = D100,D101,D104,D105,D106,D107,D412,D200 add_select = D204,D205,D214,D413 [flake8] exclude = *.egg-info,.git,.settings,.tox,build,dist,docs,requirements,tmp,*migrations*,tests,data ignore = E800, W503, C812, C813, C815, 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 = dea_dam line_length = 119 multi_line_output = 3 not_skip = __init__.py skip = data, .tox use_parentheses = True [check-manifest] ignore = .* *.ini *.toml *.json *.lock *.txt *.rst *.yml *.yaml .tx/** .gitlab/** .idea/** changes/** docs/** aldryn_config.py helper.py setup.py tasks.py tests/** *.mo *.sh *.key Dockerfile ignore-bad-ideas = *.mo [pytest] DJANGO_SETTINGS_MODULE = helper python_files = test_*.py traceback = short addopts = --reuse-db -p no:warnings