feat(cli): add plugin catalog core#618
Conversation
Code Review: PR #618 — feat(cli): add plugin catalog coreSummaryAdds a Overall the PR is well-structured, strictly validated, and thoughtfully tested. Comments below are mostly minor; one high-value item (entry point group constant usage) and a few smaller polish items. FindingsCorrectness
Schema validation
Security
Tests
Style / minor
VerdictApprove with minor requests. The architecture is sound, the schema validation is appropriately strict for a v2 contract freeze, and the test coverage is solid. Action items in priority order:
|
Greptile SummaryThis PR introduces the full plugin catalog CLI infrastructure — tap management, schema v2 validation, install planning (PyPI, Git, local path), and post-install entry-point verification — wired into the existing lazy Typer CLI pattern. All three issues raised in the previous review round have been addressed in subsequent commits.
|
| Filename | Overview |
|---|---|
| packages/data-designer/src/data_designer/cli/plugin_catalog.py | Strict schema v2 validator with exact key matching, PEP 508 cross-validation, duplicate entry_point.name detection, and package-path segment safety checks. Logic is correct throughout. |
| packages/data-designer/src/data_designer/cli/repositories/plugin_tap_repository.py | URL-keyed cache with TTL, GitHub blob/tree normalization with subdirectory support, stale-alias cache cleanup, and safe fallback to stale cache on network failure. All logic reviewed and correct. |
| packages/data-designer/src/data_designer/cli/services/plugin_install_service.py | Correct entry.entry_point.name used in verify_entry_point, importlib.invalidate_caches() called before discovery, path resolution handles the catalog/plugins.json tap root convention correctly. |
| packages/data-designer/src/data_designer/cli/services/plugin_catalog_service.py | Compatibility evaluation correctly uses full version for specifier checks and python_version major.minor for marker evaluation. Compatible entries are preferred before falling back to newest incompatible. |
| packages/data-designer/src/data_designer/cli/controllers/plugin_catalog_controller.py | Previously-flagged unreachable compatibility guard is now fixed: run_install fetches with include_incompatible=True then applies the controller-level --force gate before building the plan. |
| packages/data-designer/src/data_designer/cli/commands/plugins.py | Clean Typer command wrappers with --tap inheritance from parent context and appropriate warnings when parent --tap is ignored by tap-management subcommands. |
| packages/data-designer/src/data_designer/cli/main.py | Lazy Typer registration for plugins and taps subgroups wired correctly; plugins_callback stores --tap on the context for downstream resolution. |
Reviews (6): Last reviewed commit: "fix(cli): verify plugin entry point name..." | Re-trigger Greptile
Add typed catalog and tap models, persistent tap storage, cached catalog loading, compatibility evaluation, install plan generation, and runtime plugin discovery helpers. Refs #617
Wire list, search, info, install, installed, and tap management commands through the existing command-controller CLI pattern. Refs #617
Add regression coverage for tap caching, catalog compatibility, installer command generation, local path resolution, and Typer command delegation. Refs #617
Validate tap catalogs against the schema v2 contract used by NVIDIA-NeMo/DataDesignerPlugins#36, including source union fields, docs URLs, package paths, compatibility metadata, and unique runtime plugin names. Derive Git install targets as package-qualified PEP 508 direct references so git tap entries install the package described by the catalog source metadata. Refs #617
- Invalidate import caches before post-install entry point verification - Make tap aliases case-insensitive and cache catalogs by alias plus URL - Prefer compatible catalog entries before falling back to forced installs - Clarify unused --tap behavior and list installed entry points without imports - Add direct controller coverage and update CLI plugin documentation Refs #617
Fetch install targets before compatibility filtering so the controller owns the final --force decision and the incompatible install guard stays reachable. Refs #617
Apply ruff formatting to the plugin command and tap repository tests so CI format checks pass on the PR merge commit. Refs #617
Key catalog duplicate detection by entry_point.name so distinct catalog entries cannot register the same runtime plugin name. Refs #617
4549bd7 to
3916648
Compare
📋 Summary
This PR adds the Data Designer core CLI support for plugin taps so users can discover, inspect, and install plugins from catalog sources while preserving the existing command-controller-service-repository CLI pattern. It also aligns the core implementation with the schema v2 tap contract from NVIDIA-NeMo/DataDesignerPlugins#36, including strict catalog validation, install-plan rendering, compatibility checks, and post-install entry point verification.
🔗 Related Issue
Closes #617
🔄 Changes
✨ Added
data-designer pluginscommands forlist,search,info,install,installed, andtaps list/add/remove.~/.data-designer/.🔧 Changed
main.py.packaging>=24,<27for version, requirement, specifier, marker, and package-name handling.DATA_DESIGNER_DEFAULT_PLUGIN_TAP_URLfor QA/staging.plugins installedlist entry point metadata without importing plugin modules.🐛 Fixed
🧪 Tests
🔍 Attention Areas
plugin_catalog.py— strict schema v2 validation is the main compatibility boundary with the plugin tap repository.plugin_tap_repository.py— handles URL normalization, remote/local catalog loading, fallback cache behavior, and URL-keyed cache files.plugin_install_service.py— constructs and runs package-manager commands, including the exact Git/path install targets.pyproject.tomlanduv.lock— add and resolve the newpackagingruntime dependency for the CLI package.🧪 Testing
make testpasses — not run; scoped CLI coverage below passedAdditional verification run locally:
uv run ruff check packages/data-designer/src/data_designer/cli packages/data-designer/tests/cliuv run --package data-designer pytest packages/data-designer/tests/cligit diff --checkNVIDIA-NeMo/DataDesignerPluginsPR fix: pulling default provider name from default config file and use it #36 raw catalog SHA0c378546ad1d3bc7e24f0673d558f91a72ae9ce5✅ Checklist