forked from tfranzel/drf-spectacular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
158 lines (126 loc) · 3.73 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[tox]
envlist =
py39-lint,py39-docs,
{py36,py37,py38}-django{2.2}-drf{3.10,3.11},
{py37,py38,py39}-django{3.2}-drf{3.11,3.12},
{py38,py39,py310}-django{4.0,4.1}-drf{3.13,3.14},
{py311}-django{4.1, 4.2}-drf{3.14},
py310-django4.2-drfmaster
py310-djangomaster-drf3.14
py310-drfmaster-djangomaster
py310-drfmaster-djangomaster-allowcontribfail
skip_missing_interpreters = true
[testenv]
commands = python runtests.py {posargs:--fast --cov=drf_spectacular --cov=tests --cov-report=xml}
setenv =
PYTHONDONTWRITEBYTECODE=1
passenv =
CI
deps =
django2.2: Django>=2.2,<3.0
django3.2: Django>=3.2,<4.0
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django4.2: Django>=4.2,<4.3
drf3.10: djangorestframework>=3.10,<3.11
drf3.11: djangorestframework>=3.11,<3.12
drf3.12: djangorestframework>=3.12,<3.13
drf3.13: djangorestframework>=3.13,<3.14
drf3.14: djangorestframework>=3.14,<3.15
djangomaster: https://github.com/django/django/archive/main.tar.gz
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
-r requirements/testing.txt
-r requirements/optionals.txt
[testenv:py310-drfmaster-djangomaster-allowcontribfail]
commands = python runtests.py {posargs:--fast --cov=drf_spectacular --cov=tests --cov-report=xml --allow-contrib-fail}
[testenv:py39-lint]
commands = python runtests.py --lintonly
deps =
-r requirements/testing.txt
[testenv:py39-docs]
commands = sphinx-build -WEa -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
deps =
-r requirements/docs.txt
[coverage:report]
precision = 2
exclude_lines =
pragma: no cover
except ImportError
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
[pytest]
markers =
contrib: marks upstream package dependency
system_requirement_fulfilled: marks system library dependency.
[flake8]
ignore =
# line break before binary operator
W503,
max-line-length = 120
[isort]
skip = .eggs,.tox,docs,env
skip_glob = venv*
line_length = 100
known_first_party = drf_spectacular,tests
known_third_party =
django
rest_framework
uritemplate
yaml
jsonschema
inflection
allauth
dj_rest_auth
rest_framework_simplejwt
rest_polymorphic
rest_framework_jwt
polymorphic
oauth2_provider
djstripe
multi_line_output = 5
use_parentheses = true
include_trailing_comma = true
[mypy]
python_version = 3.8
plugins = mypy_django_plugin.main,mypy_drf_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = "tests.settings"
[mypy-rest_framework.compat.*]
ignore_missing_imports = True
[mypy-rest_framework.utils.mediatypes.*]
ignore_missing_imports = True
[mypy-allauth.*]
ignore_missing_imports = True
[mypy-dj_rest_auth.*]
ignore_missing_imports = True
[mypy-rest_framework_simplejwt.*]
ignore_missing_imports = True
[mypy-oauth2_provider.*]
ignore_missing_imports = True
[mypy-rest_framework_jwt.*]
ignore_missing_imports = True
[mypy-uritemplate.*]
ignore_missing_imports = True
[mypy-inflection.*]
ignore_missing_imports = True
[mypy-jsonschema.*]
ignore_missing_imports = True
[mypy-djangorestframework_camel_case.util.*]
ignore_missing_imports = True
[mypy-django_filters.*]
ignore_missing_imports = True
[mypy-polymorphic.*]
ignore_missing_imports = True
[mypy-rest_polymorphic.*]
ignore_missing_imports = True
[mypy-rest_framework_nested.*]
ignore_missing_imports = True
[mypy-rest_framework_recursive.*]
ignore_missing_imports = True
[mypy-rest_framework_dataclasses.*]
ignore_missing_imports = True
[mypy-rest_framework_gis.*]
ignore_missing_imports = True
[mypy-djangorestframework_camel_case.*]
ignore_missing_imports = True