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
20 changes: 20 additions & 0 deletions packages/nemo_platform/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ nemo-agents-example-calculator = [
# Generated from [tool.bundle-package]; do not edit by hand.
nemo-agents-plugin = [
"nemo-platform-plugin",
"nemo-deployments-plugin",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"nemo-optimization-plugin",
"nemo-agents-example-calculator",
"nvidia-nat-core>=1.9.0a20260811,<1.10",
Expand Down Expand Up @@ -280,6 +281,16 @@ nemo-data-designer-plugin = [
"pandas",
]

# Generated from [tool.bundle-package]; do not edit by hand.
nemo-deployments-plugin = [
"fastapi>=0.115",
"httpx>=0.27",
"nemo-platform-sdk",
"nemo-platform-plugin",
"pydantic>=2.10.6",
"pyyaml>=6.0",
]

# Generated from [tool.bundle-package]; do not edit by hand.
nemo-eval-author-plugin = [
"pydantic>=2",
Expand Down Expand Up @@ -479,6 +490,7 @@ plugins = [
"nemo-platform[nemo-anonymizer-plugin]",
"nemo-platform[nemo-auditor-plugin]",
"nemo-platform[nemo-data-designer-plugin]",
"nemo-platform[nemo-deployments-plugin]",
"nemo-platform[nemo-eval-author-plugin]",
"nemo-platform[nemo-evaluator-plugin]",
"nemo-platform[nemo-experimentalist-plugin]",
Expand Down Expand Up @@ -572,6 +584,7 @@ platform = "nmp.common.client_factory:PlatformNemoClientProvider"
[project.entry-points."nemo.controllers"]
agents-deployment = "nemo_agents_plugin.runner.controller:AgentDeploymentController"
insights-analysis = "nemo_insights_plugin.controller:InsightsAnalysisController"
deployments = "nemo_deployments_plugin.controller:DeploymentsController"

# Generated from [tool.bundle-package]; do not edit this table by hand.
[project.entry-points."nemo.docs"]
Expand Down Expand Up @@ -619,6 +632,10 @@ nemo-switchyard = "nemo_switchyard.middleware:SwitchyardMiddleware"
optuna = "nemo_optimization.backends.optuna.backend:OptunaBackend"
ga = "nemo_optimization.backends.ga.backend:GaBackend"

# Generated from [tool.bundle-package]; do not edit this table by hand.
[project.entry-points."nemo.sandbox_profiles"]
openshell = "nemo_deployments_plugin.backends.openshell.sandbox_profile:PROFILE"

# Generated from [tool.bundle-package]; do not edit this table by hand.
[project.entry-points."nemo.sdk"]
agents = "nemo_agents_plugin.sdk:agents_sdk_resources"
Expand Down Expand Up @@ -646,6 +663,7 @@ auditor = "nemo_auditor.service:AuditorPluginService"
data-designer = "nemo_data_designer_plugin.service:DataDesignerService"
evaluator = "nemo_evaluator.service:EvaluatorPluginService"
insights = "nemo_insights_plugin.service:InsightsService"
deployments = "nemo_deployments_plugin.service:DeploymentsService"

# Generated from [tool.bundle-package]; do not edit this table by hand.
[project.entry-points."nemo.skills"]
Expand All @@ -659,6 +677,7 @@ platform = "nemo_platform.skills:skills_dir"
safe-synthesizer = "nemo_safe_synthesizer_plugin.skills:get_skills_path"
experimentalist = "nemo_experimentalist_plugin.skills:skills_dir"
insights = "nemo_insights_plugin.skills:skills_dir"
deployments = "nemo_deployments_plugin.skills:skills_dir"
[tool.uv.sources]
nemo-platform-sdk = { workspace = true }
nemo-platform-ext = { workspace = true }
Expand Down Expand Up @@ -710,6 +729,7 @@ nemo-agents-plugin = { source = "../../plugins/nemo-agents/src/nemo_agents_plugi
nemo-anonymizer-plugin = { source = "../../plugins/nemo-anonymizer/src/nemo_anonymizer_plugin", module = "nemo_anonymizer_plugin", inherit = { "entry-points" = ["nemo.*"] } }
nemo-auditor-plugin = { source = "../../plugins/nemo-auditor/src/nemo_auditor", module = "nemo_auditor", inherit = { "entry-points" = ["nemo.*"] } }
nemo-data-designer-plugin = { source = "../../plugins/nemo-data-designer/src/nemo_data_designer_plugin", module = "nemo_data_designer_plugin", inherit = { "entry-points" = ["nemo.*"] } }
nemo-deployments-plugin = { source = "../../plugins/nemo-deployments/src/nemo_deployments_plugin", module = "nemo_deployments_plugin", inherit = { "entry-points" = ["nemo.*"] } }
# Eval Author, Experimentalist, and Insights ship together: Experimentalist imports
# EvalAuthor and EvalAuthorConfig at module scope, Eval Author still borrows
# Experimentalist helpers, and both read the Insights profile contract. Bundling all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

_DEPLOYMENTS_PLUGIN_IMPORT_ERROR = (
"The deployments_plugin models backend requires the nemo-deployments-plugin "
"package. Install it (or include the deployments plugin in your platform "
"profile) before setting models.controller.backends.deployments_plugin.enabled."
'package. Install the complete platform distribution with `pip install "nemo-platform[all]"` '
"before setting models.controller.backends.deployments_plugin.enabled."
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ def mock_import(name: str, *args: object, **kwargs: object) -> object:

with (
patch("builtins.__import__", side_effect=mock_import),
pytest.raises(ImportError, match="nemo-deployments-plugin"),
pytest.raises(ImportError, match=r'pip install "nemo-platform\[all\]"'),
):
_resolve_backend_class("deployments_plugin", backend_classes)

with (
patch("builtins.__import__", side_effect=mock_import),
pytest.raises(ImportError, match="nemo-deployments-plugin"),
pytest.raises(ImportError, match=r'pip install "nemo-platform\[all\]"'),
):
BackendRegistry.from_config(
nmp_sdk=mock_nmp_sdk,
Expand Down
31 changes: 31 additions & 0 deletions tests/unit/test_wrapper_distribution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Regression tests for the published ``nemo-platform`` wrapper distribution."""

import tomllib
from pathlib import Path

ROOT = Path(__file__).parent.parent.parent


def test_all_extra_bundles_default_deployments_backend() -> None:
"""The backend enabled by the packaged config must ship in ``nemo-platform[all]``."""
Comment thread
anastasia-nesterenko marked this conversation as resolved.
pyproject_path = ROOT / "packages/nemo_platform/pyproject.toml"
with open(pyproject_path, "rb") as pyproject:
wrapper = tomllib.load(pyproject)

project = wrapper["project"]
bundle = wrapper["tool"]["bundle-package"]["nemo-deployments-plugin"]

assert bundle["inherit"]["entry-points"] == ["nemo.*"]
assert bundle["module"] == "nemo_deployments_plugin"
assert (pyproject_path.parent / bundle["source"]).resolve().is_dir()
assert "nemo-platform[services]" in project["optional-dependencies"]["all"]
assert "nemo-platform[plugins]" in project["optional-dependencies"]["services"]
assert "nemo-platform[nemo-deployments-plugin]" in project["optional-dependencies"]["plugins"]
assert "nemo-deployments-plugin" in project["optional-dependencies"]
assert project["entry-points"]["nemo.services"]["deployments"].startswith("nemo_deployments_plugin.")
assert project["entry-points"]["nemo.controllers"]["deployments"].startswith("nemo_deployments_plugin.")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
assert project["entry-points"]["nemo.sandbox_profiles"]["openshell"].startswith("nemo_deployments_plugin.")
assert project["entry-points"]["nemo.skills"]["deployments"].startswith("nemo_deployments_plugin.")
Loading
Loading