-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
36 lines (35 loc) · 1.69 KB
/
tox.ini
File metadata and controls
36 lines (35 loc) · 1.69 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
[tox]
# Python 3.7 is not downloadable via uv; minimum testable version is 3.8.
# Python 3.14 is included to catch forward-compat issues early.
envlist = py38, py39, py310, py311, py312, py313, py314
requires =
tox-uv>=1
[testenv]
# skip_install keeps each env lightweight: the package is found via PYTHONPATH
# rather than doing a full editable install in each env.
# Proto stubs (techmo/asr/api/*_pb2.py) are gitignored — they are generated
# by setup.py at build time. In CI the before_script runs ./install.sh first;
# locally, run `./install.sh` first (requires grpcio-tools and the asr-api
# submodule).
skip_install = true
set_env = PYTHONPATH = {toxinidir}
# Pass service-address variables so integration tests can connect to a live service
# when run via tox (e.g. tox -e py312 -- -m integration).
passenv =
ASR_*
deps =
# grpcio 1.71.0 dropped Python 3.8
grpcio>=1.49.4,<1.71.0; python_version=="3.8"
grpcio>=1.49.4; python_version>="3.9"
protobuf>=4.21.3,<6.0.0; python_version=="3.8"
protobuf>=4.21.3; python_version>="3.9"
pytest>=7.4.4,<8
pytest-cov>=4.1
pytest-lazy-fixture>=0.6.3
commands_pre =
# Abort early with a clear message if proto stubs are missing rather than
# letting pytest fail with a cryptic ImportError deep in imports.
# PYTHONPATH already contains {toxinidir} so we use it to locate the stub.
python -c "import os, sys; stub = os.path.join(os.environ['PYTHONPATH'], 'techmo', 'asr', 'api', 'dictation', 'asr_pb2.py'); sys.exit(0) if os.path.exists(stub) else sys.exit('Proto stubs missing. Run: ./install.sh')"
commands =
pytest --color=yes --cov=asr_api --cov-report=term-missing --cov-report=xml:{envtmpdir}/coverage.xml {posargs}