Skip to content

Conversation

@nv-mhaselton
Copy link
Contributor

@nv-mhaselton nv-mhaselton commented Jan 8, 2026

Update external applications tutorial with recently added fetch_holohub_operator PATCH_COMMAND and DEPTH parameters.

Summary by CodeRabbit

  • Documentation
    • Added optional parameters to control repository fetch depth (shallow vs full history) and to run a post-checkout patch command
    • Expanded examples showing full-history fetches, using the patch command, and combining parameters (including disabling Python)
    • Added a section explaining when full history is required to apply patches from older commits

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

Documentation updated to extend fetch_holohub_operator with DEPTH and PATCH_COMMAND options, add parameter descriptions, multiple usage examples (including DEPTH 0 and PATCH_COMMAND), and a new "Applying Patches to Operators" section.

Changes

Cohort / File(s) Summary
Documentation: fetch_holohub_operator reference
tutorials/holohub_operators_external_applications/README.md
Updated function signature to fetch_holohub_operator(... [DEPTH depth] ... [PATCH_COMMAND command]); added DEPTH and PATCH_COMMAND parameter descriptions; added examples demonstrating DEPTH 0, PATCH_COMMAND, and combined usage; added "Applying Patches to Operators" section noting history requirements for some patches.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • jjomier
  • wyli
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: updating documentation for new parameters in fetch_holohub_operator.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a192fe and 79db958.

📒 Files selected for processing (1)
  • tutorials/holohub_operators_external_applications/README.md
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-12-18T16:19:45.117Z
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-18T16:19:45.117Z
Learning: Applies to **/operators/**/CMakeLists.txt : CMakeLists.txt for operators must use 'add_holohub_operator()' with optional 'DEPENDS EXTENSIONS' for dependent extensions

Applied to files:

  • tutorials/holohub_operators_external_applications/README.md
📚 Learning: 2025-12-18T16:19:45.117Z
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-18T16:19:45.117Z
Learning: Applies to **/applications/**/CMakeLists.txt : CMakeLists.txt for applications must use 'add_holohub_application()' with optional 'DEPENDS OPERATORS' for dependent operators

Applied to files:

  • tutorials/holohub_operators_external_applications/README.md
📚 Learning: 2025-12-18T16:19:45.117Z
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-18T16:19:45.117Z
Learning: Applies to **/pkg/CMakeLists.txt : CMakeLists.txt for packages must use 'add_holohub_package()' function with optional APPLICATIONS and OPERATORS dependencies

Applied to files:

  • tutorials/holohub_operators_external_applications/README.md
📚 Learning: 2025-12-18T16:19:45.117Z
Learnt from: CR
Repo: nvidia-holoscan/holohub PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-18T16:19:45.117Z
Learning: Applies to **/workflows/**/CMakeLists.txt : CMakeLists.txt for workflows must use 'add_holohub_application()' with optional 'DEPENDS OPERATORS' for dependent operators

Applied to files:

  • tutorials/holohub_operators_external_applications/README.md
🔇 Additional comments (3)
tutorials/holohub_operators_external_applications/README.md (3)

193-193: Function signature and parameter documentation look good.

The signature updates are clear and the new parameter descriptions are helpful. The git apply pattern shown in the PATCH_COMMAND examples aligns with standard CMake practices for applying patches.

Also applies to: 201-203


219-237: Well-structured examples with clear progression.

The examples effectively demonstrate usage from simple (single parameter) to complex (multiple combined parameters). The chained patch syntax (lines 235-236 with &&) is a practical touch.


429-447: Solid addition with practical guidance.

The new "Applying Patches to Operators" section clearly explains the PATCH_COMMAND usage and the note about needing full git history for patches from older commits is helpful context for users.


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.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Updated external applications tutorial with two new fetch_holohub_operator parameters: DEPTH and PATCH_COMMAND.

Key changes:

  • Added DEPTH parameter to function signature (line 193) and parameter list (line 201) - allows controlling git clone depth (default 1 for shallow clone, 0 for full history)
  • Added PATCH_COMMAND parameter to function signature (line 193) and parameter list (line 203) - enables applying custom patches after checkout
  • Included new example showing patch application (lines 222-223)
  • Added comprehensive "Applying Patches to Operators" section (lines 415-433) with practical examples and usage notes
  • All documentation changes align perfectly with the actual implementation in cmake/FetchHolohubOperator.cmake

Confidence Score: 5/5

  • This PR is safe to merge with no risk - pure documentation update
  • Documentation-only change that accurately reflects the implementation in FetchHolohubOperator.cmake. The new parameters (DEPTH and PATCH_COMMAND) are correctly documented with proper syntax, clear explanations, and practical examples. No code changes, no breaking changes, no security concerns.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tutorials/holohub_operators_external_applications/README.md 5/5 Documentation updated to include DEPTH and PATCH_COMMAND parameters with clear examples and usage notes

Sequence Diagram

sequenceDiagram
    participant User as Developer
    participant CMake as CMakeLists.txt
    participant Fetch as fetch_holohub_operator()
    participant Git as Git Repository
    participant Patch as PATCH_COMMAND

    User->>CMake: Configure build with fetch_holohub_operator()
    CMake->>Fetch: Call with OPERATOR_NAME and optional parameters
    
    alt With DEPTH parameter
        Fetch->>Git: Clone with specified depth (default=1, 0=full)
        Git-->>Fetch: Repository cloned
    else Without DEPTH parameter
        Fetch->>Git: Shallow clone (depth=1)
        Git-->>Fetch: Repository cloned
    end
    
    Fetch->>Git: Sparse checkout operator files
    Git-->>Fetch: Operator files checked out
    
    alt With PATCH_COMMAND
        Fetch->>Patch: Execute custom patch command
        Patch->>Git: Apply patches to cloned files
        Git-->>Patch: Patches applied
        Patch-->>Fetch: Patching complete
    end
    
    Fetch-->>CMake: Operator fetched and ready
    CMake-->>User: Build configured successfully
Loading

Copy link
Collaborator

@steple steple left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

All the examples in the documentation show how one single parameter is used. A "summary example" combining all parameters would be the cherry on top.

@nv-mhaselton nv-mhaselton force-pushed the mhaselton/doc-fetch-operator-patch-cmd branch from c61144d to 6a192fe Compare January 8, 2026 18:15
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Updated the external applications tutorial to document two new parameters for the fetch_holohub_operator() function:

  • DEPTH: Controls git clone depth (defaults to 1 for shallow clone, use 0 for full history)
  • PATCH_COMMAND: Allows executing custom commands after checkout to apply patches

Key changes:

  • Updated function signature documentation with the new parameters
  • Added practical examples showing individual and combined parameter usage
  • Created new "Applying Patches to Operators" section explaining when full git history is needed for patches
  • All documentation accurately reflects the implementation in cmake/FetchHolohubOperator.cmake

The documentation is comprehensive, well-structured, and provides clear guidance on when and how to use these new features.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it only updates documentation to reflect existing functionality
  • Documentation-only change that accurately describes newly implemented features. Verified against source implementation in cmake/FetchHolohubOperator.cmake. All examples are syntactically correct and follow established patterns. No code changes, no functional risks.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tutorials/holohub_operators_external_applications/README.md 5/5 Added documentation for DEPTH and PATCH_COMMAND parameters with clear examples and usage notes

Sequence Diagram

sequenceDiagram
    participant User as Developer
    participant CMake as CMakeLists.txt
    participant FHO as fetch_holohub_operator()
    participant Git as Git Repository
    participant Operator as Holohub Operator

    User->>CMake: Define project with new parameters
    CMake->>FHO: fetch_holohub_operator(OPERATOR_NAME<br/>DEPTH depth<br/>PATCH_COMMAND command)
    FHO->>Git: Clone with specified DEPTH
    alt DEPTH = 0
        Git->>FHO: Full git history
    else DEPTH = 1 (default)
        Git->>FHO: Shallow clone
    end
    FHO->>Git: Sparse checkout operator
    Git->>FHO: Operator files
    alt PATCH_COMMAND specified
        FHO->>Operator: Execute PATCH_COMMAND
        Operator->>FHO: Apply patches
    end
    FHO->>CMake: Operator ready
    CMake->>User: Build complete
Loading

@tbirdso tbirdso requested a review from a team January 8, 2026 18:34
@bhashemian
Copy link
Member

Thanks @nv-mhaselton for updating this doc. Could you please address the DCO issue in the CI?

@nv-mhaselton nv-mhaselton force-pushed the mhaselton/doc-fetch-operator-patch-cmd branch from 6a192fe to 79db958 Compare January 8, 2026 19:12
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR updates the external applications tutorial documentation to reflect two newly added parameters to the fetch_holohub_operator() function: DEPTH and PATCH_COMMAND.

Key changes:

  • Updated function signature to include DEPTH and PATCH_COMMAND parameters
  • Added parameter descriptions explaining that DEPTH controls git clone depth (default 1 for shallow, 0 for full history) and PATCH_COMMAND enables post-checkout command execution
  • Expanded examples section with usage scenarios for both new parameters, including a comprehensive multi-parameter example
  • Added new "Applying Patches to Operators" section with practical guidance on when full history is needed for patch application

The documentation changes are accurate, complete, and align perfectly with the underlying implementation in FetchHolohubOperator.cmake. All examples are syntactically correct and demonstrate proper CMake usage patterns.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it contains only documentation updates
  • Score reflects that this is a documentation-only change with accurate information verified against the implementation, clear examples, and no code modifications that could introduce bugs
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tutorials/holohub_operators_external_applications/README.md 5/5 Added documentation for DEPTH and PATCH_COMMAND parameters with clear examples and usage guidance

Sequence Diagram

sequenceDiagram
    participant User as Developer
    participant CMake as CMakeLists.txt
    participant Fetch as FetchHolohubOperator
    participant Git as Git Repository
    participant Patch as Patch Command

    User->>CMake: Configure project with fetch_holohub_operator()
    CMake->>Fetch: Call with OPERATOR_NAME, DEPTH, PATCH_COMMAND
    
    alt DEPTH specified
        Fetch->>Git: Clone with --depth flag (or full history if DEPTH=0)
    else Default behavior
        Fetch->>Git: Clone with --depth 1 (shallow clone)
    end
    
    Git-->>Fetch: Repository cloned
    Fetch->>Git: Sparse checkout operator path
    Git-->>Fetch: Operator files checked out
    
    alt PATCH_COMMAND provided
        Fetch->>Patch: Execute custom patch command
        Patch->>Git: Apply patches (e.g., git apply)
        Git-->>Patch: Patches applied
        Patch-->>Fetch: Patch complete
    end
    
    Fetch-->>CMake: Operator fetched and patched
    CMake->>CMake: Add operator to build
    CMake-->>User: Project configured successfully
Loading

@bhashemian bhashemian merged commit 01c540b into nvidia-holoscan:main Jan 8, 2026
11 checks passed
@github-project-automation github-project-automation bot moved this to Done in Holohub Jan 8, 2026
@nv-mhaselton nv-mhaselton deleted the mhaselton/doc-fetch-operator-patch-cmd branch January 8, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants