Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Per-repo wrappers install this package and delegate to `holoscan`, layering on t
| [HoloHub](https://github.com/nvidia-holoscan/holohub) | `./holohub` | source-project metadata search paths, container/workspace names |
| [I4H Workflows](https://github.com/isaac-for-healthcare/i4h-workflows) | `./i4h` | RTI DDS license auto-download + mount, TTY serial device passthrough |

Common env vars: `HOLOSCAN_CLI_ROOT` (repo root), `HOLOSCAN_CLI_SEARCH_PATH` (subdirs to scan for `metadata.json`), `HOLOSCAN_CLI_PATH_PREFIX` (placeholder prefix in metadata templates), `HOLOSCAN_CLI_REPO_PREFIX` (container image name prefix). The legacy `HOLOHUB_*` spelling is no longer honored in v1 — set the `HOLOSCAN_CLI_*` names directly. `holoscan env-info` lists every env var the CLI reads in the current shell.
Common env vars: `HOLOSCAN_CLI_ROOT` (repo root), `HOLOSCAN_CLI_SEARCH_PATH` (subdirs to scan for `metadata.json`), `HOLOSCAN_CLI_PATH_PREFIX` (placeholder prefix in metadata templates), `HOLOSCAN_CLI_REPO_PREFIX` (container image name prefix). The legacy `HOLOHUB_*` spelling is no longer honored since holoscan v4.3.0 — set the `HOLOSCAN_CLI_*` names directly. `holoscan env-info` lists every env var the CLI reads in the current shell.

## Source layout

Expand Down Expand Up @@ -149,4 +149,16 @@ the workflow badges at the top of this page.

### HAP/MAP application packaging

Application packaging (HAP/MAP) is no longer part of this CLI: `holoscan nics` and the `monai-deploy` console script are intentionally not provided. The current `holoscan package` command is for building Holoscan Module distribution artifacts; it is not the legacy HAP/MAP application packager. The pre-v1 `holoscan run` was the HAP/MAP packaged-image runner; in v1 the same name now drives the HoloHub-style source-project runner, so it no longer launches packaged images. Developers that still rely on HAP/MAP packaging should pin `holoscan-cli<=4.2.0`, the last release that shipped that interface, or migrate to the Holoscan SDK packaging workflows directly. See [issue #164](https://github.com/nvidia-holoscan/holoscan-cli/issues/164) for the deprecation timeline.
Application packaging (HAP/MAP) is no longer part of this CLI: `holoscan nics`
and the `monai-deploy` console script are intentionally not provided. The current
`holoscan package` command is for building Holoscan Module distribution artifacts;
it is not the legacy HAP/MAP application packager. Before holoscan v4.3.0,
`holoscan run` was the HAP/MAP packaged-image runner; since v4.3.0 the same name
now drives the HoloHub-style source-project runner, so it no longer launches
packaged images. Developers that still rely on HAP/MAP packaging should pin both
`holoscan-cli<=4.2.0`, the last CLI release that shipped that interface, and
`holoscan<=4.2.0`, because the legacy package command depends on the artifacts
JSON manifest and was only tested with those SDK versions. Otherwise, migrate to
the Holoscan SDK packaging workflows directly. See
[issue #164](https://github.com/nvidia-holoscan/holoscan-cli/issues/164) for the
deprecation timeline.
14 changes: 7 additions & 7 deletions src/holoscan_cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@

LOG_LEVELS = ["DEBUG", "INFO", "WARN", "ERROR", "CRITICAL"]

# Subcommands removed in the source-project v1 cut. Mapped to a one-line note
# Subcommands removed since holoscan v4.3.0. Mapped to a one-line note
# explaining what each one did, so users typing the old command get a specific
# message instead of argparse's generic "invalid choice". Note: the pre-v1
# `holoscan run` was the HAP/MAP packaged-image runner; in v1 the same name is
# reused for the HoloHub-style source-project runner, so it is not listed here.
# message instead of argparse's generic "invalid choice". Note: the pre-4.3.0
# `holoscan run` was the HAP/MAP packaged-image runner; since v4.3.0 the same
# name is reused for the HoloHub-style source-project runner, so it is not listed here.
REMOVED_COMMANDS: dict[str, str] = {
"nics": "the HAP NIC diagnostic command",
}

REMOVED_COMMAND_FOOTER = (
"Removed HAP/MAP commands are out of scope for holoscan-cli v1. Pin "
"holoscan-cli<=4.2.0 if you still need that legacy command surface."
"Removed HAP/MAP commands are not available since holoscan v4.3.0. Pin "
"holoscan-cli<=4.2.0 and holoscan<=4.2.0 if you still need that legacy command surface."
)


Expand Down Expand Up @@ -179,7 +179,7 @@ def _exit_if_removed_command(argv: list[str]) -> None:
return
program = _program_name(argv)
print(
f"Error: '{program} {command}' was removed in holoscan-cli v1 — "
f"Error: '{program} {command}' was removed since holoscan v4.3.0 — "
f"{REMOVED_COMMANDS[command]} is no longer shipped.\n"
f"{REMOVED_COMMAND_FOOTER}",
file=sys.stderr,
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ def test_main_rejects_removed_commands(self, argv, command, capsys):
# Exit 2 matches argparse's convention for unknown subcommands.
assert excinfo.value.code == 2
err = capsys.readouterr().err
assert f"'holoscan {command}' was removed" in err
assert "Removed HAP/MAP commands are out of scope" in err
assert f"'holoscan {command}' was removed since holoscan v4.3.0" in err
assert "Removed HAP/MAP commands are not available since holoscan v4.3.0" in err
assert "holoscan-cli<=4.2.0 and holoscan<=4.2.0" in err

def test_main_with_log_level(self):
mock_args = MagicMock()
Expand Down
Loading