Debian Codegraph @

tox.ini

raw
1 [tox]
2 envlist = pre-commit,min,min-all,py310,py311,py312,py313,py314,all,scripts,docs,twinedeck,benchmark
3
4 [base]
5 deps =
6 pytest
7 pytest-cov
8
9 [testenv]
10 deps =
11 {[base]deps}
12 parameterized
13 atheris; python_version < '3.12'
14 commands =
15 pytest --cov=dateparser --cov-report=xml {posargs: tests}
16 passenv = TZ
17
18 [testenv:all]
19 basepython = python3.14
20 extras =
21 calendars
22 langdetect
23
24 [testenv:min]
25 basepython = python3.10
26 deps =
27 {[testenv]deps}
28 python-dateutil==2.7.0
29 pytz==2024.2
30 regex==2024.9.11
31 tzlocal==0.2
32
33 [testenv:min-all]
34 basepython = {[testenv:min]basepython}
35 extras = {[testenv:all]extras}
36 deps =
37 {[testenv:min]deps}
38 convertdate==2.2.1
39 hijridate==2.3.0
40 langdetect==1.0.0
41
42 [testenv:scripts]
43 deps =
44 {[base]deps}
45 -rdateparser_scripts/requirements.txt
46 commands =
47 pytest --cov=dateparser --cov-report=xml {posargs:tests/test_dateparser_data_integrity.py}
48
49 [testenv:pre-commit]
50 basepython = python3
51 deps =
52 pre-commit
53 commands =
54 pre-commit run {posargs:--all-files}
55
56 [testenv:docs]
57 changedir = docs
58 extras = []
59 deps =
60 {[testenv]deps}
61 -rdocs/requirements.txt
62 commands =
63 sphinx-build -W -b html . {envtmpdir}/html
64
65 [testenv:twinecheck]
66 basepython = python3
67 deps =
68 build
69 twine
70 commands =
71 python -m build --sdist --wheel
72 twine check dist/*
73
74 # Pinned to a single interpreter: CodSpeed compares measurements across runs, and
75 # instruction counts are not comparable between Python versions.
76 [testenv:benchmark]
77 basepython = python3.13
78 deps =
79 {[base]deps}
80 pytest-codspeed
81 # The CodSpeed runner drives pytest-codspeed through CODSPEED_* variables, which
82 # have to reach the command tox runs for any measurement to happen.
83 passenv =
84 *codspeed*
85 *ci*
86 # tox picks a random hash seed per run, which would show up as noise in the
87 # instruction counts CodSpeed compares.
88 set_env =
89 PYTHONHASHSEED = 0
90 commands =
91 pytest tests/benchmarks/ --no-cov --codspeed