-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathtox.ini
75 lines (66 loc) · 1.68 KB
/
tox.ini
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
# Adding a New Framework
# modify `envlist`, modify `labels`, add extras to install optional-dependencies,
# and add a new `TEST_FRAMEWORK` section to `setenv`.
# Developers
# run just 3.12 tests with `tox -m quick`
# Coverage
# codecov is configured to run on all frameworks and then be combined at the end.
[tox]
envlist = py{310,311,312}-{crewai,langgraph,openai_swarm,llamaindex}
labels =
quick = py312-{crewai,langgraph,openai_swarm,llamaindex},report
[gh-actions]
# converts python versions to tox envlist values for github actions
python =
3.10: py310
3.11: py311
3.12: py312
[testenv]
extras =
# framework specific dependencies
crewai: crewai # installs agentstack[crewai]
langgraph: langgraph
openai_swarm: openai_swarm
llamaindex: llamaindex
deps =
pytest
parameterized
coverage
mypy: mypy
commands =
coverage run --source=. --omit="**/tmp/**,./tmp/**/*" -m pytest -v {posargs}
mypy: mypy agentstack
setenv =
AGENTSTACK_IS_TEST_ENV = 1
AGENTSTACK_TELEMETRY_OPT_OUT = 1
AGENTSTACK_UPDATE_DISABLE = 1
# environment variables to determine active framework inside tests
crewai: TEST_FRAMEWORK = crewai
langgraph: TEST_FRAMEWORK = langgraph
openai_swarm: TEST_FRAMEWORK = openai_swarm
llamaindex: TEST_FRAMEWORK = llamaindex
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage combine
coverage report -m
coverage xml
[coverage:run]
branch = True
parallel = True
source = .
omit =
**/tmp/**
./tmp/**/*
tests/**
[coverage:report]
omit =
**/tmp/**
./tmp/**/*
tests/**
exclude_lines =
pragma: no cover
^\s*\.\.\.\s*$
pass
if TYPE_CHECKING: