-
Notifications
You must be signed in to change notification settings - Fork 528
Expand file tree
/
Copy pathtox.ini
More file actions
125 lines (114 loc) · 3.17 KB
/
Copy pathtox.ini
File metadata and controls
125 lines (114 loc) · 3.17 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
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
[tox]
min_version = 4.25.0
envlist = pre-commit,mypy,min,min-all,py3{10-14},all,scripts,docs,twinecheck,benchmark
[base]
deps =
pytest
pytest-cov
[testenv]
deps =
{[base]deps}
parameterized
atheris; python_version < '3.12'
commands =
pytest --cov=dateparser --cov-report=xml {posargs: tests}
passenv = TZ
[testenv:all]
basepython = python3.14
extras =
calendars
langdetect
[testenv:min]
basepython = python3.10
deps =
{[testenv]deps}
python-dateutil==2.7.0
pytz==2024.2
regex==2024.9.11
tzlocal==0.2
# tzlocal 0.2 contains invalid string escapes, which pytest.ini turns into an
# error. Installers that byte-compile, pip included, absorb that warning before
# pytest starts, but the ones that do not turn it into an import-time
# SyntaxError, so ignore that one message for the environments pinned to it. No
# category: it is a DeprecationWarning up to Python 3.11 and a SyntaxWarning
# from 3.12 on.
set_env =
PYTEST_ADDOPTS = -W "ignore:invalid escape sequence"
[testenv:min-all]
basepython = {[testenv:min]basepython}
extras = {[testenv:all]extras}
deps =
{[testenv:min]deps}
convertdate==2.2.1
hijridate==2.3.0
langdetect==1.0.0
set_env = {[testenv:min]set_env}
[testenv:scripts]
deps =
{[base]deps}
-rdateparser_scripts/requirements.txt
commands =
pytest --cov=dateparser --cov-report=xml {posargs:tests/test_dateparser_data_integrity.py}
[testenv:mypy]
basepython = python3.10
deps =
mypy==2.3.1
convertdate==2.5.1
gitpython==3.1.62
hijridate==2.6.0
langdetect==1.0.9
parameterized==0.9.0
parsel==1.12.0
pytest==9.1.1
pytest-codspeed==5.0.3
ruamel.yaml==0.19.1
types-python-dateutil==2.9.0.20260807
types-pytz==2026.4.0.20260926
types-regex==2026.9.10.20260911
types-requests==2.33.0.20260906
tzlocal==5.4.4
commands =
mypy {posargs:dateparser dateparser_cli dateparser_scripts fuzzing tests}
[testenv:pre-commit]
basepython = python3
deps =
pre-commit
commands =
pre-commit run {posargs:--all-files}
[testenv:docs]
changedir = docs
extras = []
deps =
{[testenv]deps}
-rdocs/requirements.txt
commands =
sphinx-build -W -b html . {envtmpdir}/html
[testenv:twinecheck]
basepython = python3
deps =
build
twine
commands =
python -m build --sdist --wheel
twine check dist/*
# Pinned to a single interpreter: CodSpeed compares measurements across runs, and
# instruction counts are not comparable between Python versions.
[testenv:benchmark]
basepython = python3.13
deps =
{[base]deps}
pytest-codspeed
# The CodSpeed runner drives pytest-codspeed through CODSPEED_* variables, which
# have to reach the command tox runs for any measurement to happen.
passenv =
*codspeed*
*ci*
# tox picks a random hash seed per run, which would show up as noise in the
# instruction counts CodSpeed compares.
set_env =
PYTHONHASHSEED = 0
# pytest-codspeed reports a measurement hook that failed to start or stop as a
# RuntimeWarning; pytest.ini would turn that runner glitch into a red CodSpeed
# check that says nothing about dateparser.
commands =
pytest -W "ignore::RuntimeWarning:pytest_codspeed" tests/benchmarks/ --no-cov --codspeed