nvidia-nat-test 1.3.0a20251021__py3-none-any.whl → 1.3.0a20251022__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nvidia-nat-test might be problematic. Click here for more details.
- nat/test/plugin.py +86 -14
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/METADATA +2 -2
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/RECORD +8 -8
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/WHEEL +0 -0
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/top_level.txt +0 -0
nat/test/plugin.py
CHANGED
|
@@ -220,7 +220,19 @@ def azure_openai_keys_fixture(fail_missing: bool):
|
|
|
220
220
|
yield require_env_variables(
|
|
221
221
|
varnames=["AZURE_OPENAI_API_KEY", "AZURE_OPENAI_ENDPOINT"],
|
|
222
222
|
reason="Azure integration tests require the `AZURE_OPENAI_API_KEY` and `AZURE_OPENAI_ENDPOINT` environment "
|
|
223
|
-
"
|
|
223
|
+
"variables to be defined.",
|
|
224
|
+
fail_missing=fail_missing)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@pytest.fixture(name="langfuse_keys", scope='session')
|
|
228
|
+
def langfuse_keys_fixture(fail_missing: bool):
|
|
229
|
+
"""
|
|
230
|
+
Use for integration tests that require Langfuse credentials.
|
|
231
|
+
"""
|
|
232
|
+
yield require_env_variables(
|
|
233
|
+
varnames=["LANGFUSE_PUBLIC_KEY", "LANGFUSE_SECRET_KEY"],
|
|
234
|
+
reason="Langfuse integration tests require the `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` environment "
|
|
235
|
+
"variables to be defined.",
|
|
224
236
|
fail_missing=fail_missing)
|
|
225
237
|
|
|
226
238
|
|
|
@@ -298,8 +310,8 @@ def env_without_nat_log_level_fixture() -> dict[str, str]:
|
|
|
298
310
|
return env
|
|
299
311
|
|
|
300
312
|
|
|
301
|
-
@pytest.fixture(name="
|
|
302
|
-
def
|
|
313
|
+
@pytest.fixture(name="etcd_url", scope="session")
|
|
314
|
+
def etcd_url_fixture(fail_missing: bool = False) -> str:
|
|
303
315
|
"""
|
|
304
316
|
To run these tests, an etcd server must be running
|
|
305
317
|
"""
|
|
@@ -307,21 +319,22 @@ def require_etcd_fixture(fail_missing: bool = False) -> bool:
|
|
|
307
319
|
|
|
308
320
|
host = os.getenv("NAT_CI_ETCD_HOST", "localhost")
|
|
309
321
|
port = os.getenv("NAT_CI_ETCD_PORT", "2379")
|
|
310
|
-
|
|
322
|
+
url = f"http://{host}:{port}"
|
|
323
|
+
health_url = f"{url}/health"
|
|
311
324
|
|
|
312
325
|
try:
|
|
313
326
|
response = requests.get(health_url, timeout=5)
|
|
314
327
|
response.raise_for_status()
|
|
315
|
-
return
|
|
328
|
+
return url
|
|
316
329
|
except: # noqa: E722
|
|
317
|
-
failure_reason = f"Unable to connect to etcd server at {
|
|
330
|
+
failure_reason = f"Unable to connect to etcd server at {url}"
|
|
318
331
|
if fail_missing:
|
|
319
332
|
raise RuntimeError(failure_reason)
|
|
320
333
|
pytest.skip(reason=failure_reason)
|
|
321
334
|
|
|
322
335
|
|
|
323
336
|
@pytest.fixture(name="milvus_uri", scope="session")
|
|
324
|
-
def milvus_uri_fixture(
|
|
337
|
+
def milvus_uri_fixture(etcd_url: str, fail_missing: bool = False) -> str:
|
|
325
338
|
"""
|
|
326
339
|
To run these tests, a Milvus server must be running
|
|
327
340
|
"""
|
|
@@ -452,7 +465,7 @@ def fixture_redis_server(fail_missing: bool) -> Generator[dict[str, str | int]]:
|
|
|
452
465
|
pytest.skip(f"Error connecting to Redis server: {e}, skipping redis tests")
|
|
453
466
|
|
|
454
467
|
|
|
455
|
-
@pytest_asyncio.fixture(name="mysql_server", scope="
|
|
468
|
+
@pytest_asyncio.fixture(name="mysql_server", scope="session")
|
|
456
469
|
async def fixture_mysql_server(fail_missing: bool) -> AsyncGenerator[dict[str, str | int]]:
|
|
457
470
|
"""Fixture to safely skip MySQL based tests if MySQL is not running"""
|
|
458
471
|
host = os.environ.get('NAT_CI_MYSQL_HOST', '127.0.0.1')
|
|
@@ -475,7 +488,7 @@ async def fixture_mysql_server(fail_missing: bool) -> AsyncGenerator[dict[str, s
|
|
|
475
488
|
pytest.skip(f"Error connecting to MySQL server: {e}, skipping MySQL tests")
|
|
476
489
|
|
|
477
490
|
|
|
478
|
-
@pytest.fixture(name="minio_server", scope="
|
|
491
|
+
@pytest.fixture(name="minio_server", scope="session")
|
|
479
492
|
def minio_server_fixture(fail_missing: bool) -> Generator[dict[str, str | int]]:
|
|
480
493
|
"""Fixture to safely skip MinIO based tests if MinIO is not running"""
|
|
481
494
|
host = os.getenv("NAT_CI_MINIO_HOST", "localhost")
|
|
@@ -502,17 +515,76 @@ def minio_server_fixture(fail_missing: bool) -> Generator[dict[str, str | int]]:
|
|
|
502
515
|
aws_access_key_id=aws_access_key_id,
|
|
503
516
|
aws_secret_access_key=aws_secret_access_key,
|
|
504
517
|
endpoint_url=endpoint_url)
|
|
505
|
-
client.
|
|
518
|
+
client.list_buckets()
|
|
506
519
|
yield minio_info
|
|
507
520
|
except ImportError:
|
|
508
521
|
if fail_missing:
|
|
509
522
|
raise
|
|
510
523
|
pytest.skip("aioboto3 not installed, skipping MinIO tests")
|
|
511
524
|
except Exception as e:
|
|
512
|
-
|
|
513
|
-
if isinstance(e, botocore.exceptions.ClientError) and e.response['Error']['Code'] == '404':
|
|
514
|
-
yield minio_info # Bucket does not exist, but server is reachable
|
|
515
|
-
elif fail_missing:
|
|
525
|
+
if fail_missing:
|
|
516
526
|
raise
|
|
517
527
|
else:
|
|
518
528
|
pytest.skip(f"Error connecting to MinIO server: {e}, skipping MinIO tests")
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
@pytest.fixture(name="langfuse_bucket", scope="session")
|
|
532
|
+
def langfuse_bucket_fixture(fail_missing: bool, minio_server: dict[str, str | int]) -> Generator[str]:
|
|
533
|
+
|
|
534
|
+
bucket_name = os.getenv("NAT_CI_LANGFUSE_BUCKET", "langfuse")
|
|
535
|
+
try:
|
|
536
|
+
import botocore.session
|
|
537
|
+
session = botocore.session.get_session()
|
|
538
|
+
|
|
539
|
+
client = session.create_client("s3",
|
|
540
|
+
aws_access_key_id=minio_server["aws_access_key_id"],
|
|
541
|
+
aws_secret_access_key=minio_server["aws_secret_access_key"],
|
|
542
|
+
endpoint_url=minio_server["endpoint_url"])
|
|
543
|
+
|
|
544
|
+
buckets = client.list_buckets()
|
|
545
|
+
bucket_names = [b['Name'] for b in buckets['Buckets']]
|
|
546
|
+
if bucket_name not in bucket_names:
|
|
547
|
+
client.create_bucket(Bucket=bucket_name)
|
|
548
|
+
|
|
549
|
+
yield bucket_name
|
|
550
|
+
except ImportError:
|
|
551
|
+
if fail_missing:
|
|
552
|
+
raise
|
|
553
|
+
pytest.skip("aioboto3 not installed, skipping MinIO tests")
|
|
554
|
+
except Exception as e:
|
|
555
|
+
if fail_missing:
|
|
556
|
+
raise
|
|
557
|
+
else:
|
|
558
|
+
pytest.skip(f"Error connecting to MinIO server: {e}, skipping MinIO tests")
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
@pytest.fixture(name="langfuse_url", scope="session")
|
|
562
|
+
def langfuse_url_fixture(fail_missing: bool, langfuse_bucket: str) -> str:
|
|
563
|
+
"""
|
|
564
|
+
To run these tests, a langfuse server must be running.
|
|
565
|
+
"""
|
|
566
|
+
import requests
|
|
567
|
+
|
|
568
|
+
host = os.getenv("NAT_CI_LANGFUSE_HOST", "localhost")
|
|
569
|
+
port = int(os.getenv("NAT_CI_LANGFUSE_PORT", "3000"))
|
|
570
|
+
url = f"http://{host}:{port}"
|
|
571
|
+
health_endpoint = f"{url}/api/public/health"
|
|
572
|
+
try:
|
|
573
|
+
response = requests.get(health_endpoint, timeout=5)
|
|
574
|
+
response.raise_for_status()
|
|
575
|
+
|
|
576
|
+
return url
|
|
577
|
+
except Exception as e:
|
|
578
|
+
reason = f"Unable to connect to Langfuse server at {url}: {e}"
|
|
579
|
+
if fail_missing:
|
|
580
|
+
raise RuntimeError(reason)
|
|
581
|
+
pytest.skip(reason=reason)
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
@pytest.fixture(name="langfuse_trace_url", scope="session")
|
|
585
|
+
def langfuse_trace_url_fixture(langfuse_url: str) -> str:
|
|
586
|
+
"""
|
|
587
|
+
The langfuse_url fixture provides the base url, however the general.telemetry.tracing["langfuse"].endpoint expects
|
|
588
|
+
the trace url which is what this fixture provides.
|
|
589
|
+
"""
|
|
590
|
+
return f"{langfuse_url}/api/public/otel/v1/traces"
|
{nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-test
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.0a20251022
|
|
4
4
|
Summary: Testing utilities for NeMo Agent toolkit
|
|
5
5
|
Author: NVIDIA Corporation
|
|
6
6
|
Maintainer: NVIDIA Corporation
|
|
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE-3rd-party.txt
|
|
18
18
|
License-File: LICENSE.md
|
|
19
|
-
Requires-Dist: nvidia-nat==v1.3.
|
|
19
|
+
Requires-Dist: nvidia-nat==v1.3.0a20251022
|
|
20
20
|
Requires-Dist: langchain-community~=0.3
|
|
21
21
|
Requires-Dist: pytest~=8.3
|
|
22
22
|
Dynamic: license-file
|
{nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/RECORD
RENAMED
|
@@ -5,14 +5,14 @@ nat/test/functions.py,sha256=ZxXVzfaLBGOpR5qtmMrKU7q-M9-vVGGj3Xi5mrw4vHY,3557
|
|
|
5
5
|
nat/test/llm.py,sha256=f6bz6arAQjhjuOKFrLfu_U1LbiyFzQmpM-q8b-WKSrU,9550
|
|
6
6
|
nat/test/memory.py,sha256=xki_A2yiMhEZuQk60K7t04QRqf32nQqnfzD5Iv7fkvw,1456
|
|
7
7
|
nat/test/object_store_tests.py,sha256=PyJioOtoSzILPq6LuD-sOZ_89PIcgXWZweoHBQpK2zQ,4281
|
|
8
|
-
nat/test/plugin.py,sha256=
|
|
8
|
+
nat/test/plugin.py,sha256=NV4JcUnqhBhQzO4sc3P8JDBlwWohmu5TYVCWRbNPwVo,20911
|
|
9
9
|
nat/test/register.py,sha256=o1BEA5fyxyFyCxXhQ6ArmtuNpgRyTEfvw6HdBgECPLI,897
|
|
10
10
|
nat/test/tool_test_runner.py,sha256=SxavwXHkvCQDl_PUiiiqgvGfexKJJTeBdI5i1qk6AzI,21712
|
|
11
11
|
nat/test/utils.py,sha256=Lml187P9SUP3IB_HhBaU1XNhiljcpOFFZOAxgQR1vQo,5936
|
|
12
|
-
nvidia_nat_test-1.3.
|
|
13
|
-
nvidia_nat_test-1.3.
|
|
14
|
-
nvidia_nat_test-1.3.
|
|
15
|
-
nvidia_nat_test-1.3.
|
|
16
|
-
nvidia_nat_test-1.3.
|
|
17
|
-
nvidia_nat_test-1.3.
|
|
18
|
-
nvidia_nat_test-1.3.
|
|
12
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
13
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
14
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/METADATA,sha256=ZTJn_nteBj_DVGb2tPzokSsYetEnCvThAvSnKyaGP1Y,1925
|
|
15
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/entry_points.txt,sha256=7dOP9XB6iMDqvav3gYx9VWUwA8RrFzhbAa8nGeC8e4Y,99
|
|
17
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
18
|
+
nvidia_nat_test-1.3.0a20251022.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nvidia_nat_test-1.3.0a20251021.dist-info → nvidia_nat_test-1.3.0a20251022.dist-info}/top_level.txt
RENAMED
|
File without changes
|