forked from jazzband/django-oauth-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
157 lines (142 loc) · 3.01 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
[tox]
envlist =
flake8,
migrations,
migrate_swapped,
docs,
sphinxlint,
py{37,38,39}-dj22,
py{37,38,39,310}-dj32,
py{38,39,310}-dj40,
py{38,39,310,311}-dj41,
py{38,39,310,311}-dj42,
py{310,311}-djmain,
[gh-actions]
python =
3.7: py37
3.8: py38, docs, flake8, migrations, migrate_swapped, sphinxlint
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
DJANGO =
2.2: dj22
3.2: dj32
4.0: dj40
4.1: dj41
4.2: dj42
main: djmain
[pytest]
django_find_project = false
addopts =
--cov=oauth2_provider
--cov-report=
--cov-append
-s
markers =
oauth2_settings: Custom OAuth2 settings to use - use with oauth2_settings fixture
[testenv]
commands =
pytest {posargs}
coverage report
coverage xml
setenv =
DJANGO_SETTINGS_MODULE = tests.settings
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = all
deps =
dj22: Django>=2.2,<3
dj32: Django>=3.2,<3.3
dj40: Django>=4.0.0,<4.1
dj41: Django>=4.1,<4.2
dj42: Django>=4.2,<4.3
djmain: https://github.com/django/django/archive/main.tar.gz
djangorestframework
oauthlib>=3.1.0
jwcrypto
coverage
pytest
pytest-cov
pytest-django
pytest-xdist
pytest-mock
requests
passenv =
PYTEST_ADDOPTS
[testenv:py{38,39,310}-djmain]
ignore_errors = true
ignore_outcome = true
[testenv:sphinxlint]
deps = sphinx-lint
skip_install = True
commands =
sphinx-lint docs/
[testenv:{docs,livedocs}]
basepython = python3.8
changedir = docs
allowlist_externals = make
commands =
docs: make html
livedocs: make livehtml
deps =
Jinja2<3.1
sphinx<3
oauthlib>=3.1.0
m2r>=0.2.1
mistune<2
sphinx-rtd-theme
livedocs: sphinx-autobuild
jwcrypto
django
[testenv:flake8]
basepython = python3.8
skip_install = True
commands = flake8 {toxinidir}
deps =
flake8
flake8-isort
flake8-quotes
flake8-black
[testenv:migrations]
setenv =
DJANGO_SETTINGS_MODULE = tests.mig_settings
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = all
commands = django-admin makemigrations --dry-run --check
[testenv:migrate_swapped]
setenv =
DJANGO_SETTINGS_MODULE = tests.settings_swapped
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = all
commands =
django-admin migrate
[testenv:build]
deps =
setuptools>=39.0
wheel
whitelist_externals = rm
commands =
rm -rf dist
python setup.py sdist bdist_wheel
[coverage:run]
source = oauth2_provider
omit = */migrations/*
[coverage:report]
show_missing = True
[flake8]
max-line-length = 110
exclude = docs/, oauth2_provider/migrations/, tests/migrations/, .tox/, build/, dist/
application-import-names = oauth2_provider
inline-quotes = double
extend-ignore = E203, W503
[isort]
default_section = THIRDPARTY
known_first_party = oauth2_provider
line_length = 110
lines_after_imports = 2
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
skip = oauth2_provider/migrations/, .tox/, tests/migrations/