-
Notifications
You must be signed in to change notification settings - Fork 396
feat: Python 3.13 support #761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds Python 3.13 support across CI, Docker images, and packaging; widens many pyproject Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant Example as Example Tool
participant LangChain
participant USearch as USearch VectorStore
User->>Example: submit files / query
Example->>LangChain: load & split documents
LangChain->>Example: embeddings
Example->>USearch: USearch.afrom_documents(documents, embeddings)
USearch-->>Example: vectorstore
Example->>LangChain: vectorstore.as_retriever()
Example-->>User: retriever results
note right of Example: FAISS → USearch swap implemented in examples
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
514337b to
f6875a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (15)
src/nat/cli/commands/workflow/templates/pyproject.toml.j2 (1)
1-1: Missing SPDX header will fail CI header checks.Add the standard SPDX Apache-2.0 header at the very top of the template so generated files also comply.
Apply this diff:
+ # SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system] build-backend = "setuptools.build_meta"examples/observability/simple_calculator_observability/pyproject.toml (1)
1-1: Missing SPDX header will fail CI header checks.Add the standard SPDX header to satisfy repository policy.
+ # SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system] build-backend = "setuptools.build_meta"packages/compat/aiqtoolkit_semantic_kernel/pyproject.toml (1)
1-1: Missing SPDX header will fail CI header checks.Add the SPDX header at the top.
+ # SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system] build-backend = "setuptools.build_meta"packages/compat/aiqtoolkit_agno/pyproject.toml (1)
1-1: Missing SPDX header will fail CI header checks.Add the SPDX header at the top.
+ # SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system] build-backend = "setuptools.build_meta"packages/compat/aiqtoolkit_weave/pyproject.toml (1)
1-1: Missing SPDX header will fail CI header checks.Add the SPDX header at the top.
+ # SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system] build-backend = "setuptools.build_meta"packages/compat/aiqtoolkit_zep_cloud/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header (CI will fail).
Add the standard header at the very top.Apply:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system]packages/compat/aiqtoolkit_mem0ai/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header (CI will fail).
Add at file start.Apply:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system]packages/compat/aiqtoolkit_crewai/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header (CI will fail).
Add at top.Apply:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system]packages/compat/aiqtoolkit/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header (CI will fail).
Add at file start.Apply:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system]packages/compat/aiqtoolkit_langchain/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header (CI will fail).
Add at top.Apply:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES [build-system]packages/nvidia_nat_profiling/pyproject.toml (1)
1-1: Add mandatory SPDX header to pass CI header checks.pyproject.toml must start with the SPDX Apache-2.0 header.
Apply at file top:
+# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system]packages/compat/aiqtoolkit_test/pyproject.toml (1)
1-1: Insert the SPDX header.Required for license compliance and CI.
+# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system]packages/nvidia_nat_s3/pyproject.toml (1)
1-1: Add the SPDX Apache-2.0 header.Toml files must include it at the top.
+# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system]pyproject.toml (1)
1-1: Prepend two-line SPDX Apache-2.0 header to every .toml fileAdd the following at the top of each .toml (root pyproject.toml and all example/package pyproject.toml files):
+# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile (1)
33-45: Track email_phishing_analyzer/data in Git LFS
examples/evaluation_and_profiling/email_phishing_analyzer/data exists but isn’t referenced in .gitattributes—add a pattern for that directory to ensure large files are stored via LFS.
♻️ Duplicate comments (4)
examples/getting_started/simple_calculator/Dockerfile (1)
21-21: NAT_VERSION now required (follow-up to earlier feedback).This addresses the prior fail-fast suggestion.
examples/frameworks/agno_personal_finance/Dockerfile (1)
37-37: Nice: early guard on NAT_VERSION prevents broken builds.
Matches prior feedback; good fail-fast UX.docker/Dockerfile (1)
49-50: Good: NAT pinned with an explicit guard.
Prevents invalid requirement strings.examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile (1)
37-37: Good guard on NAT_VERSION.
Prevents ambiguous builds.
🧹 Nitpick comments (17)
src/nat/cli/commands/workflow/templates/pyproject.toml.j2 (1)
19-19: Consider adding explicit Python classifiers (incl. 3.13) to the template.Helps downstream packages advertise supported versions.
- classifiers = ["Programming Language :: Python"] + classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + ]examples/observability/simple_calculator_observability/pyproject.toml (1)
19-19: Optional: publish explicit Python version classifiers.Advertises 3.11–3.13 support on PyPI.
- classifiers = ["Programming Language :: Python"] + classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + ]packages/compat/aiqtoolkit_zep_cloud/pyproject.toml (1)
9-14: Addrequires-pythonto enforce installer constraints.
Classifiers don’t enforce;requires-pythondoes.Apply:
[project] name = "aiqtoolkit-zep-cloud" dynamic = ["version"] +requires-python = ">=3.11,<3.14"packages/compat/aiqtoolkit_mem0ai/pyproject.toml (1)
10-15: Addrequires-pythonfor installer enforcement.
Keep in sync with supported versions.Apply:
[project] name = "aiqtoolkit-mem0ai" dynamic = ["version"] +requires-python = ">=3.11,<3.14"packages/compat/aiqtoolkit_crewai/pyproject.toml (1)
10-14: Addrequires-pythonto codify 3.11–3.13 support.Apply:
[project] name = "aiqtoolkit-crewai" dynamic = ["version"] +requires-python = ">=3.11,<3.14"packages/compat/aiqtoolkit/pyproject.toml (1)
9-14: Addrequires-pythonto match repo policy.Apply:
[project] name = "aiqtoolkit" dynamic = ["version"] +requires-python = ">=3.11,<3.14"packages/compat/aiqtoolkit_langchain/pyproject.toml (1)
10-20: Addrequires-pythonfor installer enforcement.Apply:
[project] name = "aiqtoolkit-langchain" dynamic = ["version"] +requires-python = ">=3.11,<3.14"packages/nvidia_nat_s3/pyproject.toml (1)
19-25: Keep dependencies sorted as indicated by the file’s guideline.aioboto3 should precede nvidia-nat.
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 `==`. Does not apply to nvidia-nat packages. # Keep sorted!!! - "nvidia-nat~=1.3", - "aioboto3>=11.0.0", + "aioboto3>=11.0.0", + "nvidia-nat~=1.3", ]examples/getting_started/simple_calculator/Dockerfile (1)
29-31: Trim image size by cleaning apt lists.Minor layer-size win after installing build tools.
RUN apt-get update && \ - apt-get install -y g++ gcc + apt-get install -y g++ gcc && \ + rm -rf /var/lib/apt/lists/*examples/frameworks/agno_personal_finance/Dockerfile (2)
25-25: Pin the uv image by digest for supply-chain reproducibility.
Tags can drift; prefer a content-addressable reference.Apply:
-COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/ +ARG UV_IMAGE_REF=ghcr.io/astral-sh/uv@sha256:<digest> +COPY --from=${UV_IMAGE_REF} /uv /uvx /bin/Optionally keep UV_VERSION just for human docs.
43-46: Make env sync deterministic and consider non-root execution.
- Use a frozen solver when a lockfile exists.
- Run as a non-root user for defense-in-depth.
- uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} && \ + uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} --frozen || \ + uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} && \ @@ - uv pip install --link-mode=copy ./examples/frameworks/agno_personal_finance + uv pip install --link-mode=copy ./examples/frameworks/agno_personal_finance + +# After COPY and installs, drop privileges: +RUN useradd -m app && chown -R app:app /workspace +USER appdocker/Dockerfile (4)
25-25: Pin uv base by digest.
Prevents accidental upgrades if the tag is retagged.-COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/ +ARG UV_IMAGE_REF=ghcr.io/astral-sh/uv@sha256:<digest> +COPY --from=${UV_IMAGE_REF} /uv /uvx /bin/
30-36: Avoid apt upgrade; switch to apt-get + cleanup for slimmer, reproducible layers.
apt upgradereduces reproducibility and increases image size.-RUN export DEBIAN_FRONTEND=noninteractive && \ - export TZ=Etc/UTC && \ - apt-get update && \ - apt upgrade -y && \ - apt-get install --no-install-recommends -y ca-certificates && \ - apt clean && \ - update-ca-certificates +RUN set -eux; \ + export DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC; \ + apt-get update; \ + apt-get install --no-install-recommends -y ca-certificates; \ + update-ca-certificates; \ + rm -rf /var/lib/apt/lists/*
45-51: Harden installs and drop root.
- Consider
--link-mode=copyto avoid hardlink issues on overlayfs.- Create a non-root user post-install.
- . /workspace/.venv/bin/activate && \ - test -n "${NAT_VERSION}" || { echo "NAT_VERSION build-arg is required" >&2; exit 1; } && \ - uv pip install --prerelease=allow "nvidia-nat[all]==${NAT_VERSION}" + . /workspace/.venv/bin/activate && \ + test -n "${NAT_VERSION}" || { echo "NAT_VERSION build-arg is required" >&2; exit 1; } && \ + uv pip install --link-mode=copy --prerelease=allow "nvidia-nat[all]==${NAT_VERSION}" && \ + useradd -m app && chown -R app:app /workspace +USER app
52-53: Comment nit acknowledged.
No action needed.examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile (2)
25-25: Pin the uv image digest.
Improve reproducibility and supply-chain hygiene.-COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/ +ARG UV_IMAGE_REF=ghcr.io/astral-sh/uv@sha256:<digest> +COPY --from=${UV_IMAGE_REF} /uv /uvx /bin/
43-45: Lock resolution and consider non-root.
- Prefer
--frozenwhen a lockfile is present.- Drop root after installs.
- uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} && \ + uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} --frozen || \ + uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} && \ @@ - uv pip install --link-mode=copy ./examples/evaluation_and_profiling/email_phishing_analyzer + uv pip install --link-mode=copy ./examples/evaluation_and_profiling/email_phishing_analyzer && \ + useradd -m app && chown -R app:app /workspace +USER app
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (71)
.cursor/rules/nat-setup/nat-toolkit-installation.mdc(2 hunks).github/workflows/ci_pipe.yml(2 hunks).github/workflows/pr.yaml(1 hunks).gitlab-ci.yml(1 hunks)ci/scripts/run_ci_local.sh(1 hunks)docker/Dockerfile(2 hunks)docs/source/quick-start/installing.md(1 hunks)examples/HITL/por_to_jiratickets/pyproject.toml(1 hunks)examples/HITL/simple_calculator_hitl/pyproject.toml(1 hunks)examples/MCP/simple_calculator_mcp/pyproject.toml(1 hunks)examples/RAG/simple_rag/pyproject.toml(1 hunks)examples/advanced_agents/alert_triage_agent/pyproject.toml(1 hunks)examples/advanced_agents/profiler_agent/pyproject.toml(1 hunks)examples/custom_functions/automated_description_generation/pyproject.toml(1 hunks)examples/custom_functions/plot_charts/pyproject.toml(1 hunks)examples/documentation_guides/workflows/text_file_ingest/pyproject.toml(1 hunks)examples/documentation_guides/workflows/text_file_ingest/src/text_file_ingest/text_file_ingest_function.py(2 hunks)examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile(3 hunks)examples/evaluation_and_profiling/email_phishing_analyzer/pyproject.toml(1 hunks)examples/evaluation_and_profiling/simple_calculator_eval/pyproject.toml(1 hunks)examples/evaluation_and_profiling/simple_web_query_eval/pyproject.toml(1 hunks)examples/evaluation_and_profiling/swe_bench/pyproject.toml(1 hunks)examples/frameworks/agno_personal_finance/Dockerfile(3 hunks)examples/frameworks/agno_personal_finance/pyproject.toml(1 hunks)examples/frameworks/multi_frameworks/pyproject.toml(1 hunks)examples/frameworks/semantic_kernel_demo/pyproject.toml(1 hunks)examples/front_ends/simple_auth/pyproject.toml(1 hunks)examples/front_ends/simple_calculator_custom_routes/pyproject.toml(1 hunks)examples/getting_started/simple_calculator/Dockerfile(2 hunks)examples/getting_started/simple_calculator/pyproject.toml(1 hunks)examples/getting_started/simple_web_query/Dockerfile(2 hunks)examples/getting_started/simple_web_query/pyproject.toml(1 hunks)examples/getting_started/simple_web_query/src/nat_simple_web_query/register.py(2 hunks)examples/getting_started/simple_web_query/tests/test_web_query_tool.py(0 hunks)examples/notebooks/first_search_agent/pyproject.toml(1 hunks)examples/notebooks/retail_sales_agent/pyproject.toml(1 hunks)examples/object_store/user_report/pyproject.toml(1 hunks)examples/observability/redact_pii/pyproject.toml(1 hunks)examples/observability/simple_calculator_observability/pyproject.toml(1 hunks)packages/compat/aiqtoolkit/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_agno/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_crewai/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_langchain/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_llama_index/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_mem0ai/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_semantic_kernel/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_test/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_weave/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_zep_cloud/pyproject.toml(1 hunks)packages/nvidia_nat_agno/pyproject.toml(1 hunks)packages/nvidia_nat_all/pyproject.toml(1 hunks)packages/nvidia_nat_crewai/pyproject.toml(1 hunks)packages/nvidia_nat_data_flywheel/pyproject.toml(1 hunks)packages/nvidia_nat_ingestion/pyproject.toml(1 hunks)packages/nvidia_nat_langchain/pyproject.toml(1 hunks)packages/nvidia_nat_llama_index/pyproject.toml(1 hunks)packages/nvidia_nat_mem0ai/pyproject.toml(1 hunks)packages/nvidia_nat_mysql/pyproject.toml(1 hunks)packages/nvidia_nat_opentelemetry/pyproject.toml(1 hunks)packages/nvidia_nat_phoenix/pyproject.toml(1 hunks)packages/nvidia_nat_profiling/pyproject.toml(1 hunks)packages/nvidia_nat_ragaai/pyproject.toml(1 hunks)packages/nvidia_nat_redis/pyproject.toml(1 hunks)packages/nvidia_nat_s3/pyproject.toml(1 hunks)packages/nvidia_nat_semantic_kernel/pyproject.toml(1 hunks)packages/nvidia_nat_test/pyproject.toml(1 hunks)packages/nvidia_nat_weave/pyproject.toml(1 hunks)packages/nvidia_nat_zep_cloud/pyproject.toml(1 hunks)pyproject.toml(1 hunks)src/nat/cli/commands/workflow/templates/pyproject.toml.j2(1 hunks)src/nat/front_ends/fastapi/fastapi_front_end_config.py(4 hunks)
💤 Files with no reviewable changes (1)
- examples/getting_started/simple_web_query/tests/test_web_query_tool.py
✅ Files skipped from review due to trivial changes (3)
- packages/compat/aiqtoolkit_llama_index/pyproject.toml
- docs/source/quick-start/installing.md
- examples/MCP/simple_calculator_mcp/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (49)
- examples/front_ends/simple_calculator_custom_routes/pyproject.toml
- examples/evaluation_and_profiling/email_phishing_analyzer/pyproject.toml
- examples/advanced_agents/profiler_agent/pyproject.toml
- examples/notebooks/retail_sales_agent/pyproject.toml
- examples/notebooks/first_search_agent/pyproject.toml
- ci/scripts/run_ci_local.sh
- examples/custom_functions/plot_charts/pyproject.toml
- packages/nvidia_nat_phoenix/pyproject.toml
- examples/frameworks/semantic_kernel_demo/pyproject.toml
- examples/frameworks/multi_frameworks/pyproject.toml
- examples/frameworks/agno_personal_finance/pyproject.toml
- examples/getting_started/simple_web_query/pyproject.toml
- examples/advanced_agents/alert_triage_agent/pyproject.toml
- examples/getting_started/simple_calculator/pyproject.toml
- packages/nvidia_nat_weave/pyproject.toml
- .gitlab-ci.yml
- packages/nvidia_nat_redis/pyproject.toml
- packages/nvidia_nat_ragaai/pyproject.toml
- examples/evaluation_and_profiling/simple_calculator_eval/pyproject.toml
- examples/RAG/simple_rag/pyproject.toml
- packages/nvidia_nat_data_flywheel/pyproject.toml
- .github/workflows/ci_pipe.yml
- examples/object_store/user_report/pyproject.toml
- examples/evaluation_and_profiling/swe_bench/pyproject.toml
- packages/nvidia_nat_zep_cloud/pyproject.toml
- packages/nvidia_nat_agno/pyproject.toml
- packages/nvidia_nat_llama_index/pyproject.toml
- packages/nvidia_nat_test/pyproject.toml
- examples/HITL/simple_calculator_hitl/pyproject.toml
- examples/evaluation_and_profiling/simple_web_query_eval/pyproject.toml
- packages/nvidia_nat_opentelemetry/pyproject.toml
- examples/front_ends/simple_auth/pyproject.toml
- examples/documentation_guides/workflows/text_file_ingest/src/text_file_ingest/text_file_ingest_function.py
- packages/nvidia_nat_semantic_kernel/pyproject.toml
- packages/nvidia_nat_mysql/pyproject.toml
- packages/nvidia_nat_crewai/pyproject.toml
- packages/nvidia_nat_langchain/pyproject.toml
- .github/workflows/pr.yaml
- examples/getting_started/simple_web_query/Dockerfile
- .cursor/rules/nat-setup/nat-toolkit-installation.mdc
- src/nat/front_ends/fastapi/fastapi_front_end_config.py
- examples/documentation_guides/workflows/text_file_ingest/pyproject.toml
- packages/nvidia_nat_all/pyproject.toml
- packages/nvidia_nat_mem0ai/pyproject.toml
- examples/HITL/por_to_jiratickets/pyproject.toml
- packages/nvidia_nat_ingestion/pyproject.toml
- examples/getting_started/simple_web_query/src/nat_simple_web_query/register.py
- examples/custom_functions/automated_description_generation/pyproject.toml
- examples/observability/redact_pii/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{py,sh,md,yml,yaml,toml,ini,json,ipynb,txt,rst}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
**/*.{py,sh,md,yml,yaml,toml,ini,json,ipynb,txt,rst}: Every file must start with the standard SPDX Apache-2.0 header; keep copyright years up‑to‑date
All source files must include the SPDX Apache‑2.0 header; do not bypass CI header checks
Files:
packages/compat/aiqtoolkit_semantic_kernel/pyproject.tomlpackages/compat/aiqtoolkit_weave/pyproject.tomlpackages/compat/aiqtoolkit/pyproject.tomlpackages/compat/aiqtoolkit_langchain/pyproject.tomlexamples/observability/simple_calculator_observability/pyproject.tomlpackages/compat/aiqtoolkit_crewai/pyproject.tomlpackages/compat/aiqtoolkit_zep_cloud/pyproject.tomlpackages/compat/aiqtoolkit_mem0ai/pyproject.tomlpackages/compat/aiqtoolkit_agno/pyproject.tomlpackages/compat/aiqtoolkit_test/pyproject.tomlpyproject.tomlpackages/nvidia_nat_s3/pyproject.tomlpackages/nvidia_nat_profiling/pyproject.toml
**/*
⚙️ CodeRabbit configuration file
**/*: # Code Review Instructions
- Ensure the code follows best practices and coding standards. - For Python code, follow
PEP 20 and
PEP 8 for style guidelines.- Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
Example:def my_function(param1: int, param2: str) -> bool: pass- For Python exception handling, ensure proper stack trace preservation:
- When re-raising exceptions: use bare
raisestatements to maintain the original stack trace,
and uselogger.error()(notlogger.exception()) to avoid duplicate stack trace output.- When catching and logging exceptions without re-raising: always use
logger.exception()
to capture the full stack trace information.Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any
words listed in the
ci/vale/styles/config/vocabularies/nat/reject.txtfile, words that might appear to be
spelling mistakes but are listed in theci/vale/styles/config/vocabularies/nat/accept.txtfile are OK.Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,
and should contain an Apache License 2.0 header comment at the top of each file.
- Confirm that copyright years are up-to date whenever a file is changed.
Files:
packages/compat/aiqtoolkit_semantic_kernel/pyproject.tomlpackages/compat/aiqtoolkit_weave/pyproject.tomlpackages/compat/aiqtoolkit/pyproject.tomlpackages/compat/aiqtoolkit_langchain/pyproject.tomlexamples/observability/simple_calculator_observability/pyproject.tomlsrc/nat/cli/commands/workflow/templates/pyproject.toml.j2packages/compat/aiqtoolkit_crewai/pyproject.tomlpackages/compat/aiqtoolkit_zep_cloud/pyproject.tomlpackages/compat/aiqtoolkit_mem0ai/pyproject.tomlpackages/compat/aiqtoolkit_agno/pyproject.tomlpackages/compat/aiqtoolkit_test/pyproject.tomlexamples/frameworks/agno_personal_finance/Dockerfilepyproject.tomlpackages/nvidia_nat_s3/pyproject.tomlpackages/nvidia_nat_profiling/pyproject.tomlexamples/evaluation_and_profiling/email_phishing_analyzer/Dockerfileexamples/getting_started/simple_calculator/Dockerfiledocker/Dockerfile
packages/**/*
⚙️ CodeRabbit configuration file
packages/**/*: - This directory contains optional plugin packages for the toolkit, each should contain apyproject.tomlfile. - Thepyproject.tomlfile should declare a dependency onnvidia-nator another package with a name starting
withnvidia-nat-. This dependency should be declared using~=<version>, and the version should be a two
digit version (ex:~=1.0).
- Not all packages contain Python code, if they do they should also contain their own set of tests, in a
tests/directory at the same level as thepyproject.tomlfile.
Files:
packages/compat/aiqtoolkit_semantic_kernel/pyproject.tomlpackages/compat/aiqtoolkit_weave/pyproject.tomlpackages/compat/aiqtoolkit/pyproject.tomlpackages/compat/aiqtoolkit_langchain/pyproject.tomlpackages/compat/aiqtoolkit_crewai/pyproject.tomlpackages/compat/aiqtoolkit_zep_cloud/pyproject.tomlpackages/compat/aiqtoolkit_mem0ai/pyproject.tomlpackages/compat/aiqtoolkit_agno/pyproject.tomlpackages/compat/aiqtoolkit_test/pyproject.tomlpackages/nvidia_nat_s3/pyproject.tomlpackages/nvidia_nat_profiling/pyproject.toml
examples/**/*
⚙️ CodeRabbit configuration file
examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.
- If an example contains Python code, it should be placed in a subdirectory named
src/and should
contain apyproject.tomlfile. Optionally, it might also contain scripts in ascripts/directory.- If an example contains YAML files, they should be placed in a subdirectory named
configs/. - If an example contains sample data files, they should be placed in a subdirectory nameddata/, and should
be checked into git-lfs.
Files:
examples/observability/simple_calculator_observability/pyproject.tomlexamples/frameworks/agno_personal_finance/Dockerfileexamples/evaluation_and_profiling/email_phishing_analyzer/Dockerfileexamples/getting_started/simple_calculator/Dockerfile
src/nat/**/*
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Core functionality under src/nat should prioritize backward compatibility when changed
Files:
src/nat/cli/commands/workflow/templates/pyproject.toml.j2
⚙️ CodeRabbit configuration file
This directory contains the core functionality of the toolkit. Changes should prioritize backward compatibility.
Files:
src/nat/cli/commands/workflow/templates/pyproject.toml.j2
pyproject.toml
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Add new dependencies to pyproject.toml in alphabetical order
Files:
pyproject.toml
packages/*/pyproject.toml
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
packages/*/pyproject.toml: Each package under packages/ must include a pyproject.toml
Package pyproject.toml must depend on nvidia-nat or a package starting with nvidia-nat- using ~= versions (e.g., ~=1.0)
Files:
packages/nvidia_nat_s3/pyproject.tomlpackages/nvidia_nat_profiling/pyproject.toml
🧠 Learnings (1)
📚 Learning: 2025-08-28T23:22:41.742Z
Learnt from: CR
PR: NVIDIA/NeMo-Agent-Toolkit#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-08-28T23:22:41.742Z
Learning: Applies to packages/*/pyproject.toml : Package pyproject.toml must depend on nvidia-nat or a package starting with nvidia-nat- using ~=<two-digit> versions (e.g., ~=1.0)
Applied to files:
packages/compat/aiqtoolkit_weave/pyproject.tomlpackages/compat/aiqtoolkit/pyproject.tomlpackages/compat/aiqtoolkit_crewai/pyproject.tomlpackages/compat/aiqtoolkit_mem0ai/pyproject.tomlpackages/compat/aiqtoolkit_agno/pyproject.tomlpackages/compat/aiqtoolkit_test/pyproject.tomlpyproject.tomlpackages/nvidia_nat_s3/pyproject.tomlpackages/nvidia_nat_profiling/pyproject.tomlexamples/evaluation_and_profiling/email_phishing_analyzer/Dockerfileexamples/getting_started/simple_calculator/Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: CI Pipeline / Check
🔇 Additional comments (26)
src/nat/cli/commands/workflow/templates/pyproject.toml.j2 (1)
17-17: Good: widened Python range to include 3.13.
requires-python = ">=3.11,<3.14"aligns the template with 3.13 support and repo policy.examples/observability/simple_calculator_observability/pyproject.toml (1)
16-16: Good: example now allows Python 3.13.Upper bound broadened to
<3.14is consistent with the repo-wide change.packages/compat/aiqtoolkit_semantic_kernel/pyproject.toml (1)
15-20: Good: classifiers now explicitly list 3.11–3.13.Matches the broadened support.
packages/compat/aiqtoolkit_agno/pyproject.toml (1)
16-21: Good: classifiers expanded to include 3.11–3.13.Consistent with Python 3.13 enablement.
packages/compat/aiqtoolkit_weave/pyproject.toml (1)
16-21: Good: classifiers expanded to include 3.11–3.13.Consistent with Python 3.13 enablement.
packages/compat/aiqtoolkit_zep_cloud/pyproject.toml (1)
15-20: Classifiers widened to 3.11–3.13 — LGTM.
Accurately reflects 3.13 support.packages/compat/aiqtoolkit_mem0ai/pyproject.toml (1)
16-21: Classifiers widened to 3.11–3.13 — LGTM.
Matches repo-wide policy.packages/compat/aiqtoolkit_crewai/pyproject.toml (1)
15-20: Classifiers widened to 3.11–3.13 — LGTM.
Consistent with CI matrix.packages/compat/aiqtoolkit/pyproject.toml (1)
15-20: Classifiers widened to 3.11–3.13 — LGTM.
Reflects declared support.packages/compat/aiqtoolkit_langchain/pyproject.toml (1)
21-26: Classifiers widened to 3.11–3.13 — LGTM.
Aligned with docs and CI.packages/nvidia_nat_profiling/pyproject.toml (2)
28-28: Python 3.13 enablement looks good.Upper bound widened to <3.14 matches the PR goal.
32-37: Classifiers updated correctly.Explicit 3.11–3.13 classifiers are appropriate.
packages/compat/aiqtoolkit_test/pyproject.toml (1)
15-20: Classifiers expanded appropriately.Matches the repo-wide Python 3.13 support.
packages/nvidia_nat_s3/pyproject.toml (2)
26-26: Python upper bound update is correct.<3.14 aligns with 3.13 support.
30-35: Classifier list LGTM.3.11–3.13 explicitly declared.
pyproject.toml (2)
50-50: Root requires-python widened correctly.Enables 3.13 across the workspace.
55-60: Updated classifiers are appropriate.Consistent with new Python support.
examples/getting_started/simple_calculator/Dockerfile (3)
18-19: Bump to Python 3.13 and parameterized UV version: LGTM.Keeps image source controllable via UV_VERSION.
25-25: Dynamic COPY of uv tools: LGTM.Works with the new UV_VERSION arg.
41-41: Explicit check for NAT_VERSION is correct.Clear error path avoids ambiguous builds.
examples/frameworks/agno_personal_finance/Dockerfile (2)
18-19: Python/uv bumps look good for 3.13 enablement.
No issues spotted with these ARG defaults.
51-51: Typo fix/readability improvement acknowledged.
Comment wording is clearer.docker/Dockerfile (1)
18-21: Version args and NAT versioning note look good.
Aligned with repo-wide 3.13 move.examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile (3)
18-19: 3.13/uv bumps are consistent with the PR’s goals.
Looks good.
21-21: ARG without default is fine given the guard below.
No change requested.
50-50: Comment tweak acknowledged.
LGTM.
|
Should this be marked as closing #72? |
...entation_guides/workflows/text_file_ingest/src/text_file_ingest/text_file_ingest_function.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Closes NVIDIA#179 Signed-off-by: Will Killian <wkillian@nvidia.com>
f6875a0 to
27f0a66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (11)
examples/HITL/simple_calculator_hitl/pyproject.toml (1)
1-1: Add SPDX Apache-2.0 header to satisfy CI license checks.This file lacks the required SPDX header at the top.
Apply:
+# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES +# SPDX-License-Identifier: Apache-2.0 + [build-system]packages/nvidia_nat_s3/pyproject.toml (1)
1-4: Add SPDX Apache-2.0 header (CI requirement).This file lacks the required SPDX header. CI header checks will fail without it; also ensure copyright year includes 2025.
+## SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved. + [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools >= 64", "setuptools-scm>=8"]packages/compat/aiqtoolkit/pyproject.toml (1)
1-1: Add SPDX Apache-2.0 header at file top (CI requirement).All files must start with the SPDX header; add it to avoid header-check failures.
Apply this diff at the very top:
+# Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES +# SPDX-License-Identifier: Apache-2.0examples/getting_started/simple_web_query/pyproject.toml (1)
1-1: Missing SPDX Apache-2.0 header — likely to fail CI.All .toml files must start with the SPDX header. Add it at the very top.
Apply this diff:
+# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools >= 64", "setuptools-scm>=8"]examples/front_ends/simple_auth/pyproject.toml (2)
1-1: Add required SPDX Apache-2.0 header.Repo guidelines require every .toml to start with the SPDX header; this will otherwise fail CI header checks.
Apply at the very top:
+# SPDX-FileCopyrightText: 2025 NVIDIA CORPORATION & AFFILIATES +# SPDX-License-Identifier: Apache-2.0 + [build-system]
1-25: Place data files under a dedicateddata/directory
Nodata/folder exists although example data files are present in the root. Createexamples/front_ends/simple_auth/data/, move all data files there, and track large assets via Git LFS.examples/notebooks/retail_sales_agent/pyproject.toml (1)
1-1: Add SPDX Apache-2.0 header
This file lacks the required header and will fail CI.
Apply:+# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system] build-backend = "setuptools.build_meta" requires = "setuptools >= 64", "setuptools-scm>=8"packages/nvidia_nat_redis/pyproject.toml (1)
1-1: Add SPDX Apache-2.0 header at file start (CI will fail without it).All tracked file types require the standard SPDX header. Please add it at the very top.
+# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools >= 64", "setuptools-scm>=8"]src/nat/front_ends/fastapi/fastapi_front_end_config.py (3)
50-59: Doc says “clamped” but code doesn’t clampexpiry_secondsThe docstring promises clamping to [600, 86400], but the model only enforces
gt=0. Add a validator and constants to match the documented behavior.Apply:
@@ YAML_EXTENSIONS = (".yaml", ".yml") + +# Expiry bounds (seconds) +MIN_EXPIRY_SECONDS = 600 +MAX_EXPIRY_SECONDS = 86_400 @@ class EvaluateRequest(BaseModel): - expiry_seconds: int = Field( + expiry_seconds: int = Field( default=3600, gt=0, description="Optional time (in seconds) before the job expires. Clamped between 600 (10 min) and 86400 (24h).") + + @field_validator('expiry_seconds', mode='after') + @classmethod + def clamp_expiry_seconds(cls, seconds: int) -> int: + if seconds < MIN_EXPIRY_SECONDS: + return MIN_EXPIRY_SECONDS + if seconds > MAX_EXPIRY_SECONDS: + return MAX_EXPIRY_SECONDS + return seconds
60-75: Validator crashes onjob_id=Noneand doesn’t enforce the stated charset
job_idis Optional but the validator assumesstrand calls.strip(), causing an error whenNone.- The error claims “Only alphanumeric and underscores,” but the code only checks path-ness, not characters. Enforce via regex.
- Add return type hints to satisfy pyright and project guidelines.
Apply:
@@ - def validate_job_id(cls, job_id: str): - job_id = job_id.strip() - job_id_path = Path(job_id) - if len(job_id_path.parts) > 1 or job_id_path.resolve().name != job_id: - raise ValueError( - f"Job ID '{job_id}' contains invalid characters. Only alphanumeric characters and underscores are" - " allowed.") - - if _is_reserved(job_id_path): + def validate_job_id(cls, job_id: str | None) -> str | None: + if job_id is None: + return None + job_id = job_id.strip() + # Enforce allowed charset: alphanumeric + underscore. + if not JOB_ID_RE.fullmatch(job_id): + raise ValueError("Job ID must contain only alphanumeric characters and underscores.") + + if _is_reserved(Path(job_id)): # reserved names is Windows specific raise ValueError(f"Job ID '{job_id}' is a reserved name. Please choose a different name.") return job_idAdd (outside this block):
@@ -import sys +import sys +import re @@ YAML_EXTENSIONS = (".yaml", ".yml") +JOB_ID_RE = re.compile(r'^[A-Za-z0-9_]+$')
76-81: Return type hint missing onvalidate_config_fileAdd
-> strto comply with type-hint policy and pyright.- def validate_config_file(cls, config_file: str): + def validate_config_file(cls, config_file: str) -> str:
♻️ Duplicate comments (4)
examples/getting_started/simple_web_query/pyproject.toml (1)
15-16: USearch pin relaxed correctly.Good change from a strict pin to
~=to allow patch updates; aligns with prior guidance.docker/Dockerfile (1)
49-51: NAT_VERSION guard and pin look good.The explicit check and exact pin to nvidia-nat[all]==${NAT_VERSION} resolve earlier flakiness.
examples/getting_started/simple_web_query/Dockerfile (1)
46-55: Good: explicit NAT_VERSION guard and deterministic version exports.This makes builds reproducible across CI and local runs.
src/nat/front_ends/fastapi/fastapi_front_end_config.py (1)
36-48: Deprecation-safe reserved-path helper — solid cross-version approachCentralizing the logic in
_is_reserved()cleanly handles 3.13’sos.path.isreserved()vs. olderPath.is_reserved(). This also addresses prior feedback about avoiding deprecation warnings.Run to ensure no lingering direct uses remain:
#!/bin/bash set -euo pipefail # 1) Any remaining direct uses of Path.is_reserved? rg -nP -C2 '\.is_reserved\s*\(' src || true # 2) Any direct calls to os.path.isreserved outside the helper? rg -nP -C2 'os\.path\.isreserved\s*\(' src || true
🧹 Nitpick comments (21)
examples/HITL/simple_calculator_hitl/pyproject.toml (1)
17-17: Widened requires-python looks correct; add version classifiers and verify 3.13 wheels.
- Add explicit Python 3.11/3.12/3.13 classifiers.
- Verify all direct deps (nvidia-nat[langchain], nat_simple_calculator, nat_por_to_jiratickets) build/import on 3.13 in CI.
Suggested edits:
description = "Simple Calculator Evaluation and Profiling - demonstrates NeMo Agent toolkit evaluation capabilities" keywords = ["ai", "hitl", "human in the loop", "agents"] -classifiers = ["Programming Language :: Python"] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +]packages/nvidia_nat_s3/pyproject.toml (2)
19-25: Keep dependencies sorted per inline guideline.The block says “Keep sorted!!!”. Consider alphabetical order to avoid churn in future diffs.
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 `==`. Does not apply to nvidia-nat packages. # Keep sorted!!! - "nvidia-nat~=1.3", "aioboto3>=11.0.0", + "nvidia-nat~=1.3", ]
30-35: Add License classifier to match project license.Include the Apache Software License Trove classifier for better metadata.
classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: Apache Software License", ]packages/compat/aiqtoolkit/pyproject.toml (2)
9-14: Declarerequires-pythonto formally advertise 3.13 support.Classifiers help discoverability, but installers rely on
requires-python. Recommend pinning to supported majors.Apply:
[project] name = "aiqtoolkit" dynamic = ["version"] +requires-python = ">=3.11,<4.0" dependencies = ["nvidia-nat~=1.3"]
15-20: Augment classifiers for completeness.Add generic Python 3 tags for better PyPI searchability; optional but common.
classifiers = [ - "Programming Language :: Python", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ]examples/getting_started/simple_web_query/pyproject.toml (1)
17-20: Add Python 3.13 Trove classifiers to match requires-python.Metadata should explicitly advertise 3.13.
Apply this diff:
-description = "Simple NeMo Agent toolkit example" -keywords = ["ai", "rag", "agents"] -classifiers = ["Programming Language :: Python"] +description = "Simple NeMo Agent toolkit example" +keywords = ["ai", "rag", "agents"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +]examples/front_ends/simple_auth/pyproject.toml (2)
18-18: Advertise supported Python versions via trove classifiers.Add explicit 3.11/3.12/3.13 classifiers to align with CI and improve package metadata.
-description = "Custom NeMo Agent toolkit workflow demonstrating auth" -classifiers = ["Programming Language :: Python"] +description = "Custom NeMo Agent toolkit workflow demonstrating auth" +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +]
12-15: Consider pinning httpx to a compatible minor for reproducibility.Unpinned
httpxcan introduce drift; examples benefit from~=pins.dependencies = [ "nvidia-nat[langchain]~=1.3", - "httpx", + "httpx~=0.27", ]docker/Dockerfile (3)
23-26: Prefer a named uv stage (correct arch, better caching) and consider digest pinning.Define a dedicated stage for the uv image to guarantee the right architecture under multi-arch builds and improve cache behavior; optionally pin by digest to avoid tag drift.
Apply within this file:
- COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/ + COPY --from=uv /uv /uvx /bin/Add this stage near the top (outside the shown range):
FROM --platform=$TARGETPLATFORM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv
29-36: Avoidapt upgrade, use--no-install-recommends, and clean apt lists to slim and stabilize builds.Upgrading the base can reduce reproducibility and bloat layers.
-RUN export DEBIAN_FRONTEND=noninteractive && \ - export TZ=Etc/UTC && \ - apt-get update && \ - apt upgrade -y && \ - apt-get install --no-install-recommends -y ca-certificates && \ - apt clean && \ - update-ca-certificates +RUN export DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC && \ + apt-get update && \ + apt-get install --no-install-recommends -y ca-certificates && \ + update-ca-certificates && \ + rm -rf /var/lib/apt/lists/*
18-21: Consider surfacing build provenance via labels.Optional: add org.opencontainers.image.* labels (version, revision, created) using ${NAT_VERSION} to aid traceability.
examples/getting_started/simple_web_query/Dockerfile (5)
25-26: Use a named uv stage (multi-arch safety) and consider digest pinning.Same rationale as the root Dockerfile: resolve the uv image once per build, ensure arch correctness, and improve caching.
- COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/ + COPY --from=uv /uv /uvx /bin/Add (outside the shown range):
FROM --platform=$TARGETPLATFORM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv
31-33: Harden apt install: noninteractive, no recommends, and apt list cleanup.Reduces image size and avoids interactive prompts.
-RUN apt-get update && \ - apt-get install -y g++ gcc ca-certificates curl && \ - update-ca-certificates +RUN export DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC && \ + apt-get update && \ + apt-get install --no-install-recommends -y g++ gcc ca-certificates curl && \ + update-ca-certificates && \ + rm -rf /var/lib/apt/lists/*
42-45: Improve layer caching by installing deps before copying the whole tree.Copy only pyproject/lock first, run
uv sync, then copy sources to avoid cache busts on source changes.Example structure (outside the shown range):
# before copying the whole repo COPY pyproject.toml uv.lock /workspace/ RUN uv venv --python ${PYTHON_VERSION} /workspace/.venv && \ uv sync --link-mode=copy --compile-bytecode --python ${PYTHON_VERSION} # then copy sources COPY ./ /workspace RUN uv pip install --link-mode=copy ./examples/getting_started/simple_web_query
64-64: Prefer exec-form ENTRYPOINT without shell.If env-var expansion isn’t required at runtime, use the JSON form to avoid an extra shell and better signal handling. If you must keep
$NAT_CONFIG_FILE, shell form is fine.-ENTRYPOINT ["sh", "-c", "exec nat serve --config_file=$NAT_CONFIG_FILE --host 0.0.0.0"] +ENTRYPOINT ["nat", "serve", "--config_file", "/workspace/examples/getting_started/simple_web_query/configs/config.yml", "--host", "0.0.0.0"]
43-44: Ensure a robust .dockerignore.Exclude .git, venvs, build artifacts, datasets, and caches to keep image size small.
Would you like a suggested .dockerignore tuned for this repo?
examples/notebooks/retail_sales_agent/pyproject.toml (2)
24-24: Trove classifiers: declare supported Python versions explicitly.Since requires-python allows 3.13, add explicit classifiers for discoverability.
Apply this diff:
-classifiers = ["Programming Language :: Python"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +]
23-23: Minor wording nit: align description with project name.“AIQ Toolkit” may be outdated branding for this repo; consider “NeMo Agent Toolkit”.
Apply this diff:
-description = "Custom AIQ Toolkit Workflow" +description = "Custom NeMo Agent Toolkit Workflow"packages/nvidia_nat_redis/pyproject.toml (1)
30-35: Classifiers updated for 3.11–3.13: add license classifier for parity with SPDX.Optional but recommended to match the SPDX header and PyPI metadata.
classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: Apache Software License", ]src/nat/front_ends/fastapi/fastapi_front_end_config.py (2)
87-90: Reserved-name check forconfig_file— LGTM; consider expanding~The helper-based check is correct. Optionally expand user home to improve UX when paths start with
~.Outside this hunk:
- config_file_path = Path(config_file).resolve() + config_file_path = Path(config_file).expanduser().resolve()
71-71: Tiny comment grammar nit“Reserved names are Windows-specific.”
- # reserved names is Windows specific + # Reserved names are Windows-specificAlso applies to: 89-89
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (71)
.cursor/rules/nat-setup/nat-toolkit-installation.mdc(2 hunks).github/workflows/ci_pipe.yml(2 hunks).github/workflows/pr.yaml(1 hunks).gitlab-ci.yml(1 hunks)ci/scripts/run_ci_local.sh(1 hunks)docker/Dockerfile(2 hunks)docs/source/quick-start/installing.md(1 hunks)examples/HITL/por_to_jiratickets/pyproject.toml(1 hunks)examples/HITL/simple_calculator_hitl/pyproject.toml(1 hunks)examples/MCP/simple_calculator_mcp/pyproject.toml(1 hunks)examples/RAG/simple_rag/pyproject.toml(1 hunks)examples/advanced_agents/alert_triage_agent/pyproject.toml(1 hunks)examples/advanced_agents/profiler_agent/pyproject.toml(1 hunks)examples/custom_functions/automated_description_generation/pyproject.toml(1 hunks)examples/custom_functions/plot_charts/pyproject.toml(1 hunks)examples/documentation_guides/workflows/text_file_ingest/pyproject.toml(1 hunks)examples/documentation_guides/workflows/text_file_ingest/src/text_file_ingest/text_file_ingest_function.py(2 hunks)examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile(3 hunks)examples/evaluation_and_profiling/email_phishing_analyzer/pyproject.toml(1 hunks)examples/evaluation_and_profiling/simple_calculator_eval/pyproject.toml(1 hunks)examples/evaluation_and_profiling/simple_web_query_eval/pyproject.toml(1 hunks)examples/evaluation_and_profiling/swe_bench/pyproject.toml(1 hunks)examples/frameworks/agno_personal_finance/Dockerfile(3 hunks)examples/frameworks/agno_personal_finance/pyproject.toml(1 hunks)examples/frameworks/multi_frameworks/pyproject.toml(1 hunks)examples/frameworks/semantic_kernel_demo/pyproject.toml(1 hunks)examples/front_ends/simple_auth/pyproject.toml(1 hunks)examples/front_ends/simple_calculator_custom_routes/pyproject.toml(1 hunks)examples/getting_started/simple_calculator/Dockerfile(2 hunks)examples/getting_started/simple_calculator/pyproject.toml(1 hunks)examples/getting_started/simple_web_query/Dockerfile(2 hunks)examples/getting_started/simple_web_query/pyproject.toml(1 hunks)examples/getting_started/simple_web_query/src/nat_simple_web_query/register.py(2 hunks)examples/getting_started/simple_web_query/tests/test_web_query_tool.py(0 hunks)examples/notebooks/first_search_agent/pyproject.toml(1 hunks)examples/notebooks/retail_sales_agent/pyproject.toml(1 hunks)examples/object_store/user_report/pyproject.toml(1 hunks)examples/observability/redact_pii/pyproject.toml(1 hunks)examples/observability/simple_calculator_observability/pyproject.toml(1 hunks)packages/compat/aiqtoolkit/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_agno/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_crewai/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_langchain/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_llama_index/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_mem0ai/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_semantic_kernel/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_test/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_weave/pyproject.toml(1 hunks)packages/compat/aiqtoolkit_zep_cloud/pyproject.toml(1 hunks)packages/nvidia_nat_agno/pyproject.toml(1 hunks)packages/nvidia_nat_all/pyproject.toml(1 hunks)packages/nvidia_nat_crewai/pyproject.toml(1 hunks)packages/nvidia_nat_data_flywheel/pyproject.toml(1 hunks)packages/nvidia_nat_ingestion/pyproject.toml(1 hunks)packages/nvidia_nat_langchain/pyproject.toml(1 hunks)packages/nvidia_nat_llama_index/pyproject.toml(1 hunks)packages/nvidia_nat_mem0ai/pyproject.toml(1 hunks)packages/nvidia_nat_mysql/pyproject.toml(1 hunks)packages/nvidia_nat_opentelemetry/pyproject.toml(1 hunks)packages/nvidia_nat_phoenix/pyproject.toml(1 hunks)packages/nvidia_nat_profiling/pyproject.toml(1 hunks)packages/nvidia_nat_ragaai/pyproject.toml(1 hunks)packages/nvidia_nat_redis/pyproject.toml(1 hunks)packages/nvidia_nat_s3/pyproject.toml(1 hunks)packages/nvidia_nat_semantic_kernel/pyproject.toml(1 hunks)packages/nvidia_nat_test/pyproject.toml(1 hunks)packages/nvidia_nat_weave/pyproject.toml(1 hunks)packages/nvidia_nat_zep_cloud/pyproject.toml(1 hunks)pyproject.toml(1 hunks)src/nat/cli/commands/workflow/templates/pyproject.toml.j2(1 hunks)src/nat/front_ends/fastapi/fastapi_front_end_config.py(4 hunks)
💤 Files with no reviewable changes (1)
- examples/getting_started/simple_web_query/tests/test_web_query_tool.py
✅ Files skipped from review due to trivial changes (1)
- examples/evaluation_and_profiling/swe_bench/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (59)
- packages/nvidia_nat_agno/pyproject.toml
- examples/getting_started/simple_web_query/src/nat_simple_web_query/register.py
- pyproject.toml
- packages/nvidia_nat_semantic_kernel/pyproject.toml
- src/nat/cli/commands/workflow/templates/pyproject.toml.j2
- packages/compat/aiqtoolkit_test/pyproject.toml
- .gitlab-ci.yml
- examples/custom_functions/automated_description_generation/pyproject.toml
- .github/workflows/ci_pipe.yml
- examples/HITL/por_to_jiratickets/pyproject.toml
- examples/frameworks/agno_personal_finance/pyproject.toml
- packages/compat/aiqtoolkit_weave/pyproject.toml
- packages/compat/aiqtoolkit_mem0ai/pyproject.toml
- packages/nvidia_nat_data_flywheel/pyproject.toml
- examples/MCP/simple_calculator_mcp/pyproject.toml
- examples/getting_started/simple_calculator/pyproject.toml
- examples/custom_functions/plot_charts/pyproject.toml
- .github/workflows/pr.yaml
- examples/frameworks/semantic_kernel_demo/pyproject.toml
- ci/scripts/run_ci_local.sh
- examples/advanced_agents/alert_triage_agent/pyproject.toml
- packages/compat/aiqtoolkit_crewai/pyproject.toml
- packages/nvidia_nat_crewai/pyproject.toml
- packages/nvidia_nat_all/pyproject.toml
- examples/frameworks/multi_frameworks/pyproject.toml
- examples/notebooks/first_search_agent/pyproject.toml
- examples/observability/simple_calculator_observability/pyproject.toml
- examples/object_store/user_report/pyproject.toml
- examples/front_ends/simple_calculator_custom_routes/pyproject.toml
- examples/observability/redact_pii/pyproject.toml
- .cursor/rules/nat-setup/nat-toolkit-installation.mdc
- packages/nvidia_nat_mysql/pyproject.toml
- docs/source/quick-start/installing.md
- examples/advanced_agents/profiler_agent/pyproject.toml
- packages/nvidia_nat_phoenix/pyproject.toml
- packages/nvidia_nat_ragaai/pyproject.toml
- packages/compat/aiqtoolkit_agno/pyproject.toml
- packages/compat/aiqtoolkit_zep_cloud/pyproject.toml
- packages/nvidia_nat_test/pyproject.toml
- packages/compat/aiqtoolkit_llama_index/pyproject.toml
- packages/compat/aiqtoolkit_semantic_kernel/pyproject.toml
- examples/RAG/simple_rag/pyproject.toml
- examples/evaluation_and_profiling/simple_calculator_eval/pyproject.toml
- packages/nvidia_nat_langchain/pyproject.toml
- examples/evaluation_and_profiling/simple_web_query_eval/pyproject.toml
- examples/documentation_guides/workflows/text_file_ingest/pyproject.toml
- examples/frameworks/agno_personal_finance/Dockerfile
- packages/nvidia_nat_ingestion/pyproject.toml
- packages/nvidia_nat_opentelemetry/pyproject.toml
- packages/nvidia_nat_llama_index/pyproject.toml
- examples/documentation_guides/workflows/text_file_ingest/src/text_file_ingest/text_file_ingest_function.py
- packages/nvidia_nat_mem0ai/pyproject.toml
- examples/evaluation_and_profiling/email_phishing_analyzer/pyproject.toml
- packages/compat/aiqtoolkit_langchain/pyproject.toml
- packages/nvidia_nat_zep_cloud/pyproject.toml
- packages/nvidia_nat_weave/pyproject.toml
- examples/getting_started/simple_calculator/Dockerfile
- examples/evaluation_and_profiling/email_phishing_analyzer/Dockerfile
- packages/nvidia_nat_profiling/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{py,sh,md,yml,yaml,toml,ini,json,ipynb,txt,rst}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
**/*.{py,sh,md,yml,yaml,toml,ini,json,ipynb,txt,rst}: Every file must start with the standard SPDX Apache-2.0 header; keep copyright years up‑to‑date
All source files must include the SPDX Apache‑2.0 header; do not bypass CI header checks
Files:
packages/compat/aiqtoolkit/pyproject.tomlexamples/HITL/simple_calculator_hitl/pyproject.tomlexamples/front_ends/simple_auth/pyproject.tomlexamples/getting_started/simple_web_query/pyproject.tomlsrc/nat/front_ends/fastapi/fastapi_front_end_config.pyexamples/notebooks/retail_sales_agent/pyproject.tomlpackages/nvidia_nat_redis/pyproject.tomlpackages/nvidia_nat_s3/pyproject.toml
**/*
⚙️ CodeRabbit configuration file
**/*: # Code Review Instructions
- Ensure the code follows best practices and coding standards. - For Python code, follow
PEP 20 and
PEP 8 for style guidelines.- Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
Example:def my_function(param1: int, param2: str) -> bool: pass- For Python exception handling, ensure proper stack trace preservation:
- When re-raising exceptions: use bare
raisestatements to maintain the original stack trace,
and uselogger.error()(notlogger.exception()) to avoid duplicate stack trace output.- When catching and logging exceptions without re-raising: always use
logger.exception()
to capture the full stack trace information.Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any
words listed in the
ci/vale/styles/config/vocabularies/nat/reject.txtfile, words that might appear to be
spelling mistakes but are listed in theci/vale/styles/config/vocabularies/nat/accept.txtfile are OK.Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,
and should contain an Apache License 2.0 header comment at the top of each file.
- Confirm that copyright years are up-to date whenever a file is changed.
Files:
packages/compat/aiqtoolkit/pyproject.tomlexamples/HITL/simple_calculator_hitl/pyproject.tomlexamples/front_ends/simple_auth/pyproject.tomlexamples/getting_started/simple_web_query/pyproject.tomlsrc/nat/front_ends/fastapi/fastapi_front_end_config.pyexamples/notebooks/retail_sales_agent/pyproject.tomlpackages/nvidia_nat_redis/pyproject.tomlpackages/nvidia_nat_s3/pyproject.tomldocker/Dockerfileexamples/getting_started/simple_web_query/Dockerfile
packages/**/*
⚙️ CodeRabbit configuration file
packages/**/*: - This directory contains optional plugin packages for the toolkit, each should contain apyproject.tomlfile. - Thepyproject.tomlfile should declare a dependency onnvidia-nator another package with a name starting
withnvidia-nat-. This dependency should be declared using~=<version>, and the version should be a two
digit version (ex:~=1.0).
- Not all packages contain Python code, if they do they should also contain their own set of tests, in a
tests/directory at the same level as thepyproject.tomlfile.
Files:
packages/compat/aiqtoolkit/pyproject.tomlpackages/nvidia_nat_redis/pyproject.tomlpackages/nvidia_nat_s3/pyproject.toml
examples/**/*
⚙️ CodeRabbit configuration file
examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.
- If an example contains Python code, it should be placed in a subdirectory named
src/and should
contain apyproject.tomlfile. Optionally, it might also contain scripts in ascripts/directory.- If an example contains YAML files, they should be placed in a subdirectory named
configs/. - If an example contains sample data files, they should be placed in a subdirectory nameddata/, and should
be checked into git-lfs.
Files:
examples/HITL/simple_calculator_hitl/pyproject.tomlexamples/front_ends/simple_auth/pyproject.tomlexamples/getting_started/simple_web_query/pyproject.tomlexamples/notebooks/retail_sales_agent/pyproject.tomlexamples/getting_started/simple_web_query/Dockerfile
src/**/*.py
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
src/**/*.py: All importable Python code must live under src/
All public APIs in src/ require Python 3.11+ type hints on parameters and return values; prefer typing/collections.abc abstractions; use typing.Annotated when useful
Provide Google-style docstrings for every public module, class, function, and CLI command; first line concise with a period; surround code entities with backticks
Files:
src/nat/front_ends/fastapi/fastapi_front_end_config.py
src/nat/**/*
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Core functionality under src/nat should prioritize backward compatibility when changed
Files:
src/nat/front_ends/fastapi/fastapi_front_end_config.py
⚙️ CodeRabbit configuration file
This directory contains the core functionality of the toolkit. Changes should prioritize backward compatibility.
Files:
src/nat/front_ends/fastapi/fastapi_front_end_config.py
**/*.py
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
**/*.py: Follow PEP 8/20 style; format with yapf (column_limit=120) and use 4-space indentation; end files with a single newline
Run ruff (ruff check --fix) per pyproject.toml; fix warnings unless explicitly ignored; ruff is linter-only
Use snake_case for functions/variables, PascalCase for classes, and UPPER_CASE for constants
Treat pyright warnings as errors during development
Exception handling: preserve stack traces and avoid duplicate logging
When re-raising exceptions, use bareraiseand log with logger.error(), not logger.exception()
When catching and not re-raising, log with logger.exception() to capture stack trace
Validate and sanitize all user input; prefer httpx with SSL verification and follow OWASP Top‑10
Use async/await for I/O-bound work; profile CPU-heavy paths with cProfile/mprof; cache with functools.lru_cache or external cache; leverage NumPy vectorization when beneficial
Files:
src/nat/front_ends/fastapi/fastapi_front_end_config.py
**/*.{py,md}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Never hard‑code version numbers in code or docs; versions are derived by setuptools‑scm
Files:
src/nat/front_ends/fastapi/fastapi_front_end_config.py
packages/*/pyproject.toml
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
packages/*/pyproject.toml: Each package under packages/ must include a pyproject.toml
Package pyproject.toml must depend on nvidia-nat or a package starting with nvidia-nat- using ~= versions (e.g., ~=1.0)
Files:
packages/nvidia_nat_redis/pyproject.tomlpackages/nvidia_nat_s3/pyproject.toml
🧠 Learnings (1)
📚 Learning: 2025-08-28T23:22:41.742Z
Learnt from: CR
PR: NVIDIA/NeMo-Agent-Toolkit#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-08-28T23:22:41.742Z
Learning: Applies to packages/*/pyproject.toml : Package pyproject.toml must depend on nvidia-nat or a package starting with nvidia-nat- using ~=<two-digit> versions (e.g., ~=1.0)
Applied to files:
packages/compat/aiqtoolkit/pyproject.tomlexamples/front_ends/simple_auth/pyproject.tomlpackages/nvidia_nat_redis/pyproject.tomlpackages/nvidia_nat_s3/pyproject.tomlexamples/getting_started/simple_web_query/Dockerfile
🔇 Additional comments (10)
packages/nvidia_nat_s3/pyproject.toml (2)
26-26: Python 3.13 enablement looks good.Extending to <3.14 matches the PR objective and classifiers below.
24-25: All checks passed for aioboto3 3.13 support and README path
aioboto3 declares “Programming Language :: Python :: 3.13” andsrc/nat/meta/pypi.mdis present—no changes needed.examples/getting_started/simple_web_query/pyproject.toml (1)
9-16: Sanity checks passed for example packaging and FAISS removal. README present, src layout correct, no FAISS references, and no exact-version pins detected.examples/front_ends/simple_auth/pyproject.toml (3)
16-16: Python 3.13 bound LGTM.
requires-python = ">=3.11,<3.14"correctly opens support for 3.13 while keeping a sane upper cap.
21-21: Local editable source mapping LGTM.
[tool.uv.sources]pointing to the monorepo root is consistent for developing the example against the workspace.
12-14: Verify no FAISS transitive dependency via langchain extraNo direct
faiss/faiss-cpureferences were found in our project configs; please confirm thatnvidia-nat[langchain]~=1.3itself doesn’t transitively pull infaissorfaiss-cpu(for example, by inspecting its PyPI metadata or runningpip install nvidia-nat[langchain]~=1.3 && pipdeptree).examples/notebooks/retail_sales_agent/pyproject.toml (1)
22-22: No changes needed to the pandas pin. All of the pinned dependencies (pandas 2.3.x, jupyterlab 4.3.x, notebook 7.3.x, ipykernel 6.29.x, ipywidgets 8.1.x) publish Python 3.13 wheels for both Linux x86_64 and aarch64, so locking pandas to ==2.3.1 is safe.packages/nvidia_nat_redis/pyproject.toml (1)
26-26: Ensure Python 3.13 CI coverage
ci/scripts/run_ci_local.sh sets CI_CONTAINER to Python 3.13, but I didn’t find any.github/workflowsentries for 3.13. Confirm your CI matrix (GitHub Actions or equivalent) runs packages/nvidia_nat_redis’s tests and wheel builds under Python 3.13.src/nat/front_ends/fastapi/fastapi_front_end_config.py (2)
17-18: 3.13 reserved-path support imports — LGTM
osandsysare appropriately added for the cross-version reserved-path check.
36-48: Downstream call sites already handlejob_id=None,reps, and clampedexpiry_seconds.
|
/merge |
Description
is_reserved()Orthogonal:
Closes #72
Closes #179
By Submitting this PR I confirm:
Summary by CodeRabbit
New Features
Refactor
Tests
Chores