|
| 1 | +# All configuration for plugins and other utils is defined here and in pyproject.toml. |
| 2 | +# Read more about `setup.cfg`: |
| 3 | +# https://docs.python.org/3/distutils/configfile.html |
| 4 | +# good reference: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7Bcookiecutter.project_name%7D%7D/setup.cfg |
| 5 | + |
| 6 | +# --- Individual linter configuration --------------------------------------- |
| 7 | + |
| 8 | +[flake8] |
| 9 | +ignore = E203, E266, E501, W503, F403, F401 |
| 10 | +max-line-length = 88 |
| 11 | +max-complexity = 18 |
| 12 | +select = B,C,E,F,W,T4,B9 |
| 13 | +exclude = .git,__pycache__,.mypy_cache,.pytest_cache,.tox,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv |
| 14 | + |
| 15 | +[pycodestyle] |
| 16 | +max-line-length = 88 |
| 17 | +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv |
| 18 | + |
| 19 | +# --- See pyproject.toml for other linter configurations (black, isort) ----- |
| 20 | + |
| 21 | +# --- See pyproject.toml for commitizen configuration ----------------------- |
| 22 | + |
| 23 | +# --- Coverage configuration ------------------------------------------------ |
| 24 | + |
| 25 | +[coverage:run] |
| 26 | +omit = |
| 27 | + config/settings/* |
| 28 | + config/wsgi.py |
| 29 | + config/urls.py |
| 30 | + .research/* |
| 31 | + docs/* |
| 32 | + {{cookiecutter.project_slug}}/*/migrations/* |
| 33 | + manage.py |
| 34 | + venv/* |
| 35 | + *tests* |
| 36 | + tests/* |
| 37 | + .tox/* |
| 38 | + tasks.py |
| 39 | + |
| 40 | +branch = True |
| 41 | + |
| 42 | +# plugins = |
| 43 | +# # Docs: https://github.com/nedbat/django_coverage_plugin |
| 44 | +# django_coverage_plugin |
| 45 | + |
| 46 | +[coverage:report] |
| 47 | +skip_covered = True |
| 48 | + |
| 49 | +show_missing = True |
| 50 | + |
| 51 | +# --- pytest configuration -------------------------------------------------- |
| 52 | + |
| 53 | +# See warning at https://docs.pytest.org/en/stable/reference/customize.html#setup-cfg |
| 54 | +# I put the config here because I somehow couldn't get tox to play nicely with settings in pyproject.toml |
| 55 | + |
| 56 | +[tool:pytest] |
| 57 | +addopts = |
| 58 | + --cov=. --cov-append --cov-report html --cov-report xml --cov-report term-missing:skip-covered -s -vv |
| 59 | +DJANGO_SETTINGS_MODULE = config.settings.test |
| 60 | +python_files = tests.py test_*.py *_tests.py |
| 61 | +log_cli = 1 |
| 62 | +env_override_existing_values = 1 |
| 63 | +env_files = |
| 64 | + .envs/.test.env |
0 commit comments