-
Notifications
You must be signed in to change notification settings - Fork 20
/
tox.ini
134 lines (114 loc) · 2.72 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
[tox]
envlist = py39,py310,py311,py312,py313,mypy,linters,twine-check,docs
[testenv]
deps =
pytest
pytest-cov
pytest-twisted
commands =
py.test \
--cov-report=term-missing \
--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==20.0
zyte-api==0.5.1
# 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
[pinned-pre-scrapy-2x5]
deps =
{[pinned]deps}
parsel==1.7.0
# Earliest supported Scrapy version.
[testenv:pinned-scrapy-2x0]
basepython=python3.9
deps =
{[pinned-pre-scrapy-2x5]deps}
scrapy==2.0.1
# Scrapy version introducing Response.ip_address.
[testenv:pinned-scrapy-2x1]
basepython=python3.9
deps =
{[pinned-pre-scrapy-2x5]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.9
deps =
{[pinned-pre-scrapy-2x5]deps}
scrapy==2.3.0
# First Scrapy version requiring to install the reactor early.
[testenv:pinned-scrapy-2x4]
basepython=python3.9
deps =
{[pinned-pre-scrapy-2x5]deps}
scrapy==2.4.0
# Scrapy version introducing Response.protocol.
[testenv:pinned-scrapy-2x5]
basepython=python3.9
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.9
deps =
{[pinned]deps}
scrapy==2.6.0
[testenv:provider]
extras = provider
[testenv:pinned-provider]
basepython=python3.9
extras = provider
deps =
# scrapy-poet >= 0.4.0 depends on scrapy >= 2.6.0
{[testenv:pinned-scrapy-2x6]deps}
andi==0.6.0
scrapy-poet==0.22.3
web-poet==0.17.0
zyte-common-items==0.24.0
[testenv:pinned-extra]
basepython=python3.9
deps =
{[testenv:pinned-scrapy-2x0]deps}
scrapy-crawlera==1.1.0
scrapy-zyte-smartproxy==2.0.0
[testenv:extra]
basepython=python3.13
deps =
{[testenv]deps}
scrapy-crawlera
scrapy-zyte-smartproxy
[testenv:mypy]
extras = provider
deps =
mypy==1.11.2
pytest
commands = mypy scrapy_zyte_api tests
[testenv:linters]
deps = -rrequirements-dev.txt
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:twine-check]
deps =
twine==5.1.1
build==1.2.2
commands =
python -m build --sdist
twine check dist/*
[testenv:docs]
changedir = docs
deps =
-rdocs/requirements.txt
commands =
sphinx-build -W -b html . {envtmpdir}/html