-
Notifications
You must be signed in to change notification settings - Fork 441
/
tox.ini
89 lines (74 loc) · 2.37 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
[tox]
minversion = 3.3.0
isolated_build = true
isolated_build_env = .package
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
envlist =
py{37,38,39}-django{22,30}-drf{310,311,312},
py{37,38,39}-django{31,32}-drf{311,312},
py{39,310}-django{40,41}-drf{313,314},
py311-django{40,41,42,50,51}-drf315,
py312-django{42,50,51}-drf315,
py313-django{51}-drf315,
py38-{lint, docs},
# py313-djmaster # ModuleNotFoundError: No module named 'psycopg'
skip_missing_interpreters = true
[testenv:.package]
# no additional dependencies besides PEP 517
deps =
[testenv:py310-djmaster]
ignore_outcome = true
[testenv]
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5
drf310: djangorestframework>=3.10,<3.11
drf311: djangorestframework>=3.11,<3.12
drf312: djangorestframework>=3.12,<3.13
drf313: djangorestframework>=3.13,<3.14
drf314: djangorestframework>=3.14,<3.15
drf315: djangorestframework>=3.15,<3.16
typing: typing>=3.6.6
# test with the latest builds of Django and django-rest-framework
# to get early warning of compatibility issues
djmaster: https://github.com/django/django/archive/main.tar.gz
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
# other dependencies
-r requirements/validation.txt
-r requirements/test.txt
drf310: coreapi>=2.3.3
drf310: coreschema>=0.0.4
drf310: flex~=6.14.1
commands =
pytest -n 2 --cov --cov-config .coveragerc --cov-append --cov-report="" {posargs}
[testenv:py38-lint]
skip_install = true
deps =
-r requirements/lint.txt
commands =
flake8 src/drf_yasg testproj tests setup.py
[testenv:py38-docs]
deps =
-r requirements/docs.txt
commands =
sphinx-build -WnEa -b html docs docs/_build/html
[pytest]
DJANGO_SETTINGS_MODULE = testproj.settings.local
python_paths = testproj
addopts = --ignore=node_modules
[flake8]
max-line-length = 120
exclude = **/migrations/*
ignore = E721,F405,I001,I005,W504
[isort]
skip = .eggs,.tox,docs,env,venv,node_modules,.git
skip_glob = **/migrations/*
atomic = true
multi_line_output = 5
line_length = 120
known_first_party = drf_yasg,testproj,articles,people,snippets,todo,users,urlconfs