-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
100 lines (91 loc) · 2.1 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
[tox]
args_are_paths = false
envlist =
py38-{4.2},
py39-{4.2},
py310-{4.2,5.0,master},
py311-{4.2,5.0,master},
py311-{4.2,5.0,master},
migrate,
flake8,
isort,
docs,
black
[testenv]
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
usedevelop = true
pip_pre = true
setenv =
DJANGO_SETTINGS_MODULE=tests.app.settings
PYTHONPATH={toxinidir}
PYTHONWARNINGS=all
commands =
coverage run ./manage.py test --no-input
deps =
4.2: Django==4.2.*
5.0: Django==5.0.*
master: https://github.com/django/django/archive/master.tar.gz
psycopg
coverage
[testenv:migrate]
setenv =
PYTHONPATH={toxinidir}
PYTHONDONTWRITEBYTECODE=1
COVERAGE_FILE=../.coverage
basepython = python3.11
recreate = true
skip_install = true
deps = coverage
commands =
python test_migrations/test.py
python test_migrations/clean.py
[testenv:flake8]
basepython = python3.11
deps = flake8==3.7.9
skip_install = True
commands = flake8
[flake8]
# rules probably to be ignored forever:
# E731 do not assign a lambda expression
# W503 line break before binary operator (black introduces these)
# E203 whitespace before ':'
# E231,E701 to allow Python 3.8 assignment expressions
# F999 to prevent false positives with pyflakes>2.1
ignore = E731,E501,W503,E203,E231,E701,F999
exclude = **/migrations/*.py,.git,.tox,__pycache__
max-line-length = 120
[testenv:isort]
allowlist_externals = make
deps = isort==5.13.2
basepython = python3.11
commands = make isort
[isort]
line_length = 100
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
combine_as_imports = True
skip = migrations, .tox, docs
known_third_party = django,django_filters,django_tables2
known_first_party = modeltrans,app
[testenv:docs]
basepython = python3.11
allowlist_externals = make
changedir = docs
setenv = PYTHONWARNINGS=once
commands =
make html
make spelling
skip_install = True
deps =
-r{toxinidir}/docs/requirements.txt
[testenv:black]
basepython = python3.11
passenv = LC_CTYPE
deps = black
commands = black --check .