- 
                Notifications
    
You must be signed in to change notification settings  - Fork 18
 
          Introduce jmp pkg subcommand for plugin discovery.
          #382
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
          
 Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the  You can disable this status message by setting the  Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File (
 | 
    
          ✅ Deploy Preview for jumpstarter-docs ready!
 To edit notification comments on pull requests, go to your Netlify site configuration.  | 
    
| 
           I think this is failing because of re-ordering of keys in JSON, should we sort alphabetically? @NickCao @mangelajo  | 
    
          
 Sort what?  | 
    
| 
           @NickCao sorting JSON/YAML key names alphabetically to maintain consistency.  | 
    
          
 This can sometimes create ugly outputs, but since python dicts are already unordered, we couldn't do better either.  | 
    
This PR introduces a new subcommand
jmp pkgfor discovering (and eventually managing) all types of plugin packages for Jumpstarter.Currently, the following commands are supported:
jmp pkg list- Lists all locally-installed Jumpstarter plugin packages.jmp pkg show <PACKAGE>- Show Jumpstarter-specific details about a plugin package.Package detection is currently achieved through the
pyproject.tomlentry-pointsfield. Discovery is supported for drivers, driver clients, and adapters. Package authors must specify at least one valid entry point for the package to be discovered.The additional
--inspectflag allows for deeper inspection by usingimportlibandinspectto get additional metadata about the detected entry points. This option is not enabled by default as it may be slow for large package lists and potentially unsafe because it calls the driver'sclient()method to identify the client type name.The following additional information can be inspected:
Future ideas for expansion of
jmp pkg:jmp pkg bake --exporter <EXPORTER>- Create aContainerfileor image based on the packages for an exporter/client.jmp pkg install <PACKAGE>- Attempt to install a package from a custom registry to PyPi.jmp pkg init <NAME>- Template a new driver package.Depends on #386