74 lines
1.8 KiB
INI
74 lines
1.8 KiB
INI
[tox]
|
|
envlist =
|
|
py27-django111-drf37,
|
|
py{34,35,36}-django20-drf37,
|
|
py36-drfmaster,
|
|
lint, docs
|
|
|
|
[travis:env]
|
|
DRF =
|
|
3.7: drf37
|
|
master: drfmaster
|
|
DJANGO =
|
|
1.11: django111
|
|
2.0: django20
|
|
|
|
[testenv]
|
|
deps =
|
|
django111: Django>=1.11,<2.0
|
|
django20: Django>=2.0,<2.1
|
|
|
|
drf37: djangorestframework>=3.7.3,<3.8
|
|
|
|
# test with the latest build of Django and django-rest-framework to get early warning of compatibility issues
|
|
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
|
drfmaster: https://github.com/django/django/archive/master.tar.gz
|
|
|
|
# other dependencies
|
|
-rrequirements/validation.txt
|
|
-rrequirements/test.txt
|
|
|
|
commands =
|
|
pytest --cov-config .coveragerc --cov-append --cov {posargs}
|
|
|
|
[testenv:py36-drfmaster]
|
|
pip_pre = True
|
|
|
|
[testenv:lint]
|
|
skip_install = true
|
|
deps =
|
|
-rrequirements/lint.txt
|
|
commands =
|
|
flake8 src/drf_yasg testproj tests setup.py
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-rrequirements/docs.txt
|
|
commands =
|
|
python setup.py check --restructuredtext --metadata --strict
|
|
sphinx-build -WnEa -b html docs docs\_build\html
|
|
|
|
[pytest]
|
|
DJANGO_SETTINGS_MODULE = testproj.settings
|
|
python_paths = testproj
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
exclude = **/migrations/*
|
|
|
|
[isort]
|
|
skip = .eggs,.tox,docs,env,venv
|
|
skip_glob = **/migrations/*
|
|
not_skip = __init__.py
|
|
atomic = true
|
|
multi_line_output = 5
|
|
line_length = 120
|
|
known_future_library = future,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,django,django_filters,djangorestframework_camel_case,flex,inflection,pygments,
|
|
pytest,rest_framework,ruamel,setuptools_scm,swagger_spec_validator,uritemplate
|
|
known_first_party = drf_yasg,testproj,articles,snippets,users,urlconfs
|