feat(plugin): Decouple nemo-platform-plugin from nmp-common#145
feat(plugin): Decouple nemo-platform-plugin from nmp-common#145matthewgrossman wants to merge 8 commits into
Conversation
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
| return _extract_validated_fields(validated, raw) | ||
|
|
||
| return _dep | ||
| from nemo_platform_plugin.api.filters import make_filter_obj_dep as make_filter_obj_dep |
There was a problem hiding this comment.
False positive — this is an intentional backward-compat re-export using the import X as X pattern so existing consumers of nmp.common continue to work.
| return f"{effective_registry}/{name}:{effective_tag}" | ||
|
|
||
| return _build | ||
| from nemo_platform_plugin.config import get_qualified_image as get_qualified_image |
There was a problem hiding this comment.
False positive — this is an intentional backward-compat re-export using the import X as X pattern so existing consumers of nmp.common continue to work.
|
|
||
| return _build | ||
| from nemo_platform_plugin.config import get_qualified_image as get_qualified_image | ||
| from nemo_platform_plugin.config import image_builder as image_builder |
There was a problem hiding this comment.
False positive — this is an intentional backward-compat re-export using the import X as X pattern so existing consumers of nmp.common continue to work.
|
- Remove redundant `...` from Protocol methods (docstrings suffice) - Replace global variables with dict-based state to avoid false "unused global variable" warnings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
| return dict(sdk._custom_headers) | ||
|
|
||
|
|
||
| __all__ = [ |
There was a problem hiding this comment.
why do we need this all?
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| class PlatformTaskSDKProvider: |
There was a problem hiding this comment.
more broadly: does this really need to be a TaskSdkProvider? why not just SDKProvider?
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…mgrossman Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
| # Fall back to the built-in default. | ||
| logger.debug("No entry-point task SDK provider found; using DefaultSDKProvider") | ||
| default = DefaultSDKProvider() | ||
| _provider = default |
| logger.debug("No entry-point task SDK provider found; using DefaultSDKProvider") | ||
| default = DefaultSDKProvider() | ||
| _provider = default | ||
| _resolved = True |
Summary
Decouples
nemo-platform-pluginfromnmp-commonso plugin authors only depend on the plugin package.SDKProviderprotocol +DefaultSDKProvider(env-var-based) innemo_platform_plugin.task_sdknmp-commonregisters a richerPlatformSDKProvidervia entry-point, discovered automatically when installedget_qualified_image,image_builder,make_filter_obj_dep,parse_entity_ref, and config classes into the plugin packagenmp.common; backward-compat re-exports remain for servicesnmp.commonimports in pluginsTest plan
SDKProviderprotocol, default provider, entry-point resolution, and provider overrideget_forwarding_headerspre-commit run --all-files --hook-stage pre-pushpassesSigned-off-by: Matthew Grossman mgrossman@nvidia.com
🤖 Generated with Claude Code