Skip to content

refactor(plugins): re-route nmp.common job imports (ASTD-166)#43

Merged
marcusds merged 1 commit into
mainfrom
astd-166-re-route-plugin-nmp-common-imports-to-nemo-platform-plugin/mschwab
May 26, 2026
Merged

refactor(plugins): re-route nmp.common job imports (ASTD-166)#43
marcusds merged 1 commit into
mainfrom
astd-166-re-route-plugin-nmp-common-imports-to-nemo-platform-plugin/mschwab

Conversation

@marcusds
Copy link
Copy Markdown
Contributor

Summary

Phase A of slimming nmp-common in plugin installs (ASTD-166, follow-up to ASTD-165).

  • Swap nmp.common.jobs.{constants,exceptions} imports to direct nemo_platform_plugin.jobs.{constants,exceptions} imports. nmp.common re-exports these unchanged — routing through it is dead indirection.
  • Tighten NemoJob.to_spec / NemoJob.compile base signatures: async_sdk: objectasync_sdk: AsyncNeMoPlatform. Resolves Liskov override violations every concrete subclass previously hit. nemo-platform-plugin already depends on nemo-platform-sdk so the new import has no cycle.
  • Cast async_sdk=None in test_scheduler.py's NotImplementedError guard test (base raises before reading the arg).

No install-footprint change — plugins still depend on nmp-common for image.get_qualified_image + sdk_factory.get_platform_sdk. Phase B (move get_qualified_image into nemo_platform_plugin.jobs.image) and Phase C (add slim get_platform_sdk to nemo_platform_plugin) will move those + drop the dep entirely. Estimated 50-70 MB per plugin install once complete.

Test plan

  • uv run --frozen ty check <touched files> — All checks passed
  • Full-repo ty check count: 183 → 181 (net -2, no new errors elsewhere)
  • uv run --frozen pytest packages/nemo_platform_plugin/tests plugins/nemo-anonymizer/tests plugins/nemo-data-designer/tests — 772 passed, 1 skipped
  • pre-commit hooks (ruff format / ty / copyright headers) green

@marcusds marcusds requested review from a team as code owners May 25, 2026 23:47
@marcusds marcusds changed the title refactor(plugins): re-route nmp.common job imports + tighten NemoJob async_sdk (ASTD-166) refactor(plugins): re-route nmp.common job imports (ASTD-166) May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18248/24195 75.4% 61.9%
Integration Tests 11668/22977 50.8% 25.9%

…async_sdk (ASTD-166)

Phase A of slimming nmp-common in plugin installs.

- Swap nmp.common.jobs.{constants,exceptions} imports to direct
  nemo_platform_plugin.jobs.{constants,exceptions} imports. nmp.common
  re-exports these unchanged; routing through it is dead indirection.

- Tighten NemoJob.to_spec / NemoJob.compile signatures: async_sdk
  changes from `object` to `AsyncNeMoPlatform`. Resolves Liskov
  override violations every concrete subclass was previously hitting
  (subclasses tighten to AsyncNeMoPlatform). nemo-platform-plugin
  already depends on nemo-platform-sdk so the import has no cycle.

- Cast async_sdk=None in test_scheduler.py's NotImplementedError guard
  test (base raises before reading the arg).

No install-footprint change — plugins still depend on nmp-common for
image.get_qualified_image + sdk_factory.get_platform_sdk. Phase B/C
will move those.

Signed-off-by: mschwab <mschwab@nvidia.com>
@marcusds marcusds force-pushed the astd-166-re-route-plugin-nmp-common-imports-to-nemo-platform-plugin/mschwab branch from 70e5bd6 to 42a1c79 Compare May 26, 2026 03:57
@marcusds marcusds added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit faa842a May 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants