[tox] envlist = pre-commit,min,min-all,py310,py311,py312,py313,py314,all,scripts,docs,twinedeck,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 [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 [testenv:scripts] deps = {[base]deps} -rdateparser_scripts/requirements.txt commands = pytest --cov=dateparser --cov-report=xml {posargs:tests/test_dateparser_data_integrity.py} [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 commands = pytest tests/benchmarks/ --no-cov --codspeed