-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
87 lines (80 loc) · 2.29 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
[tox]
isolated_build = True
envlist =
lint
docs
{py36}-{django22,django31,django32}
{py37}-{django22,django31,django32}
{py38}-{django31,django32,django40,djangomain}
{py39}-{django31,django32,django40,djangomain}
{py310}-{django32,django40,djangomain}
check-description
check-manifest
coverage
[testenv]
whitelist_externals =
make
setenv =
PYTHONWARNINGS=all
commands =
coverage run --parallel-mode manage.py test -v1 --noinput
deps =
django22: Django==2.2.*
django31: Django==3.1.*
django32: Django==3.2.*
django40: Django==4.0.b1
djangomain: https://github.com/django/django/archive/main.tar.gz
pillow
coverage[toml]
coveralls
[testenv:coverage]
depends =
py36,py37,py38,py39,py310
commands =
coverage combine
coverage report
[testenv:lint]
commands =
make lint
deps =
-r{toxinidir}/requirements-dev.txt
[testenv:docs]
commands =
make docs
deps =
-r{toxinidir}/docs/requirements.txt
# Builds the package and runs 'twine check' to ensure it will render
# correctly when uploaded to the Python Package Index, or fail if not.
[testenv:check-description]
description = Check that the package description will render on the Python Package Index.
basepython = python3.9
changedir = {toxinidir}
skip_install = true
deps =
twine
# In this environment we always want latest wheel in addition to latest pip.
commands_pre =
{envpython} -m pip install --upgrade pip setuptools wheel
commands =
{envpython} -m pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
# Runs check-manifest, a tool that builds the package and compares the
# files in the package to the files under version control, and fails
# if any version-controlled files do not end up in the package.
[testenv:check-manifest]
description = Check that the set of packaged files matches the set of version-controlled files.
basepython = python3.9
changedir = {toxinidir}
skip_install = true
deps =
check-manifest
commands =
check-manifest --verbose
[flake8]
# flake8 does not support pyproject.toml, so we use tox.ini
# E731 do not assign a lambda expression
# W503 line break before binary operator (black introduces these)
# E203 whitespace before ':'
ignore = E731,W503,E203
exclude = .git,.tox,__pycache__
max-line-length = 120