Skip to content

Conversation

@willkill07
Copy link
Member

@willkill07 willkill07 commented Oct 2, 2025

Description

Cleans up the default configuration + workflow template a little more

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features
    • None
  • Refactor
    • Simplified generated workflow configuration by removing redundant logging and frontend blocks and a deprecated retry option.
    • Aligned workflow registration naming to a consistent convention.
  • Documentation
    • Added comprehensive docstrings to the workflow and helper to improve clarity and editor hints.
  • Chores
    • Cleaned up default config output to reduce noise and simplify generated templates.

@willkill07 willkill07 requested a review from a team as a code owner October 2, 2025 17:23
@coderabbitai
Copy link

coderabbitai bot commented Oct 2, 2025

Walkthrough

Removed logging and front_end blocks and a retry setting from the workflow config template; added docstrings and switched FunctionInfo.description to use the inner function's docstring; updated the register template to import the workflow symbol suffixed with _function.

Changes

Cohort / File(s) Summary of Changes
Workflow template configuration
src/nat/cli/commands/workflow/templates/config.yml.j2
Removed top-level logging.console and front_end blocks and removed workflow.parse_agent_response_max_retries; preserved existing functions, nim_llm, and workflow fields.
Workflow template code
src/nat/cli/commands/workflow/templates/workflow.py.j2
Added comprehensive docstrings to the public workflow function and its inner _echo helper; updated FunctionInfo.from_fn to derive the description from _echo.__doc__ instead of a hardcoded string.
Workflow registration template
src/nat/cli/commands/workflow/templates/register.py.j2
Changed import to use a relative import and to import the symbol named {{ python_safe_workflow_name }}_function (added _function suffix) instead of {{ python_safe_workflow_name }}.

Sequence Diagram(s):

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title accurately describes the scope of the changes and is within the character limit, but it uses the noun “cleanup” rather than the imperative verb form required by the project’s title conventions. Please rephrase the title in imperative mood, for example: “chore: clean up workflow templates” to align with the repository’s conventions.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@willkill07 willkill07 added improvement Improvement to existing functionality non-breaking Non-breaking change labels Oct 2, 2025
Copy link

@coderabbitai coderabbitai bot left a 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 (1)
src/nat/cli/commands/workflow/templates/workflow.py.j2 (1)

1-1: Add Apache License 2.0 header.

The file is missing the required Apache License 2.0 header comment at the top. This is required by the coding guidelines for all code files except .mdc files.

Add the Apache License 2.0 header at the top of the file:

+# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import logging

As per coding guidelines.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8becf6 and 7bfb9a5.

📒 Files selected for processing (2)
  • src/nat/cli/commands/workflow/templates/config.yml.j2 (0 hunks)
  • src/nat/cli/commands/workflow/templates/workflow.py.j2 (1 hunks)
💤 Files with no reviewable changes (1)
  • src/nat/cli/commands/workflow/templates/config.yml.j2
🧰 Additional context used
📓 Path-based instructions (2)
src/nat/**/*

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Changes in src/nat should prioritize backward compatibility

Files:

  • src/nat/cli/commands/workflow/templates/workflow.py.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/workflow.py.j2
**/*

⚙️ 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 raise statements to maintain the original stack trace,
      and use logger.error() (not logger.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.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file 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:

  • src/nat/cli/commands/workflow/templates/workflow.py.j2
⏰ 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 (2)
src/nat/cli/commands/workflow/templates/workflow.py.j2 (2)

23-33: LGTM!

The added docstring clearly describes the function's purpose, arguments, and return value. It provides helpful context about the registration mechanism and follows Google-style docstring conventions.


48-50: LGTM!

Using _echo.__doc__ to dynamically source the description is a good practice. It maintains the DRY principle and ensures the description always matches the function's docstring, improving maintainability.

@willkill07 willkill07 changed the title chore: additional template cleanup chore: additional workflow template cleanup Oct 2, 2025
@willkill07 willkill07 force-pushed the wkk_template-update branch from 75d3f22 to 9db2545 Compare October 2, 2025 17:58
Copy link

@coderabbitai coderabbitai bot left a 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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bfb9a5 and 9db2545.

📒 Files selected for processing (3)
  • src/nat/cli/commands/workflow/templates/config.yml.j2 (0 hunks)
  • src/nat/cli/commands/workflow/templates/register.py.j2 (1 hunks)
  • src/nat/cli/commands/workflow/templates/workflow.py.j2 (1 hunks)
💤 Files with no reviewable changes (1)
  • src/nat/cli/commands/workflow/templates/config.yml.j2
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/nat/cli/commands/workflow/templates/workflow.py.j2
🧰 Additional context used
📓 Path-based instructions (2)
src/nat/**/*

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Changes in src/nat should prioritize backward compatibility

Files:

  • src/nat/cli/commands/workflow/templates/register.py.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/register.py.j2
**/*

⚙️ 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 raise statements to maintain the original stack trace,
      and use logger.error() (not logger.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.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file 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:

  • src/nat/cli/commands/workflow/templates/register.py.j2
🔇 Additional comments (1)
src/nat/cli/commands/workflow/templates/register.py.j2 (1)

4-4: Verify backward compatibility for symbol name change.
The import in register.py.j2 now references {{ python_safe_workflow_name }}_function instead of {{ python_safe_workflow_name }}. Confirm existing generated workflows won’t break by ensuring the old symbol is still exported or aliased, or that migration docs cover this change.

Run:

#!/bin/bash
# Check exported symbols in the registration template
rg -n "^(def |__all__|from .* import)" src/nat/cli/commands/workflow/templates/register.py.j2

Signed-off-by: Will Killian <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
src/nat/cli/commands/workflow/templates/register.py.j2 (1)

1-2: The Apache License 2.0 header is still missing.

This concern was raised in a previous review and remains unaddressed. Per coding guidelines, all code files (including Jinja2 templates that generate code) must include the Apache License 2.0 header at the top.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9db2545 and 657ea50.

📒 Files selected for processing (1)
  • src/nat/cli/commands/workflow/templates/register.py.j2 (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/nat/**/*

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Changes in src/nat should prioritize backward compatibility

Files:

  • src/nat/cli/commands/workflow/templates/register.py.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/register.py.j2
**/*

⚙️ 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 raise statements to maintain the original stack trace,
      and use logger.error() (not logger.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.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file 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:

  • src/nat/cli/commands/workflow/templates/register.py.j2

Copy link
Contributor

@zhongxuanwang-nv zhongxuanwang-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Will!!

@willkill07
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 81a9194 into NVIDIA:release/1.3 Oct 2, 2025
17 checks passed
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request Oct 2, 2025
Cleans up the default configuration + workflow template a little more

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

## Summary by CodeRabbit

- New Features
  - None
- Refactor
  - Simplified generated workflow configuration by removing redundant logging and frontend blocks and a deprecated retry option.
  - Aligned workflow registration naming to a consistent convention.
- Documentation
  - Added comprehensive docstrings to the workflow and helper to improve clarity and editor hints.
- Chores
  - Cleaned up default config output to reduce noise and simplify generated templates.

Authors:
  - Will Killian (https://github.com/willkill07)

Approvers:
  - Eric Evans II (https://github.com/ericevans-nv)

URL: NVIDIA#899
Signed-off-by: Yuchen Zhang <[email protected]>
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request Oct 2, 2025
Cleans up the default configuration + workflow template a little more

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.



## Summary by CodeRabbit

- New Features
  - None
- Refactor
  - Simplified generated workflow configuration by removing redundant logging and frontend blocks and a deprecated retry option.
  - Aligned workflow registration naming to a consistent convention.
- Documentation
  - Added comprehensive docstrings to the workflow and helper to improve clarity and editor hints.
- Chores
  - Cleaned up default config output to reduce noise and simplify generated templates.

Authors:
  - Will Killian (https://github.com/willkill07)

Approvers:
  - Eric Evans II (https://github.com/ericevans-nv)

URL: NVIDIA#899
Signed-off-by: Yuchen Zhang <[email protected]>
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request Oct 2, 2025
Cleans up the default configuration + workflow template a little more

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.



## Summary by CodeRabbit

- New Features
  - None
- Refactor
  - Simplified generated workflow configuration by removing redundant logging and frontend blocks and a deprecated retry option.
  - Aligned workflow registration naming to a consistent convention.
- Documentation
  - Added comprehensive docstrings to the workflow and helper to improve clarity and editor hints.
- Chores
  - Cleaned up default config output to reduce noise and simplify generated templates.

Authors:
  - Will Killian (https://github.com/willkill07)

Approvers:
  - Eric Evans II (https://github.com/ericevans-nv)

URL: NVIDIA#899
Signed-off-by: Yuchen Zhang <[email protected]>
@willkill07 willkill07 deleted the wkk_template-update branch October 23, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants