forked from jazzband/django-oauth-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
152 lines (137 loc) · 2.92 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
[tox]
envlist =
flake8,
migrations,
migrate_swapped,
docs,
sphinxlint,
py{38,39,310,311,312}-dj42,
py{310,311,312}-dj50,
py{310,311,312}-dj51,
py{310,311,312}-djmain,
[gh-actions]
python =
3.8: py38, docs, flake8, migrations, migrate_swapped, sphinxlint
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
DJANGO =
4.2: dj42
5.0: dj50
5.1: dj51
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
nologinrequiredmiddleware
[testenv]
commands =
pytest {posargs}
coverage report
coverage xml
setenv =
DJANGO_SETTINGS_MODULE = tests.settings
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = all
deps =
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1
dj51: Django>=5.1,<5.2
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{310,311,312}-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
allowlist_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/