drf-yasg/tox.ini

78 lines
2.2 KiB
INI

[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{27,34,35,36}-django111-drf{37,38,39},
py{34,35,36,37}-django20-drf{37,38,39},
py{35,36,37}-django21-drf{37,38,39},
djmaster, lint, docs
[testenv:.package]
# no additional dependencies besides PEP 517
deps =
[testenv]
deps =
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
drf37: djangorestframework>=3.7.7,<3.8
drf38: djangorestframework>=3.8.0,<3.9
drf39: djangorestframework>=3.9,<3.10
# test with the latest build of django-rest-framework to get early warning of compatibility issues
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
djmaster: https://github.com/django/django/archive/master.tar.gz
# other dependencies
-r requirements/validation.txt
-r requirements/test.txt
commands =
pytest -n 2 --cov --cov-config .coveragerc --cov-append --cov-report="" {posargs}
[testenv:lint]
skip_install = true
deps =
-r requirements/lint.txt
commands =
flake8 src/drf_yasg testproj tests setup.py
[testenv:docs]
deps =
-r requirements/docs.txt
commands =
twine check .tox/dist/*
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 = F405,W504
[isort]
skip = .eggs,.tox,docs,env,venv,node_modules
skip_glob = **/migrations/*
not_skip = __init__.py
atomic = true
multi_line_output = 5
line_length = 120
known_future_library = six
known_standard_library =
collections,copy,distutils,functools,inspect,io,json,logging,operator,os,pkg_resources,re,setuptools,sys,
types,warnings
known_third_party =
coreapi,coreschema,datadiff,dj_database_url,django,django_filters,djangorestframework_camel_case,
rest_framework_recursive,flex,gunicorn,inflection,pygments,pytest,rest_framework,ruamel,setuptools_scm,
swagger_spec_validator,uritemplate,user_agents,whitenoise,oauth2_provider
known_first_party = drf_yasg,testproj,articles,people,snippets,todo,users,urlconfs