-
Notifications
You must be signed in to change notification settings - Fork 623
Expand file tree
/
Copy pathtox.ini
More file actions
62 lines (57 loc) · 2.03 KB
/
tox.ini
File metadata and controls
62 lines (57 loc) · 2.03 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
[tox]
env_list = py{312}, runner, sdk1, prompt-service
requires =
tox-uv>=0.2.0
isolated_build = True
[testenv]
install_command = uv pip install {opts} {packages}
deps = uv
skip_install = true
[testenv:runner]
changedir = runner
setenv =
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
deps = uv
allowlist_externals=
sh
uv
pytest
commands_pre =
# Try to install dependencies from various requirements files
sh -c '[ -f cloud_requirements.txt ] && uv pip install -r cloud_requirements.txt || echo "cloud_requirements.txt not found"'
# Install dependencies from pyproject.toml
uv pip install -e .
# Install the Flask dependency explicitly (in case the above doesn't work)
uv pip install flask~=3.1.0 docker==6.1.3 redis~=5.2.1 python-dotenv>=1.0.0 kubernetes
# Install test dependencies
uv pip install pytest pytest-cov pytest-md-report pytest-mock
commands =
pytest -v --md-report-verbose=1 --md-report --md-report-flavor gfm --md-report-output ../runner-report.md
[testenv:sdk1]
changedir = unstract/sdk1
deps = uv
allowlist_externals=
sh
uv
pytest
commands_pre =
# System dependency required: libmagic1
# Install with: sudo apt-get install -y libmagic1 (Ubuntu/Debian)
# Install dependencies with test group
uv sync --group test
commands =
uv run pytest -v -m "not slow" --cov=src/unstract/sdk1 --cov-report=term --cov-report=html --md-report-verbose=1 --md-report --md-report-flavor gfm --md-report-output ../../sdk1-report.md
[testenv:prompt-service]
changedir = prompt-service
deps = uv
allowlist_externals=
sh
uv
pytest
commands_pre =
uv sync --group test
commands =
# --noconftest is required because the parent tests/conftest.py imports
# Flask blueprints which trigger the full adapter chain (pinecone etc.).
# Unit tests must not depend on integration fixtures.
uv run pytest src/unstract/prompt_service/tests/unit/ -v -m "not slow" --noconftest --md-report-verbose=1 --md-report --md-report-flavor gfm --md-report-output ../prompt-service-report.md