Skip to content

📚 API reference Guide made from contributing guide, where the …#1419

Open
megnvidia wants to merge 3 commits intonvidia-holoscan:mainfrom
megnvidia:mmiranda-AI-API-ref-from-contributingguide
Open

📚 API reference Guide made from contributing guide, where the …#1419
megnvidia wants to merge 3 commits intonvidia-holoscan:mainfrom
megnvidia:mmiranda-AI-API-ref-from-contributingguide

Conversation

@megnvidia
Copy link
Copy Markdown
Collaborator

@megnvidia megnvidia commented Feb 21, 2026

FOR TESTING PURPOSES ONLY!
PLEASE DO NOT REVIEW NOR MERGE THIS PR! THANKS!

…file was aware of the API reference created from the migration guide

I can try a version next week that would be without the API reference created from the migration guide.

With no main Sphinx guide there are many ways to manage this content. There is no best. There are just multiple very good options.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added comprehensive API reference documentation covering metadata schema, build system patterns, directory structure conventions, naming guidelines, CLI commands, and testing approaches for all contribution types.

…file was aware of the API reference created from the migration guide

Signed-off-by: meg miranda <mmiranda@nvidia.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 21, 2026

Greptile Summary

This PR adds a new API_REFERENCE.md file at the repository root, intended as a quick-reference companion to CONTRIBUTING.md. It covers metadata schema structure and ranking levels, path placeholders, CMake build system patterns, directory layout conventions, naming guidelines, CLI commands, and testing approaches for all contribution types.

Key findings:

  • All five schema file links in the "Schema Locations" table are broken — they reference paths like workflows/metadata.schema.json but the actual schema files live under utilities/metadata/ with different filenames (e.g., utilities/metadata/workflow.schema.json). Contributors following these links will get 404s.
  • The utilities/cli/CLI_REFERENCE.md link (lines 256 and 326) also has a casing mismatch with the actual file utilities/cli/cli_reference.md on a case-sensitive filesystem — this has been noted in prior review threads.
  • All other referenced files (CONTRIBUTING.md, README.md, doc/developer.md, operators/deidentification/pixelator/test_pixelator.py) exist at the indicated paths.

Confidence Score: 4/5

Safe to merge once the five broken schema file links are corrected to point to utilities/metadata/.

One P1 finding: all schema links in the Schema Locations table are broken and will confuse contributors. The fix is straightforward — update the five paths. All other content is accurate and well-structured.

API_REFERENCE.md — the Schema Locations table (lines 26–30) needs corrected paths.

Important Files Changed

Filename Overview
API_REFERENCE.md New API reference documentation file covering metadata schema, build system, directory structure, naming conventions, CLI commands, and testing. All five schema file links in the Schema Locations table point to incorrect paths — actual schema files are under utilities/metadata/ not in the contribution-type root directories.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[API_REFERENCE.md] --> B[Metadata Reference]
    A --> C[Build System Reference]
    A --> D[Directory Structure Reference]
    A --> E[Naming Conventions]
    A --> F[CLI Command Reference]
    A --> G[Testing Reference]

    B --> B1["Schema Locations - broken links"]
    B --> B2[metadata.json Structure]
    B --> B3[Ranking Levels]

    B1 -->|"should point to"| B1a["utilities/metadata/*.schema.json"]

    C --> C1[Operators CMakeLists]
    C --> C2[GXF Extensions CMakeLists]
    C --> C3[Applications CMakeLists]
    C --> C4[Packages CMakeLists]

    F --> F1["utilities/cli/cli_reference.md"]
    G --> G1["pytest + CTest"]
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into mmiranda-AI-API..." | Re-trigger Greptile

Copy link
Copy Markdown
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.

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 21, 2026

Walkthrough

A new comprehensive API reference documentation file is added that details the HoloHub metadata schema structure, path placeholder resolution, CMake build patterns, directory conventions, naming guidelines, CLI commands, and testing approaches across different contribution types.

Changes

Cohort / File(s) Summary
Documentation
API_REFERENCE.md
New comprehensive documentation file covering metadata.json schema, build system references, directory structure conventions, naming conventions, CLI commands, and testing guidelines for HoloHub contributors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'API reference Guide made from contributing guide' is directly related to the main change, which is the addition of API_REFERENCE.md documentation. It accurately reflects the primary objective.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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


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
Copy Markdown
Contributor

@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: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@API_REFERENCE.md`:
- Around line 323-328: The referenced file utilities/cli/CLI_REFERENCE.md is
missing and linked from the "CLI Command Reference" section and the "See Also"
list; either add the missing CLI_REFERENCE.md file with the CLI command docs or
remove/replace both broken links. Locate the two link occurrences (the link text
or path utilities/cli/CLI_REFERENCE.md in the CLI Command Reference section and
the See Also list) and either create the new markdown file under utilities/cli
with the appropriate CLI content, or update both references to point to an
existing CLI doc (e.g., utilities/cli/README.md or README.md) or remove the
entries so no broken links remain.
- Around line 161-167: The example call to add_holohub_package contains a typo:
the package name is written as my_packager but should match the surrounding
examples and be my_package; update the identifier in the
add_holohub_package(...) invocation to my_package (refer to the
add_holohub_package call and the package identifier symbol my_packager) so the
documentation consistently uses my_package.
- Around line 20-34: Update the requirement sentence that references
metadata.json to include workflows, GXF extensions, and tutorials (in addition
to applications and operators) and expand the "metadata.json Structure
(Overview)" to list the correct root keys for each contribution type: use
"application", "operator", "workflow", "gxf_extension", and "tutorial" (matching
the directories referenced by workflows/metadata.schema.json,
gxf_extensions/metadata.schema.json, and tutorials/metadata.schema.json); ensure
the wording around metadata.json and the schema table consistently documents
which root key to use for each schema type.
- Around line 304-319: Update the example tests to use the defensive import
pattern used in test_pixelator.py: replace the direct import of BaseOperator
(currently `from holoscan.core import Operator, _Operator as BaseOperator`) with
a try/except that first tries `from holoscan.core import BaseOperator` and falls
back to `from holoscan.core import _Operator as BaseOperator`; keep any import
of Operator (for Operator.OperatorType.NATIVE) as-is so test_my_operator_init
still checks operator_type and test_my_operator_invalid_param still raises
ValueError for invalid_param on MyOperatorOp.
- Around line 87-96: Update the documentation table in API_REFERENCE.md to
separate plain workdir placeholder names (used in the "workdir" field) from
command path placeholders (used inside command strings with angle brackets),
i.e., list holohub_bin, holohub_app_bin, holohub_app_source as workdir values
(without angle brackets) and list <holohub_bin>, <holohub_app_bin>,
<holohub_app_source>, <holohub_data_dir> as command path placeholders; also
remove holohub_data_dir from the workdir column and correct the holohub_app_bin
example path from "<holohub_root>/build/myapp/applications/myapp/cpp" to
"<holohub_root>/build/applications/myapp/cpp" so the examples align with how
metadata.json uses "workdir" and "command".

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
@bhashemian bhashemian changed the title mmiranda API reference Guide made from contributing guide, where the … 📚 API reference Guide made from contributing guide, where the … Feb 25, 2026
@bhashemian bhashemian marked this pull request as draft March 9, 2026 14:39
@bhashemian
Copy link
Copy Markdown
Member

Closing as it is getting outdated with all the updates to holohub and holoscan ecosystem. please feel free to submit a new PR if needed. Thanks

@bhashemian bhashemian closed this Mar 30, 2026
@github-project-automation github-project-automation Bot moved this to Done in Holohub Mar 30, 2026
@bhashemian bhashemian reopened this Apr 1, 2026
@bhashemian bhashemian marked this pull request as ready for review April 1, 2026 01:14
Copilot AI review requested due to automatic review settings April 1, 2026 01:14
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated AI review comments for PR #1419.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new top-level documentation page (API_REFERENCE.md) intended to serve as a quick reference for contributors on metadata schema usage, build integration, directory layout, naming conventions, CLI commands, and testing practices.

Changes:

  • Added a consolidated API/reference guide covering metadata.json schemas and common fields.
  • Documented path placeholder conventions used by the CLI/run tooling.
  • Summarized CMake integration patterns, contribution directory structure, CLI commands, and testing guidance.

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated AI review comments for PR #1419.

Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated AI review comments for PR #1419.

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

  1. Fix broken links to missing utilities/cli/CLI_REFERENCE.md
  • File/line: API_REFERENCE.md:256 and API_REFERENCE.md:326
  • Issue: The doc links to utilities/cli/CLI_REFERENCE.md, but that file does not exist, so the links are broken.
  • Action: Either add utilities/cli/CLI_REFERENCE.md (preferred if it’s meant to be the canonical CLI docs) or update/remove both references to point at an existing CLI doc (e.g., utilities/cli/README.md if present).
  • Source: greptile-apps[bot] (comment id 2835568534, 2835568564), coderabbitai[bot] (comment id 2835573431)
  1. Clarify metadata.json supported contribution types + root keys
  • File/line: API_REFERENCE.md:20-34 (also overlaps the sentence around API_REFERENCE.md:34-38)
  • Issue: The text implies only applications/operators are covered and only application/operator root keys exist, but the repo also has schemas/metadata for other contribution types (e.g., workflows, tutorials, GXF extensions; and possibly benchmark depending on repo policy).
  • Action: Update the requirement statement and “Root key …” description to explicitly list the supported contribution types and their root keys, or clearly scope the section to only app/operator if that’s intentional.
  • Source: coderabbitai[bot] (comment id 2835573420), Copilot (comment id 3019244551)
  1. Document requirements (not dependencies) and align the example snippet with the schema
  • File/line: API_REFERENCE.md:47 and API_REFERENCE.md:52-56
  • Issue: Documentation calls out a top-level dependencies, but the schemas and existing metadata use/require a requirements object (e.g., requirements.operators, requirements.gxf_extensions). The example snippet also omits requirements, making it fail schema validation when copy/pasted.
  • Action: Replace/rename the dependencies row to requirements and add at least a minimal requirements object in the example snippet.
  • Source: Copilot (comment id 3019244580, 3019244637)
  1. Adjust tags documentation to match website tooling behavior
  • File/line: API_REFERENCE.md:45
  • Issue: Docs say tags are free-form, but doc-site tooling treats the first tag as the category used for filtering/navigation.
  • Action: Note that the first tag is the category and should match the approved category list (if that policy is intended), while additional tags can remain free-form.
  • Source: Copilot (comment id 3019244614)
  1. Relax/clarify version field requirements to match schema + existing metadata
  • File/line: API_REFERENCE.md:41-42
  • Issue: Docs state strict major.minor.patch, but existing metadata uses shorter forms like 1.0, and the schema regex is looser.
  • Action: Update wording to “SemVer recommended” (not required) or otherwise align documentation with actual accepted version strings.
  • Source: Copilot (comment id 3019244660)
  1. Fix typo in add_holohub_package example (my_packagermy_package)
  • File/line: API_REFERENCE.md:164 (within the block around 161-167)
  • Issue: Example uses my_packager once, but the rest of the section uses my_package, which is confusing when copying the snippet.
  • Action: Change add_holohub_package(my_packager to add_holohub_package(my_package.
  • Source: coderabbitai[bot] (comment id 2835573428), Copilot (comment id 3019244593)
  1. Separate workdir values vs command string placeholders; fix holohub_app_bin example path
  • File/line: API_REFERENCE.md:87-96
  • Issue: The table conflates:
    • workdir values (plain identifiers like holohub_bin), and
    • placeholders embedded in commands (angle-bracketed like <holohub_data_dir>).
      It also incorrectly implies holohub_data_dir is a valid workdir value, and the holohub_app_bin example path includes an extra/duplicated segment.
  • Action: Split documentation into (a) valid workdir values and (b) valid command placeholders, remove holohub_data_dir from workdir, and correct the holohub_app_bin example path to <holohub_root>/build/applications/myapp/cpp.
  • Source: coderabbitai[bot] (comment id 2835573424)
  1. Document missing supported CMake dependency options (DEPENDS OPERATORS / DEPENDS EXTENSIONS, optional markers)
  • File/line: API_REFERENCE.md:113 and API_REFERENCE.md:127-131
  • Issue: add_holohub_operator docs only mention DEPENDS EXTENSIONS, but the helper supports DEPENDS OPERATORS too. add_holohub_application supports more than DEPENDS OPERATORS (e.g., DEPENDS EXTENSIONS and optional operator dependencies via an OPTIONAL marker).
  • Action: Expand these sections/examples to list both dependency forms and mention optional dependencies where supported.
  • Source: Copilot (comment id 3019244642, 3019244648)
  1. Update test example imports to use the defensive BaseOperator / _Operator fallback pattern
  • File/line: API_REFERENCE.md:307 (within the example block around 304-319)
  • Issue: Example directly imports _Operator as BaseOperator, but the referenced real test uses a try/except fallback to support Holoscan versions where BaseOperator exists.
  • Action: Update the example to:
    • try importing BaseOperator,
    • fall back to _Operator as BaseOperator,
    • keep Operator import as needed.
  • Source: coderabbitai[bot] (comment id 2835573429), Copilot (comment id 3019244625)

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments for API_REFERENCE.md

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
@bhashemian
Copy link
Copy Markdown
Member

/consolidate

2 similar comments
@bhashemian
Copy link
Copy Markdown
Member

/consolidate

@bhashemian
Copy link
Copy Markdown
Member

/consolidate

Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments after deduplicating overlapping AI feedback.

Comment thread API_REFERENCE.md

## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Broken documentation link: utilities/cli/CLI_REFERENCE.md is referenced here but the file does not exist in the repository. Either create this documentation file or update the reference to point to an existing CLI documentation file (for example utilities/cli/README.md). The same issue also appears later in this file (around line 326), so both references should be fixed together to avoid broken links.

Source: 2835568534, 2835568564, 2835573431

Comment thread API_REFERENCE.md
Comment on lines +20 to +34
Every application and operator must have a `metadata.json` that describes features and dependencies. Contribution-specific schemas define the exact fields.

### Schema Locations

| Type | Schema path |
|------|-------------|
| Workflows | [workflows/metadata.schema.json](workflows/metadata.schema.json) |
| Applications | [applications/metadata.schema.json](applications/metadata.schema.json) |
| GXF Extensions | [gxf_extensions/metadata.schema.json](gxf_extensions/metadata.schema.json) |
| Operators | [operators/metadata.schema.json](operators/metadata.schema.json) |
| Tutorials | [tutorials/metadata.schema.json](tutorials/metadata.schema.json) |

### metadata.json Structure (Overview)

Root key is `application` or `operator` depending on contribution type. Main fields:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The metadata documentation appears incomplete/inconsistent with the repository schemas. The text currently implies only application and operator are valid root keys, but the repo defines additional contribution types and schemas (e.g., workflow, tutorial, benchmark, gxf_extension). Please update the description to list all supported root keys and clarify that each contribution type must provide a metadata.json using the appropriate root key.

Source: 2835573420, 3019244551

Comment thread API_REFERENCE.md
| `platforms` | array | for example `["x86_64", "aarch64"]` |
| `tags` | array | Free-form tags (for example `["Endoscopy", "Video Encoding"]`) |
| `ranking` | number | Self-assessment level 0–5; see [Ranking levels](#ranking-levels-for-metadatajson) |
| `dependencies` | object | for example `operators: [{ name, version }]` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The table documents a dependencies top-level field, but the repository schemas and existing metadata.json files use a requirements object instead (e.g., requirements.operators, requirements.gxf_extensions). Please update the documentation to use requirements and describe its structure so the example matches the JSON schemas.

Source: 3019244580

Comment thread API_REFERENCE.md
| `changelog` | object | Keys are versions (for example `"X.X"`), values are short change descriptions |
| `holoscan_sdk` | object | `minimum_required_version`, `tested_versions` (array) |
| `platforms` | array | for example `["x86_64", "aarch64"]` |
| `tags` | array | Free-form tags (for example `["Endoscopy", "Video Encoding"]`) |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The tags description says tags are free-form, but repository tooling treats the first tag as the category used for documentation filtering/navigation. Consider documenting that the first tag must correspond to an approved category (e.g., from .github/copilot-instructions.md) while additional tags may remain free-form.

Source: 3019244614

Comment thread API_REFERENCE.md
| `name` | string | Explicit name of the application or operator |
| `authors` | array | Objects with `name` and `affiliation` |
| `language` | string | `C++`, `Python`, or `GXF`; use one directory per language if multiple |
| `version` | string | Semantic version: `major.minor.patch` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The version field is documented as strict major.minor.patch, but many existing metadata files in the repository use shorter forms such as 1.0, and the JSON schema appears less strict than full SemVer. Consider updating the description to clarify that major.minor.patch is recommended but shorter forms like 1.0 are accepted.

Source: 3019244660

Comment thread API_REFERENCE.md
Comment on lines +87 to +96
In `metadata.json`, the `workdir` for the run command can be one of these. They are resolved at build/run time:

| Placeholder | Meaning |
|-------------|---------|
| `holohub_app_bin` | Directory containing the built application binary (for example `<holohub_root>/build/myapp/applications/myapp/cpp`) |
| `holohub_app_source` | Application source directory (for example `<holohub_root>/applications/myapp/cpp/`) |
| `holohub_bin` | Root build directory (for example `<holohub_root>/build/`) |
| `holohub_data_dir` | Data directory (for example `<holohub_root>/data/`) |

Use `<holohub_data_dir>` in the run `command` for data paths (for example `--data <holohub_data_dir>/mydata`).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The placeholder table mixes two different concepts: (1) values used for the workdir field and (2) placeholders embedded in command strings (with angle brackets). In actual metadata.json usage, workdir uses plain names (e.g., "workdir": "holohub_app_bin") while command strings use placeholders like <holohub_app_bin> or <holohub_data_dir>. Consider splitting the documentation into two sections (valid workdir values vs. command placeholders) and removing holohub_data_dir from the workdir list. Also correct the holohub_app_bin example path to <holohub_root>/build/applications/myapp/cpp.

Source: 2835573424

Comment thread API_REFERENCE.md
```

- `my_operator`: operator target name (matches directory under `operators/`).
- `DEPENDS EXTENSIONS` (optional): list of GXF extension targets this operator wraps; build system will build them first.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

add_holohub_operator supports dependency declarations for both extensions and operators (DEPENDS EXTENSIONS and DEPENDS OPERATORS), but this section only documents DEPENDS EXTENSIONS. Consider updating the description to include both supported dependency types so contributors are aware of the full capability.

Source: 3019244642

Comment thread API_REFERENCE.md
Comment on lines +127 to +131
```cmake
add_holohub_application(my_application DEPENDS OPERATORS my_operator1 my_operator2)
```

- `DEPENDS OPERATORS` (optional): operator targets required by this application.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation for add_holohub_application currently mentions only DEPENDS OPERATORS, but the build helpers also support DEPENDS EXTENSIONS and optional dependencies (via the OPTIONAL marker). Consider expanding the description or example so contributors know these options are available.

Source: 3019244648

Comment thread API_REFERENCE.md
Comment on lines +161 to +164
**Package registration** (in `./pkg/CMakeLists.txt`):

```cmake
add_holohub_package(my_packager
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo in the example: add_holohub_package(my_packager ...) is inconsistent with the surrounding examples that use my_package. This likely should be add_holohub_package(my_package ...) to avoid confusion when users copy the example.

Source: 2835573428, 3019244593

Comment thread API_REFERENCE.md
Comment on lines +304 to +307
```python
import pytest
from .my_operator import MyOperatorOp
from holoscan.core import Operator, _Operator as BaseOperator
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The example test imports _Operator directly (from holoscan.core import Operator, _Operator as BaseOperator), but the reference implementation (operators/deidentification/pixelator/test_pixelator.py) uses a defensive import to support multiple Holoscan versions. Consider updating the example to the compatibility pattern:

try:
    from holoscan.core import Operator, BaseOperator
except ImportError:
    from holoscan.core import Operator, _Operator as BaseOperator

This avoids giving contributors a brittle import pattern.

Source: 2835573429, 3019244625

@bhashemian bhashemian requested review from a team and bhashemian April 2, 2026 14:56
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments from AI analyses.

Comment thread API_REFERENCE.md

## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation references utilities/cli/CLI_REFERENCE.md, but this file does not appear to exist in the repository. Please either add the missing file or update the link to point to the correct existing documentation. This same broken reference also appears later in the file (e.g., line 326) and should be fixed consistently.

Source: 2835568534, 2835568564

Comment thread API_REFERENCE.md
Comment on lines +161 to +167
**Package registration** (in `./pkg/CMakeLists.txt`):

```cmake
add_holohub_package(my_packager
APPLICATIONS my_app1
OPERATORS my_op1 my_op2)
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There appears to be a typo in the example add_holohub_package call. The package name is written as my_packager, while the surrounding documentation consistently uses my_package. Consider updating the example for consistency:

add_holohub_package(my_package APPLICATIONS my_app1 OPERATORS my_op1 my_op2)

Source: 2835573428

Comment thread API_REFERENCE.md
Comment on lines +304 to +319
```python
import pytest
from .my_operator import MyOperatorOp
from holoscan.core import Operator, _Operator as BaseOperator

def test_my_operator_init(fragment):
op = MyOperatorOp(fragment=fragment, name="myoperator_op", tensor_name="image")
assert isinstance(op, BaseOperator)
assert op.operator_type == Operator.OperatorType.NATIVE

def test_my_operator_invalid_param(fragment):
with pytest.raises(ValueError):
MyOperatorOp(fragment=fragment, tensor_name="image", invalid_param=-1)
```

Reference implementations: for example `operators/deidentification/pixelator/test_pixelator.py` and `conftest.py` for fixtures.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The example test code imports BaseOperator differently from the pattern used in existing tests such as operators/deidentification/pixelator/test_pixelator.py. To maintain compatibility with different holoscan.core versions, consider using the defensive import pattern used in the repository:

try:
from holoscan.core import BaseOperator
except ImportError:
from holoscan.core import _Operator as BaseOperator

Keeping the example aligned with the repository’s test patterns will make the documentation more robust to API differences across versions.

Source: 2835573429

Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments from AI analyses.

Comment thread API_REFERENCE.md

## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation references utilities/cli/CLI_REFERENCE.md, but this file does not appear to exist in the repository. Please either add the missing file or update the link to point to the correct existing documentation. This same broken reference also appears later in the file (e.g., line 326) and should be fixed consistently.

Source: 2835568534, 2835568564

Comment thread API_REFERENCE.md
Comment on lines +161 to +167
**Package registration** (in `./pkg/CMakeLists.txt`):

```cmake
add_holohub_package(my_packager
APPLICATIONS my_app1
OPERATORS my_op1 my_op2)
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There appears to be a typo in the example add_holohub_package call. The package name is written as my_packager, while the surrounding documentation consistently uses my_package. Consider updating the example for consistency:

add_holohub_package(my_package APPLICATIONS my_app1 OPERATORS my_op1 my_op2)

Source: 2835573428

Comment thread API_REFERENCE.md
Comment on lines +304 to +319
```python
import pytest
from .my_operator import MyOperatorOp
from holoscan.core import Operator, _Operator as BaseOperator

def test_my_operator_init(fragment):
op = MyOperatorOp(fragment=fragment, name="myoperator_op", tensor_name="image")
assert isinstance(op, BaseOperator)
assert op.operator_type == Operator.OperatorType.NATIVE

def test_my_operator_invalid_param(fragment):
with pytest.raises(ValueError):
MyOperatorOp(fragment=fragment, tensor_name="image", invalid_param=-1)
```

Reference implementations: for example `operators/deidentification/pixelator/test_pixelator.py` and `conftest.py` for fixtures.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The example test code imports BaseOperator differently from the pattern used in existing tests such as operators/deidentification/pixelator/test_pixelator.py. To maintain compatibility with different holoscan.core versions, consider using the defensive import pattern used in the repository:

try:
from holoscan.core import BaseOperator
except ImportError:
from holoscan.core import _Operator as BaseOperator

Keeping the example aligned with the repository’s test patterns will make the documentation more robust to API differences across versions.

Source: 2835573429

Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments from AI analyses.

Comment thread API_REFERENCE.md

## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation references utilities/cli/CLI_REFERENCE.md, but this file does not appear to exist in the repository. Please either add the missing file or update the link to point to the correct existing documentation. This same broken reference also appears later in the file (e.g., line 326) and should be fixed consistently.

Source: 2835568534, 2835568564

Comment thread API_REFERENCE.md
Comment on lines +161 to +167
**Package registration** (in `./pkg/CMakeLists.txt`):

```cmake
add_holohub_package(my_packager
APPLICATIONS my_app1
OPERATORS my_op1 my_op2)
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There appears to be a typo in the example add_holohub_package call. The package name is written as my_packager, while the surrounding documentation consistently uses my_package. Consider updating the example for consistency:

add_holohub_package(my_package APPLICATIONS my_app1 OPERATORS my_op1 my_op2)

Source: 2835573428

Comment thread API_REFERENCE.md
Comment on lines +304 to +319
```python
import pytest
from .my_operator import MyOperatorOp
from holoscan.core import Operator, _Operator as BaseOperator

def test_my_operator_init(fragment):
op = MyOperatorOp(fragment=fragment, name="myoperator_op", tensor_name="image")
assert isinstance(op, BaseOperator)
assert op.operator_type == Operator.OperatorType.NATIVE

def test_my_operator_invalid_param(fragment):
with pytest.raises(ValueError):
MyOperatorOp(fragment=fragment, tensor_name="image", invalid_param=-1)
```

Reference implementations: for example `operators/deidentification/pixelator/test_pixelator.py` and `conftest.py` for fixtures.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The example test code imports BaseOperator differently from the pattern used in existing tests such as operators/deidentification/pixelator/test_pixelator.py. To maintain compatibility with different holoscan.core versions, consider using the defensive import pattern used in the repository:

try:
from holoscan.core import BaseOperator
except ImportError:
from holoscan.core import _Operator as BaseOperator

Keeping the example aligned with the repository’s test patterns will make the documentation more robust to API differences across versions.

Source: 2835573429

Comment thread API_REFERENCE.md

## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation references utilities/cli/CLI_REFERENCE.md, but this file does not appear to exist in the repository. Please verify the path. If the CLI reference is intended, consider adding the file or updating the link to point to the correct existing documentation location.

Source: 2835568534

Comment thread API_REFERENCE.md
Comment on lines +20 to +34
Every application and operator must have a `metadata.json` that describes features and dependencies. Contribution-specific schemas define the exact fields.

### Schema Locations

| Type | Schema path |
|------|-------------|
| Workflows | [workflows/metadata.schema.json](workflows/metadata.schema.json) |
| Applications | [applications/metadata.schema.json](applications/metadata.schema.json) |
| GXF Extensions | [gxf_extensions/metadata.schema.json](gxf_extensions/metadata.schema.json) |
| Operators | [operators/metadata.schema.json](operators/metadata.schema.json) |
| Tutorials | [tutorials/metadata.schema.json](tutorials/metadata.schema.json) |

### metadata.json Structure (Overview)

Root key is `application` or `operator` depending on contribution type. Main fields:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The description of metadata.json requirements appears incomplete. The text currently mentions only applications and operators and lists root keys application and operator, but the repository also contains other contribution types (e.g., workflows, GXF extensions, and tutorials). Consider updating this section to clarify that each contribution type requires a metadata.json, and document the corresponding root keys (e.g., application, operator, workflow, gxf_extension, tutorial) so contributors for all types know which schema and root key to use.

Source: 2835573420

Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Consolidated review comments for the pull request.

Comment thread API_REFERENCE.md
Comment on lines +323 to +328
## See Also

- [CONTRIBUTING.md](CONTRIBUTING.md) — Contribution workflow, checklists, and guidelines
- [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md) — Full HoloHub CLI reference
- [README.md](README.md) — Project overview and glossary
- [doc/developer.md](doc/developer.md) — Advanced developer guide
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Broken link reference to utilities/cli/CLI_REFERENCE.md. The file does not exist in the repository but is referenced in the documentation (including this section and another earlier occurrence around line 256). This will lead to dead documentation links. Either add the missing utilities/cli/CLI_REFERENCE.md file with the intended CLI documentation, or update/remove the references to point to an existing document (for example utilities/cli/README.md if that is the correct location).

Source: 2835573431

@bhashemian bhashemian requested review from a team and bhashemian April 2, 2026 19:13
@bhashemian bhashemian assigned bhashemian and unassigned bhashemian Apr 2, 2026
@bhashemian bhashemian requested review from a team and Copilot and removed request for a team April 2, 2026 19:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.

Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
Comment thread API_REFERENCE.md
@bhashemian bhashemian assigned bhashemian and unassigned bhashemian Apr 2, 2026
@bhashemian bhashemian requested a review from Copilot April 2, 2026 19:28
Copy link
Copy Markdown
Member

@bhashemian bhashemian left a comment

Choose a reason for hiding this comment

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

Could you please address the consolidated comments below? Thanks!

Comment thread API_REFERENCE.md
Comment on lines +20 to +34
Every application and operator must have a `metadata.json` that describes features and dependencies. Contribution-specific schemas define the exact fields.

### Schema Locations

| Type | Schema path |
|------|-------------|
| Workflows | [workflows/metadata.schema.json](workflows/metadata.schema.json) |
| Applications | [applications/metadata.schema.json](applications/metadata.schema.json) |
| GXF Extensions | [gxf_extensions/metadata.schema.json](gxf_extensions/metadata.schema.json) |
| Operators | [operators/metadata.schema.json](operators/metadata.schema.json) |
| Tutorials | [tutorials/metadata.schema.json](tutorials/metadata.schema.json) |

### metadata.json Structure (Overview)

Root key is `application` or `operator` depending on contribution type. Main fields:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The documentation of metadata.json is incomplete and may mislead contributors. The text states that the root key is application or operator, but the repository supports additional contribution types. Please update the description to include all supported root keys and ensure the requirement statement reflects all contribution categories (applications, operators, workflows, GXF extensions, tutorials, and benchmarks if applicable). For example, clarify that the root key must be one of: application, operator, workflow, tutorial, benchmark, or gxf_extension, and ensure the surrounding explanation consistently reflects these contribution types.

Source: 2835573420, 3029922104

Comment thread API_REFERENCE.md
Comment on lines +26 to +30
| Workflows | [workflows/metadata.schema.json](workflows/metadata.schema.json) |
| Applications | [applications/metadata.schema.json](applications/metadata.schema.json) |
| GXF Extensions | [gxf_extensions/metadata.schema.json](gxf_extensions/metadata.schema.json) |
| Operators | [operators/metadata.schema.json](operators/metadata.schema.json) |
| Tutorials | [tutorials/metadata.schema.json](tutorials/metadata.schema.json) |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The schema links in this table appear to point to paths that do not exist. The repository’s metadata schemas are located under utilities/metadata/ (e.g., utilities/metadata/application.schema.json, workflow.schema.json, operator.schema.json, tutorial.schema.json, gxf_extension.schema.json, benchmark.schema.json). Please update the table links to reference the correct paths so contributors can navigate to the actual schema files.

Source: 3029922061

Comment thread API_REFERENCE.md
Comment on lines +38 to +41
| `name` | string | Explicit name of the application or operator |
| `authors` | array | Objects with `name` and `affiliation` |
| `language` | string | `C++`, `Python`, or `GXF`; use one directory per language if multiple |
| `version` | string | Semantic version: `major.minor.patch` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The example describes language as a string, but existing metadata.json files and the schema allow it to be either a string or an array (e.g., ["C++", "Python"]). Please clarify in the documentation that language may be a single string or a list when multiple languages are used.

Source: 3029922129

Comment thread API_REFERENCE.md
Comment on lines +161 to +167
**Package registration** (in `./pkg/CMakeLists.txt`):

```cmake
add_holohub_package(my_packager
APPLICATIONS my_app1
OPERATORS my_op1 my_op2)
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There appears to be a typo in the add_holohub_package example: the package name is written as my_packager, while surrounding examples and documentation consistently use my_package. Please update the example so the identifier is consistent.

Source: 2835573428

Comment thread API_REFERENCE.md
├── metadata.json # Required; operator schema
├── README.md # Required
├── your_operator_name.py | .cpp | .hpp
├── test_your_operator_name.py # Required for Python operators
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The directory tree marks test_<operator>.py as "Required for Python operators", but project guidance elsewhere describes Python operator unit tests as strongly encouraged rather than strictly required. Please align the wording here with the actual policy to avoid confusing contributors (e.g., mark it as "Strongly encouraged for Python operators").

Source: 3029922139

Comment thread API_REFERENCE.md
Comment on lines +254 to +257
## CLI Command Reference

Commands used in the contribution workflow. For full options and behavior, see [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The link to the CLI reference uses utilities/cli/CLI_REFERENCE.md, but the file in the repository is utilities/cli/cli_reference.md (lowercase). On case-sensitive filesystems this will result in a broken link. Please update the link target to the correct filename.

Source: 2835568534, 3029922119

Comment thread API_REFERENCE.md
## See Also

- [CONTRIBUTING.md](CONTRIBUTING.md) — Contribution workflow, checklists, and guidelines
- [utilities/cli/CLI_REFERENCE.md](utilities/cli/CLI_REFERENCE.md) — Full HoloHub CLI reference
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This link again references utilities/cli/CLI_REFERENCE.md, but the actual file is utilities/cli/cli_reference.md (lowercase). Please update the link to the correct filename to prevent 404s on case-sensitive filesystems.

Source: 2835568564, 3029922151

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread API_REFERENCE.md
Comment on lines +52 to +70
```json
"application": {
"name": "my_application",
"authors": [{ "name": "Your Name", "affiliation": "Your Organization" }],
"language": "C++",
"version": "1.0.0",
"holoscan_sdk": {
"minimum_required_version": "0.6.0",
"tested_versions": ["0.6.0"]
},
"platforms": ["x86_64", "aarch64"],
"tags": ["Video"],
"ranking": 2,
"run": {
"command": "./myapplication --data <holohub_data_dir>/mydata",
"workdir": "holohub_app_bin"
}
}
```
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The example metadata.json snippet is missing fields that are required by the current metadata schemas/validator (notably changelog and requirements). As written, contributors who copy this snippet will fail utilities/metadata/metadata_validator.py validation; please update the snippet to include all required keys for an application/operator.

Copilot uses AI. Check for mistakes.
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