Skip to content
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

Implement Dynamic Plugin System #91

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

fernandodpr
Copy link
Contributor

This pull request introduces a dynamic plugin system to the M<>M Relay, allowing users to extend functionality through core, custom, and community plugins. It also updates the documentation and sample configuration to reflect these changes.

Changes

Plugin Loader (plugin_loader.py)

  • Dynamic Loading: Modified the plugin loader to support dynamic loading of core, custom, and community plugins.

  • Community Plugins:

    • Automatically clones or updates community plugins from GitHub repositories specified in config.yaml.
    • Maintains the repository folder name for clarity.
    • Installs dependencies automatically if a requirements.txt file is present.
  • Error Handling:

    • If cloning or updating fails, prompts the user to manually perform the action and exits the program.
    • Handles installation errors for dependencies similarly.

Configuration File (config.yaml)

  • New Sections:

    • custom-plugins: For managing custom plugins.
    • community-plugins: For managing community plugins with repository details.
    • Examples: Provided examples for activating plugins and specifying repository URLs and tags.

Documentation Updates

README.md:

  • Added a new Plugins section explaining the plugin system.
  • Detailed the folder structure and configuration file usage.
  • Provided simple instructions for installing community plugins without using "you" to maintain a formal tone.
  • Included images for core plugin features like node maps and mesh details.

Sample Configuration:

  • Updated sample_config.yaml to include examples for the new plugin sections.

Testing

  • Verified that core, custom, and community plugins are loaded correctly based on config.yaml.
  • Tested automatic cloning and updating of community plugins from specified GitHub repositories.
  • Confirmed that dependencies are installed automatically when a requirements.txt file is present.
  • Ensured that appropriate error messages are displayed if cloning or installation fails.

- Add support for core, custom, and community plugins.
- Update `plugin_loader.py`.
- Update documentation and sample configuration.
Copy link
Collaborator

@jeremiah-k jeremiah-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! We might move some of the details from the README to the Wiki later, but that's no problem.

Thanks for your help!

@jeremiah-k jeremiah-k merged commit 740d31d into geoffwhittington:main Nov 7, 2024
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.

2 participants