Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (218 loc) · 6.74 KB
/
Copy pathpyproject.toml
File metadata and controls
249 lines (218 loc) · 6.74 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
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["maturin>=1.12.6,<2.0"]
build-backend = "maturin"
[project]
name = "nemo-relay"
dynamic = ["version"]
description = "Python bindings for the NeMo Relay agent runtime."
readme = "python/nemo_relay/README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
authors = [
{ name = "NVIDIA Corporation & Affiliates" },
]
keywords = [
"agents",
"ai",
"llm",
"middleware",
"nemo-relay",
"observability",
"runtime",
"tools",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
]
[project.urls]
Documentation = "https://nvidia-nemo-relay.docs.buildwithfern.com/nemo-relay"
Homepage = "https://github.com/NVIDIA/NeMo-Relay"
Issues = "https://github.com/NVIDIA/NeMo-Relay/issues"
Repository = "https://github.com/NVIDIA/NeMo-Relay"
[dependency-groups]
dev = [
# Transitive dependency of optional integrations; keep it at a patched release.
"anyio>=4.14.2",
"beautifulsoup4>=4.14,<5",
# Transitive dependency of optional integrations; keep it at a patched release.
"certifi>=2026.10.19",
"ipython~=8.20",
"jsonschema>=4.26,<5",
"maturin[zig]>=1.0,<2.0; sys_platform == 'linux'",
"maturin>=1.0,<2.0; sys_platform != 'linux'",
"pip-licenses>=5,<6",
"pre-commit~=4.0",
"pylic>=5.0.1",
"ruff~=0.11",
# Transitive dependency of beautifulsoup4; keep it at a patched release.
"soupsieve>=2.9.0",
"ty>=0.0.91",
# Transitive dependency of optional integrations; keep it at a patched release.
"urllib3>=2.8.0",
"uv>=0.13.4",
# Transitive dependency of pre-commit; keep it at a patched release.
"virtualenv>=21.14.7",
]
test = [
# De Morgan form: exclude only when the platform is both Windows and ARM64.
"grpcio>=1.81.1,<2; sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64')",
"nemo-relay-plugin; sys_platform != 'win32' or (platform_machine != 'ARM64' and platform_machine != 'arm64' and platform_machine != 'aarch64')",
"opentelemetry-proto>=1.39,<2",
"pydantic>=2",
"pytest>=8",
"pytest-asyncio>=0.26",
"pytest-cov~=7.0",
]
# Provider dependencies for Google ADK integration tests.
google-adk-test = [
"anthropic>=0.78",
"google-adk[openai]>=2.12.0,<3.0.0",
"litellm>=1.106.2",
]
[project.optional-dependencies]
cli = [
"nemo-relay-cli-bin==1.0.0",
]
langchain = [
"langchain>=1.3.15,<2.0.0",
"langchain-anthropic>=1.4.8,<2.0.0",
"langchain-core",
"langgraph>=1.2.14,<2.0.0",
"langgraph-checkpoint>=4.1.1",
"langgraph-sdk>=0.4.6",
"langsmith>=0.9.4",
"pydantic>=2.11,<3",
]
langgraph = [
"nemo-relay[langchain]",
"langgraph>=1.2.14,<2.0.0",
]
deepagents = [
"nemo-relay[langgraph]",
"cryptography>=50.0.0",
"deepagents>=0.7.4,<0.8.0",
"pyasn1>=0.6.5",
]
langchain-nvidia = [
"nemo-relay[langchain]",
"langchain-nvidia-ai-endpoints>=1.4.2,<2.0.0",
"aiohttp>=3.14.4",
"idna>=3.19",
"multidict>=6.9.1",
]
google-adk = [
"google-adk>=2.12.0,<3.0.0",
"typing-extensions>=4.10.0",
]
[tool.maturin]
manifest-path = "crates/python/Cargo.toml"
python-source = "python"
module-name = "nemo_relay._native"
features = ["pyo3/extension-module"]
include = [{ path = "LICENSE", format = ["sdist", "wheel"] }]
[tool.maturin.sbom]
rust = true
auditwheel = true
[tool.uv]
managed = true
default-groups = ["dev", "test"]
package = true
override-dependencies = [
"opentelemetry-api>=1.45.1",
"opentelemetry-sdk>=1.45.1",
# LiteLLM caps filelock below 4; GHSA-v4x8-3wr5-3wq8 requires >=4.2.1.
# Remove this override when LiteLLM permits the patched release.
"filelock>=4.2.1,<5",
]
[tool.uv.sources]
nemo-relay-cli-bin = { path = "python/cli-bin" }
nemo-relay-plugin = { workspace = true }
[tool.uv.workspace]
members = [
"python/plugin",
"examples/language-binding-plugin/python",
"examples/python-grpc-worker-plugin",
]
[tool.pytest.ini_options]
testpaths = ["python/tests"]
asyncio_mode = "auto"
pythonpath = ["python"]
[tool.coverage.run]
# Exclude integration tests from coverage, since we don't run these by default
omit = [
"python/nemo_relay/integrations/*",
"python/plugin/src/nemo_relay_plugin/_proto/*",
]
[tool.ty.analysis]
# nemo_relay._native is a compiled Rust extension (built by maturin) that only
# exists after `uv sync` / `pip install -e .`. Suppress unresolved-import for it.
# LangChain, LangGraph, Deep Agents, and Google ADK are optional integration
# dependencies which aren't installed by default.
allowed-unresolved-imports = ["anthropic.**", "deepagents.**", "google.**", "grpc", "httpx", "langchain.**", "langchain_*.**", "langgraph.**", "litellm.**", "nemo_relay._native", "openai.**", "pytest"]
[[tool.ty.overrides]]
include = ["python/tests/**"]
[tool.ty.overrides.rules]
# Managed execution may return any valid JSON subtype after intercepts run.
# Tests that exercise a known object result assert its runtime shape directly.
invalid-argument-type = "ignore"
not-subscriptable = "ignore"
unsupported-operator = "ignore"
[[tool.ty.overrides]]
include = [
"python/tests/integrations/google_adk_tests/test_scopes.py",
"python/tests/integrations/langchain_tests/test_tool_codec.py",
]
[tool.ty.overrides.rules]
# These tests intentionally suppress diagnostics from optional framework types.
# The suppressions are unused when those frameworks are not installed.
unused-ignore-comment = "ignore"
[[tool.ty.overrides]]
include = ["skills/**"]
[tool.ty.overrides.rules]
deprecated = "ignore"
[tool.ruff]
line-length = 120
target-version = "py311"
extend-exclude = ["python/plugin/src/nemo_relay_plugin/_proto"]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
[tool.ruff.lint.isort]
known-first-party = ["nemo_relay", "nemo_relay_plugin"]
[tool.pylic]
safe_licenses = [
# Apache
"Apache-2.0",
"Apache-2.0 AND MIT",
"Apache 2.0",
"Apache License 2.0",
"Apache Software License",
# BSD
"BSD License",
"BSD-3-Clause",
"3-Clause BSD License",
"BSD-2-Clause",
# ISC
"ISC License (ISCL)",
# MIT
"MIT License",
"MIT",
# PSFL
"Python Software Foundation License",
"PSF-2.0",
]
unsafe_packages = [
"certifi", # Mozilla Public License 2.0 (MPL 2.0)
"matplotlib-inline", # unknown derived
"tiktoken", # MIT license text in package metadata
"tqdm", # MPL-2.0 AND MIT
]