This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
154 lines (117 loc) · 4.8 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
# -*- encoding: utf-8 -*-
# ======================================================================
# Copyright and other protections apply. Please see the accompanying
# LICENSE and CREDITS files for rights and restrictions governing use of
# this software. All rights not expressly waived or licensed are
# reserved. If those files are missing or appear to be modified from
# their originals, then please contact the author before viewing or
# using this software in any capacity.
# ======================================================================
[tox] # ---------------------------------------------------------------
envlist = check, lint, mypy, py{27,py,34,35,36,py3}-django_{1_8,1_11}_lts, py{34,35,36,py3}-django_2, py{35,36,py3}-django_dev
skip_missing_interpreters = true
[travis] # ------------------------------------------------------------
python =
2.7: py27, check, lint
pypy: pypy, lint
3.4: py34, lint, mypy
3.5: py35, lint, mypy
3.6: py36, check, lint, mypy
pypy3: pypy3, lint, mypy
[travis:env] # --------------------------------------------------------
DJANGO =
1.8-lts: django_1_8_lts, check, lint, mypy
1.11-lts: django_1_11_lts, check, lint, mypy
2: django_2, check, lint, mypy
dev: django_dev, check, lint, mypy
[testreqs] # ----------------------------------------------------------
deps =
# This probably breaks on Windows. See
# <https://github.com/tox-dev/tox/issues/384>.
-rtests/requirements.txt
setenv =
DJANGO_SETTINGS_MODULE=tests.django_settings
[testenv] # -----------------------------------------------------------
commands =
coverage run --append -m py.test {posargs}
deps =
django_1_8_lts: Django >= 1.8.0, < 1.9.0
django_1_11_lts: Django >= 1.11.0, < 1.12.0
django_2: Django >= 2.0.0, < 3.0.0
django_dev: git+https://github.com/django/django.git@master
coverage
pytest
{[testreqs]deps}
passenv =
COVERAGE_PROCESS_START
LOG_FMT
LOG_LVL
setenv =
PYTHONWARNINGS = all
{[testreqs]setenv}
[testenv:check] # -----------------------------------------------------
basepython = {env:PYTHON:python}
commands =
django-admin makemigrations
python setup.py check -m -r -s -v
rm -frv docs/_build docs/_static docs/modules.rst docs/emojiwatch.rst docs/emojiwatch.*.rst
sphinx-apidoc --output-dir docs --separate emojiwatch emojiwatch/migrations/
{toxinidir}/helpers/checkmodified.sh
mkdir -p docs/_static
make -C docs html
deps =
docutils
sphinx
# This probably breaks on Windows. See
# <https://github.com/tox-dev/tox/issues/384>.
-rdocs/requirements.txt
setenv =
PYTHONWARNINGS =
{[testreqs]setenv}
usedevelop = true
whitelist_externals =
make
mkdir
rm
[testenv:lint] # ------------------------------------------------------
basepython = {env:PYTHON:python}
commands =
-coverage report
-coverage html
flake8 emojiwatch tests setup.py
pylint --rcfile=.pylintrc emojiwatch tests setup.py
deps =
coverage
flake8
pylint >= 1.7.0
{[testreqs]deps}
setenv =
PYTHONWARNINGS =
usedevelop = true
[testenv:mypy] # ------------------------------------------------------
basepython = {env:PYTHON:python}
commands =
sh -c "find emojiwatch tests setup.py -name '*.py' -not -path 'emojiwatch/migrations/*' -print0 -o -name '*.pyi' -not -path 'emojiwatch/migrations/*' -print0 | xargs -0 mypy --follow-imports=skip --ignore-missing-imports --no-implicit-optional --strict-optional --warn-redundant-casts --warn-unused-configs"
sh -c "find emojiwatch tests setup.py -name '*.py' -not -path 'emojiwatch/migrations/*' -print0 -o -name '*.pyi' -not -path 'emojiwatch/migrations/*' -print0 | xargs -0 mypy --follow-imports=skip --ignore-missing-imports --no-implicit-optional --strict-optional --warn-redundant-casts --warn-unused-configs --py2"
deps =
mypy
usedevelop = true
whitelist_externals =
sh
[flake8] # ------------------------------------------------------------
# See
# <https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes>
# and <https://flake8.readthedocs.io/en/latest/user/error-codes.html>
ignore = E124,E128,E301,E302,E305,E402,E501,E701,W503
# E124 - closing bracket does not match visual indentation
# E128 - continuation line under-indented for visual indent
# E301 - expected 1 blank line, found ...
# E302 - expected 2 blank lines, found ...
# E305 - expected 2 blank lines after end of function or class
# E402 - module level import not at top of file
# E501 - line too long (... > ... characters)
# E701 - multiple statements on one line (colon)
# W503 - line break occurred before a binary operator
[pytest] # ------------------------------------------------------------
addopts = --create-db --doctest-modules --reuse-db
doctest_optionflags = IGNORE_EXCEPTION_DETAIL NORMALIZE_WHITESPACE