forked from jazzband/django-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
181 lines (162 loc) · 4.46 KB
/
setup.cfg
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[metadata]
name = django-redis
version = attr: django_redis.__version__
url = https://github.com/jazzband/django-redis
author = Andrei Antoukh
author_email = [email protected]
description = Full featured redis cache backend for Django.
long_description = file: README.rst
long_description_content_type = text/x-rst
license = BSD-3-Clause
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 2.2
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Software Development :: Libraries
Topic :: Utilities
[options]
python_requires = >=3.6
packages =
django_redis
django_redis.client
django_redis.serializers
django_redis.compressors
install_requires =
Django>=2.2
redis>=3.0.0
[coverage:run]
omit =
# tests
tests/*,
[coverage:report]
precision = 1
skip_covered = true
[flake8]
ignore =
W503
W601
E203
max-line-length = 88
[isort]
profile = black
multi_line_output = 3
[tox:tox]
minversion = 3.15.0
envlist =
black
flake8
isort
mypy
# tests against released versions
py{36,37,38,39}-dj{22,31,32}-redislatest
# tests against unreleased versions
py39-dj32-redismaster
py39-djmain-redis{latest,master}
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, black, flake8, isort, mypy
3.9: py39
[gh-actions:env]
DJANGO =
2.2: dj22
3.1: dj31
3.2: dj32
main: djmain
REDIS =
latest: redislatest
master: redismaster
[testenv]
passenv = CI GITHUB*
commands =
{envpython} -m pytest --cov-report= --ds=settings.sqlite {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_json {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_lz4 {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_msgpack {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sentinel {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_sharding {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_usock {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zlib {posargs}
{envpython} -m pytest --cov-append --cov-report= --ds=settings.sqlite_zstd {posargs}
{envpython} -m coverage report
{envpython} -m coverage xml
deps =
dj22: Django>=2.2,<2.3
dj31: Django>=3.1,<3.2
dj32: Django>=3.2,<3.3
djmain: https://github.com/django/django/archive/main.tar.gz
msgpack>=0.6.0
pytest
pytest-cov
pytest-django
pytest-pythonpath
redismaster: https://github.com/andymccurdy/redis-py/archive/master.tar.gz
lz4>=0.15
pyzstd>=0.15
[testenv:{black,flake8,isort,mypy}]
basepython = python3
envdir={toxworkdir}/lint
commands =
black: black --target-version py36 {posargs:--check --diff} setup.py django_redis/ tests/
flake8: flake8 {posargs} setup.py django_redis/ tests/
isort: isort {posargs:--check-only --diff} django_redis/ tests/
mypy: mypy {posargs:--cobertura-xml-report .} django_redis
deps =
black
django-stubs
flake8
isort >= 5.0.2
lxml
mypy
types-redis
skip_install = true
[tool:pytest]
DJANGO_SETTINGS_MODULE = settings.sqlite
addopts =
--doctest-modules
--cov=django_redis
--cov-config=setup.cfg
--no-cov-on-fail
filterwarnings =
error::DeprecationWarning
error::FutureWarning
error::PendingDeprecationWarning
python_paths = tests
testpaths = tests
xfail_strict = true
[mypy]
plugins =
mypy_django_plugin.main
pretty = true
show_error_codes = true
show_error_context = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
[mypy.plugins.django-stubs]
# all test settings look similar enough for mypy
django_settings_module = tests.settings.sqlite
ignore_missing_settings = true
# third party mypy config
[mypy-lz4.frame]
ignore_missing_imports = true
[mypy-pyzstd]
ignore_missing_imports = true
[mypy-msgpack]
ignore_missing_imports = true
[mypy-redis.sentinel]
ignore_missing_imports = true