-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtox.ini
More file actions
82 lines (74 loc) · 1.97 KB
/
Copy pathtox.ini
File metadata and controls
82 lines (74 loc) · 1.97 KB
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
[tox]
envlist = min-{attrs,pydantic,scrapy,extra},py{310-314},attrs,pydantic1,pydantic,scrapy,extra,extra-pydantic1,benchmark,pre-commit,mypy,docs,twinecheck,pylint
minversion = 4.25.0
[testenv]
basepython =
min-attrs,min-pydantic,min-scrapy,min-extra: python3.10
deps =
pytest>=5.4
pytest-cov>=7.0.0
packaging
min-attrs,min-extra: attrs==20.1.0
min-pydantic,min-extra: pydantic==1.8
min-scrapy,min-extra: scrapy==2.2
pydantic1,extra-pydantic1: pydantic<2
extras =
min-attrs,attrs,min-extra,extra,extra-pydantic1: attrs
min-pydantic,pydantic1,pydantic,min-extra,extra,extra-pydantic1: pydantic
min-scrapy,scrapy,min-extra,extra,extra-pydantic1: scrapy
commands =
pytest -vv --cov=itemadapter --cov-report=term-missing --cov-report=html --cov-report=xml {posargs: itemadapter tests}
[testenv:docs]
deps =
{[testenv]deps}
zyte-common-items
extras =
attrs
pydantic
scrapy
commands =
pytest -vv --cov=itemadapter --cov-report=term-missing --cov-report=html --cov-report=xml --doctest-glob=README.md {posargs:README.md}
# CPU benchmarks, tracked on CodSpeed.
#
# Python 3.13 is the latest version where Pydantic 1 models can be benchmarked.
[testenv:benchmark]
basepython = python3.13
deps =
pytest>=5.4
pytest-codspeed
extras =
attrs
pydantic
scrapy
passenv =
*codspeed*
*ci*
commands =
pytest {posargs:tests/benchmarks} --codspeed --codspeed-mode=simulation
[testenv:mypy]
basepython = python3
deps =
mypy==2.3.1
attrs==26.1.0
pydantic==2.13.5
Scrapy==2.18.0
commands =
mypy {posargs:itemadapter}
[testenv:pylint]
deps =
pylint==4.0.8
pylint-per-file-ignores==3.2.1
commands =
pylint {posargs:itemadapter tests}
[testenv:twinecheck]
basepython = python3
deps =
twine==7.0.0
build==1.6.0
commands =
python -m build --sdist
twine check dist/*
[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true