forked from NVIDIA/NeMo-Agent-Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
329 lines (295 loc) · 11 KB
/
Copy pathpyproject.toml
File metadata and controls
329 lines (295 loc) · 11 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 64", "setuptools-scm>=8"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["aiq", "nat.*"]
[tool.setuptools_scm]
git_describe_command = "git describe --long --first-parent"
[project]
name = "nvidia-nat"
dynamic = ["version"]
dependencies = [
# Keep package version constraints as open as possible to avoid conflicts with other packages. Always define a minimum
# version when adding a new package. If unsure, default to using `~=` instead of `==`. When using `~=`, use 2 digits
# of precision in the version specifier. For example, use `~=1.2` instead of `~=1.2.3` and `~=0.1.3` instead of
# `~=0.1.3.5`.
# Keep sorted!!!
"aioboto3>=11.0.0",
"authlib~=1.3.1",
"click~=8.1",
"colorama~=0.4.6",
"datasets~=4.0", # workaround for uv's solver choosing different versions of datasets based on sys_platform
"expandvars~=1.0",
"fastapi~=0.115.5",
"httpx~=0.27",
"jinja2~=3.1",
"jsonpath-ng~=1.7",
"mcp~=1.13",
"networkx~=3.4",
# langchain-aws pins numpy to 1.* for Python <3.12 -- remove once package is updated
"numpy~=1.26; python_version < '3.12'",
"numpy~=2.3; python_version >= '3.12'",
"openinference-semantic-conventions~=0.1.14",
"openpyxl~=3.1",
"pkce==1.0.3",
"pkginfo~=1.12",
"platformdirs~=4.3",
"pydantic~=2.11",
"pymilvus~=2.4",
"PyYAML~=6.0",
"ragas~=0.2.14", # If you update ragas be sure to update github links in docs/source/workflows/evaluate.md as well
"rich~=13.9",
"tabulate~=0.9",
"uvicorn[standard]~=0.32.0",
"wikipedia~=1.4",
]
requires-python = ">=3.11,<3.14"
description = "NVIDIA NeMo Agent toolkit"
readme = "src/nat/meta/pypi.md"
license = { file = "LICENSE.md" }
keywords = ["ai", "rag", "agents"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
authors = [{ name = "NVIDIA Corporation" }]
maintainers = [{ name = "NVIDIA Corporation" }]
[project.optional-dependencies]
# Optional dependencies are things that users would want to install with NAT. i.e. `uv pip install nvidia-nat[langchain]`
# Keep sorted!!!
all = ["nvidia-nat-all"] # meta-package
agno = ["nvidia-nat-agno"]
crewai = ["nvidia-nat-crewai"]
data-flywheel = ["nvidia-nat-data-flywheel"]
ingestion = ["nvidia-nat-ingestion"] # meta-package
langchain = ["nvidia-nat-langchain"]
llama-index = ["nvidia-nat-llama-index"]
mem0ai = ["nvidia-nat-mem0ai"]
opentelemetry = ["nvidia-nat-opentelemetry"]
phoenix = ["nvidia-nat-phoenix"]
profiling = ["nvidia-nat-profiling"] # meta-package
ragaai = ["nvidia-nat-ragaai"]
mysql = ["nvidia-nat-mysql"]
redis = ["nvidia-nat-redis"]
s3 = ["nvidia-nat-s3"]
semantic-kernel = ["nvidia-nat-semantic-kernel"]
telemetry = [
"nvidia-nat-opentelemetry",
"nvidia-nat-phoenix",
"nvidia-nat-weave",
"nvidia-nat-ragaai",
]
weave = ["nvidia-nat-weave"]
zep-cloud = ["nvidia-nat-zep-cloud"]
examples = [
"nat_agno_personal_finance",
"nat_alert_triage_agent",
"nat_automated_description_generation",
"nat_email_phishing_analyzer",
"nat_multi_frameworks",
"nat_first_search_agent",
"nat_plot_charts",
"nat_por_to_jiratickets",
"nat_profiler_agent",
"nat_redact_pii",
"nat_retail_sales_agent",
"nat_semantic_kernel_demo",
"nat_simple_auth",
"nat_simple_web_query",
"nat_simple_web_query_eval",
"nat_simple_calculator",
"nat_simple_calculator_custom_routes",
"nat_simple_calculator_eval",
"nat_simple_calculator_mcp",
"nat_simple_calculator_observability",
"nat_simple_calculator_hitl",
"nat_simple_rag",
"nat_swe_bench",
"nat_user_report",
]
# Optional dependency needed when use_gunicorn is set to true
gunicorn = [
"gunicorn~=23.0",
]
[tool.uv]
config-settings = { editable_mode = "compat" }
[tool.uv.sources]
# Workspace members
nvidia-nat-all = { workspace = true }
nvidia-nat-agno = { workspace = true }
nvidia-nat-crewai = { workspace = true }
nvidia-nat-data-flywheel = { workspace = true }
nvidia-nat-ingestion = { workspace = true }
nvidia-nat-langchain = { workspace = true }
nvidia-nat-llama-index = { workspace = true }
nvidia-nat-mem0ai = { workspace = true }
nvidia-nat-mysql = { workspace = true }
nvidia-nat-opentelemetry = { workspace = true }
nvidia-nat-phoenix = { workspace = true }
nvidia-nat-profiling = { workspace = true }
nvidia-nat-ragaai = { workspace = true }
nvidia-nat-redis = { workspace = true }
nvidia-nat-s3 = { workspace = true }
nvidia-nat-semantic-kernel = { workspace = true }
nvidia-nat-test = { workspace = true }
nvidia-nat-weave = { workspace = true }
nvidia-nat-zep-cloud = { workspace = true }
# All examples here
nat_agno_personal_finance = { path = "examples/frameworks/agno_personal_finance", editable = true }
nat_alert_triage_agent = { path = "examples/advanced_agents/alert_triage_agent", editable = true }
nat_automated_description_generation = { path = "examples/custom_functions/automated_description_generation", editable = true }
nat_email_phishing_analyzer = { path = "examples/evaluation_and_profiling/email_phishing_analyzer", editable = true }
nat_multi_frameworks = { path = "examples/frameworks/multi_frameworks", editable = true }
nat_first_search_agent = { path = "examples/notebooks/first_search_agent", editable = true }
nat_plot_charts = { path = "examples/custom_functions/plot_charts", editable = true }
nat_por_to_jiratickets = { path = "examples/HITL/por_to_jiratickets", editable = true }
nat_profiler_agent = { path = "examples/advanced_agents/profiler_agent", editable = true }
nat_redact_pii = { path = "examples/observability/redact_pii", editable = true }
nat_retail_sales_agent = { path = "examples/notebooks/retail_sales_agent", editable = true }
nat_semantic_kernel_demo = { path = "examples/frameworks/semantic_kernel_demo", editable = true }
nat_simple_auth = { path = "examples/front_ends/simple_auth", editable = true }
nat_simple_calculator = { path = "examples/getting_started/simple_calculator", editable = true }
nat_simple_calculator_custom_routes = { path = "examples/front_ends/simple_calculator_custom_routes", editable = true }
nat_simple_calculator_eval = { path = "examples/evaluation_and_profiling/simple_calculator_eval", editable = true }
nat_simple_calculator_hitl = { path = "examples/HITL/simple_calculator_hitl", editable = true }
nat_simple_calculator_mcp = { path = "examples/MCP/simple_calculator_mcp", editable = true }
nat_simple_calculator_observability = { path = "examples/observability/simple_calculator_observability", editable = true }
nat_simple_rag = { path = "examples/RAG/simple_rag", editable = true }
nat_simple_web_query = { path = "examples/getting_started/simple_web_query", editable = true }
nat_simple_web_query_eval = { path = "examples/evaluation_and_profiling/simple_web_query_eval", editable = true }
nat_swe_bench = { path = "examples/evaluation_and_profiling/swe_bench", editable = true }
nat_user_report = { path = "examples/object_store/user_report", editable = true }
[tool.uv.workspace]
members = ["packages/*"]
exclude = ["packages/compat"]
[dependency-groups]
# Dependency groups are only for developers to aid in managing dependencies local to a dev machine.
dev = [
"asgi-lifespan~=2.1",
"httpx-sse~=0.4",
"ipython~=8.31",
"myst-parser~=4.0",
"nbsphinx~=0.9",
"nvidia-nat_test",
"nvidia-sphinx-theme>=0.0.7",
"pip>=24.3.1",
"pre-commit>=4.0,<5.0",
"pytest_httpserver==1.1.*",
"pytest-asyncio==0.24.*",
"pytest-cov~=6.1",
"pytest-pretty~=1.2.0",
"pytest~=8.3",
"python-docx~=1.1.0",
"ruff~=0.12",
"setuptools >= 64",
"setuptools_scm>=8",
"sphinx~=8.2",
"sphinx-autoapi>=3.6",
"sphinx-copybutton>=0.5",
"sphinx-mermaid",
"tomlkit~=0.13.2",
"twine~=6.0",
"vale~=3.12",
"yapf==0.43.*",
]
[project.entry-points.'nat.components']
nat_agents = "nat.agent.register"
nat_authentication = "nat.authentication.register"
nat_embedders = "nat.embedder.register"
nat_evaluators = "nat.eval.register"
nat_test_time_compute = "nat.experimental.test_time_compute.register"
nat_llms = "nat.llm.register"
nat_object_stores = "nat.object_store.register"
nat_observability = "nat.observability.register"
nat_retrievers = "nat.retriever.register"
nat_tools = "nat.tool.register"
[project.entry-points.'nat.front_ends']
nat_front_ends = "nat.front_ends.register"
[project.entry-points.'nat.registry_handlers']
nat_registry_handlers = "nat.registry_handlers.register"
[project.scripts]
aiq = "nat.cli.main:run_cli_aiq_compat"
nat = "nat.cli.main:run_cli"
[tool.setuptools]
include-package-data = true
# List any markers that users would reasonably want to filter by.
# These show up when querying `pytest --markers`
[tool.pytest.ini_options]
markers = [
"benchmark: Benchmarks",
"e2e: End-to-end tests",
"integration: Integration tests which do not use mocks and may require external services",
"requires_cache: Tests that require a reverse-proxy cache to be running",
"slow: Slow tests",
]
filterwarnings = [
# Ignore warnings from qdrant-client (used by mem0) with Python 3.12+ of note is that this only happens the first
# time the module is imported and parsed, after that the pyc files in the __pycache__ directory are used which don't
# trigger the warnings. In Python 3.12 this triggers a SyntaxWarning, in Python 3.11 it triggers a DeprecationWarning
# which unfortunately pytest is unable to filter.
# Remove once https://github.com/qdrant/qdrant-client/issues/983 is resolved.
"ignore:^invalid escape sequence:SyntaxWarning",
]
testpaths = ["tests", "examples/*/tests", "packages/*/tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
[tool.ruff]
# Set the maximum line length to 120.
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = [
# The E, F, W categories are flake8 rules.
"E",
"F",
"W",
# Enable isort support
"I",
# Enable partial pylint support
"PL",
]
extend-ignore = [
"PLC0415", # Allow lazy imports inside functions
# Disable all the "too-*" checks, as they are too strict for our codebase
"PLR0904", # too-many-public-methods
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR0917", # too-many-positional-arguments
"PLR1702", # too-many-nested-blocks
"PLR2004", # Magic value used in comparison this happens a lot within unittests
"PLW0108", # unnecessary-lambda
"PLW2901", # allow re-assigning a loop variable
]
[tool.ruff.lint.isort]
combine-as-imports = true
default-section = "third-party"
force-single-line = true
known-first-party = ["aiq", "nat", "nat_*", "_utils"]
known-third-party = [
"agno",
"crewai",
"langchain",
"llama_index",
"mem0ai",
"redis",
"semantic_kernel",
"zep_cloud",
]
order-by-type = true
# ===== yapf Config =====
[tool.yapf]
based_on_style = "pep8"
column_limit = 120
split_all_top_level_comma_separated_values = true
join_multiple_lines = true
indent_dictionary_value = true
# ===== pyright Config =====
[tool.pyright]
deprecateTypingAliases = true
reportInvalidTypeForm = "warning"