-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
124 lines (116 loc) · 4.38 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# NOTE: python-apt must be available system-wide as it can't be installed
# by pip, alternatively you must list it as an external dependency
# with an URL like this one:
# https://snapshot.debian.org/archive/debian/20130606T215913Z/pool/main/p/python-apt/python-apt_0.8.9.1.tar.gz
[tox]
envlist =
{py37,py38,py39,py310}-{django22,django30,django31,django32}-unit-tests,
flake8,
# Ensure we have no warnings on last Django LTS
py37-django32-no-warnings,
skipsdist = True
skip_missing_interpreters = True
[testenv]
whitelist_externals =
tox
xvfb-run
# The "-W ignore:::pysimplesoap.transport:" parameter for the no-warnings call is due
# to this bug: https://github.com/pysimplesoap/pysimplesoap/issues/159
# The "-W ignore:::site:" parameter for the no-warnings call is due to this bug:
# https://github.com/pypa/virtualenv/issues/1120
# The "-W ignore:::distutils:" parameter for the no-warnings call is for this one:
# DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
# The "-W ignore:::jinja2:" parameter for the no-warnings call is for this one:
# DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
setenv = LANG=C
commands =
unit-tests: {envpython} ./manage.py test django_email_accounts distro_tracker
no-warnings: {envpython} -W error -W ignore:::pysimplesoap.transport: -W ignore:::site: -W ignore:::distutils: -W ignore:::jinja2.utils: -W ignore:::jinja2.runtime: ./manage.py test django_email_accounts distro_tracker
show-warnings: {envpython} -W all ./manage.py test django_email_accounts distro_tracker
functional-tests: xvfb-run {envpython} ./manage.py test functional_tests
check: {envpython} ./manage.py check
sitepackages = True
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2b1,<3.3
functional: Django>=2.2,<2.3
coverage: coverage
tests: requests
tests: django_jsonfield>=1.4.0
tests: django_debug_toolbar
tests: gpg
tests: PyYAML
tests: python_debian
tests: python_debianbts
tests: python_apt
tests: beautifulsoup4
tests: responses
functional-tests: selenium
[testenv:flake8]
commands = {envpython} -m flake8 django_email_accounts/ functional_tests/ distro_tracker/ manage.py setup.py
deps =
flake8
flake8-import-order
flake8-builtins
flake8-logging-format
flake8-rst-docstrings
flake8-docstrings
[flake8]
max-complexity = 12
max-line-length = 80
exclude = .git,.ropeproject,.tox,__pycache__,distro_tracker/project/settings/local.py,docs/conf.py,*/migrations/*.py
ignore =
# function name should be lowercase
N802,
# variable in function should be lowercase
N806,
# camelcase imported as lowercase
N813,
# line break after binary operator
W504,
# sphinx's roles unknown to flake8-rst-docstrings until
# https://github.com/peterjc/flake8-rst-docstrings/issues/7
RST304,
# ignore most tags from flake8-docstrings as we have too many of them currently
# All missing docstrings...
# Missing docstring in public class
D101,
# Missing docstring in public method
D102,
# Missing docstring in magic method
D105,
# Missing docstring in public nested class
D106,
# Missing docstring in __init__
D107,
# One-line docstring should fit on one line with quotes
D200,
# No blank lines allowed after function docstring
D202,
# 1 blank line required after class docstring
D204,
# 1 blank line required between summary and description
D205,
# Multi-line docstring closing quotes should be on a separate line
D209,
# No blank lines allowed before class docstring
D211,
# First line should end with a period
D400,
# First line should be in imperative mood
D401
enable-extensions = G
application-import-names = distro_tracker,django_email_accounts
[testenv:coverage]
basepython = python3.9
commands =
{envpython} -m coverage erase
{envpython} -m coverage run -p ./manage.py test django_email_accounts distro_tracker
{envpython} -m coverage combine
{envpython} -m coverage html