-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathtox.ini
More file actions
154 lines (144 loc) · 3.38 KB
/
tox.ini
File metadata and controls
154 lines (144 loc) · 3.38 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[tox]
envlist = structure, execution
isolated_build = true
# Use tox-uv for fast environment creation
requires = tox-uv
[testenv]
# Common settings for all test environments
runner = uv-venv-lock-runner
deps =
pytest>=8.3.3
pyyaml>=6.0.3
nbconvert>=7.16.0
nbval>=0.11.0
passenv =
ANTHROPIC_API_KEY
HOME
USER
[testenv:structure]
# Fast structural tests - no notebook execution, no API calls
description = Run structural validation tests on notebooks (fast, no API calls)
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
-m "not slow" \
{posargs}
[testenv:structure-single]
# Test a single notebook's structure
description = Run structural tests on a single notebook
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
-m "not slow" \
--notebook {posargs}
[testenv:execution]
# Full execution tests - requires API key, slow
description = Execute notebooks in isolated environment (slow, requires API key)
passenv =
ANTHROPIC_API_KEY
HOME
USER
OPENAI_API_KEY
VOYAGE_API_KEY
PINECONE_API_KEY
MONGODB_URI
deps =
pytest>=8.3.3
pyyaml>=6.0.3
nbconvert>=7.16.0
nbval>=0.11.0
anthropic>=0.71.0
ipykernel>=7.1.0
notebook>=7.4.7
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
--execute-notebooks \
--notebook-timeout 300 \
{posargs}
[testenv:execution-single]
# Execute a single notebook
description = Execute a single notebook in isolated environment
passenv =
ANTHROPIC_API_KEY
HOME
USER
OPENAI_API_KEY
VOYAGE_API_KEY
PINECONE_API_KEY
MONGODB_URI
deps =
pytest>=8.3.3
pyyaml>=6.0.3
nbconvert>=7.16.0
nbval>=0.11.0
anthropic>=0.71.0
ipykernel>=7.1.0
notebook>=7.4.7
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=long \
--execute-notebooks \
--notebook-timeout 300 \
--notebook {posargs}
[testenv:registry]
# Test only notebooks listed in registry.yaml
description = Test notebooks listed in registry.yaml
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
-m "not slow" \
--registry-only \
{posargs}
[testenv:quick]
# Quick smoke test on a subset of notebooks
description = Quick smoke test on core capability notebooks
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
-m "not slow" \
--notebook-dir capabilities \
{posargs}
[testenv:third-party]
# Test third-party integration notebooks
description = Test third-party integration notebooks
passenv =
ANTHROPIC_API_KEY
HOME
USER
OPENAI_API_KEY
VOYAGE_API_KEY
PINECONE_API_KEY
MONGODB_URI
DEEPGRAM_API_KEY
ELEVENLABS_API_KEY
WOLFRAM_APP_ID
commands =
pytest tests/notebook_tests/test_notebooks.py \
-v \
--tb=short \
-m "not slow" \
--notebook-dir third_party \
{posargs}
[testenv:lint]
# Run linting checks
description = Run ruff linting and format checks
deps =
ruff>=0.14.2
commands =
ruff check .
ruff format --check .
[testenv:format]
# Format code
description = Format code with ruff
deps =
ruff>=0.14.2
commands =
ruff format .
ruff check --fix .