-
Notifications
You must be signed in to change notification settings - Fork 2
8 plugin api #9
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
8 plugin api #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a comprehensive plugin API to the poly-lithic framework and refactors the CLI to use click instead of argparse. It introduces dynamic plugin discovery through entry points, improves loading times, and adds a subcommand structure with run
and plugin
commands for better usability.
Key changes:
- Added plugin API with dynamic loading via entry points
- Refactored CLI from argparse to click with subcommands
- Added plugin project generator with Jinja2 templates
- Updated module registries to use standard dictionaries instead of lazy loaders
Reviewed Changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
poly_lithic/src/utils/plugin_registry.py |
Core plugin registry system enabling dynamic plugin discovery and loading |
poly_lithic/src/cli.py |
Complete CLI refactor from argparse to click with subcommands and better UX |
poly_lithic/src/utils/plugin_generator.py |
Plugin project generator using Jinja2 templates |
poly_lithic/templates/plugin/*.j2 |
Template files for generating plugin projects |
poly_lithic/src/transformers/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
poly_lithic/src/interfaces/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
poly_lithic/src/model_utils/__init__.py |
Simplified from lazy loader to direct dictionary-based registry |
tests/test_plugin_registry.py |
Comprehensive test suite for plugin registry functionality |
pyproject.toml |
Updated dependencies and entry points for new CLI structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…m failing on github
Added a plugin API and refactored the plugins to use click rathrer than argparse at the top level, this lets us add subcommands rin
run
plugin
etc. that make it clearer as to what we are doing.Because the plugin API uses entrypoints I had a chance to clean it up a bit and loading times have greatly imrpoved.