-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
128 lines (110 loc) · 2.4 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
[tox]
envlist = py37,py38,py39,py310,mypy,isort,black,flake8
[testenv]
deps =
pytest
pytest-cov
pytest-twisted
commands =
py.test \
--cov-report=html:coverage-html \
--cov-report=xml \
--cov=scrapy_zyte_api \
--junitxml=test-results/junit.xml \
--reactor=asyncio \
{posargs:scrapy_zyte_api tests}
[pinned]
deps =
{[testenv]deps}
packaging==14.0
zyte-api==0.4.0
# https://stackoverflow.com/a/73046084
Twisted==21.7.0
# https://github.com/scrapy/scrapy/issues/5635
pyopenssl==22.0.0
# https://github.com/aws/aws-sam-cli/issues/4527#issuecomment-1368871248
cryptography<39
# Earliest supported Scrapy version.
[testenv:pinned-scrapy-2x0]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.0.1
# Scrapy version introducing Response.ip_address.
[testenv:pinned-scrapy-2x1]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.1.0
# Latest Scrapy version since 2.0.1 not requiring to install the reactor early.
[testenv:pinned-scrapy-2x3]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.3.0
# First Scrapy version requiring to install the reactor early.
[testenv:pinned-scrapy-2x4]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.4.0
# Scrapy version introducing Response.protocol.
[testenv:pinned-scrapy-2x5]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.5.0
# First Scrapy version since 2.4.0 where installing the reactor earlier is not
# necessary.
[testenv:pinned-scrapy-2x6]
basepython=python3.7
deps =
{[pinned]deps}
scrapy==2.6.0
[testenv:mypy]
deps =
mypy==0.991
types-setuptools
commands = mypy --check-untyped-defs --ignore-missing-imports --no-warn-no-return scrapy_zyte_api tests
[testenv:flake8]
deps =
flake8
flake8-docstrings
flake8-print>=3.0.1
commands =
flake8 \
scrapy_zyte_api \
setup.py \
tests \
{posargs}
[testenv:black]
deps =
black
commands =
black \
scrapy_zyte_api \
setup.py \
tests/ \
{posargs}
[testenv:black-check]
deps =
{[testenv:black]deps}
commands =
{[testenv:black]commands} --diff
[testenv:isort]
deps = isort
commands =
isort \
scrapy_zyte_api/ \
setup.py \
tests/ \
{posargs}
[testenv:isort-check]
deps = {[testenv:isort]deps}
commands = {[testenv:isort]commands} -c
[testenv:twine-check]
deps =
twine
commands =
python setup.py sdist
twine check dist/*