8000 claude-cookbooks/tox.ini at main · dominicva/claude-cookbooks · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
154 lines (144 loc) · 3.38 KB

tox.ini

File metadata and controls

154 lines (144 loc) · 3.38 KB
[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 .
0