Skip to content

Conversation

MatInGit
Copy link
Collaborator

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.

@MatInGit MatInGit requested a review from Copilot October 10, 2025 08:46
@MatInGit MatInGit self-assigned this Oct 10, 2025
@MatInGit MatInGit added the enhancement New feature or request label Oct 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@MatInGit MatInGit merged commit f955977 into main Oct 10, 2025
3 checks passed
@MatInGit MatInGit mentioned this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant