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

Feature: plugins detection using entrypoints #1590

Merged
merged 10 commits into from
Jul 14, 2022

Conversation

sijis
Copy link
Contributor

@sijis sijis commented Jul 3, 2022

This feature should allow plugins to be detected using entrypoints when installed via pip.

The entrypoints are

  • errbot.plugins - normal botcmd plugins
  • errbot.backend_plugins - plugins related to communications systems (Slack, Gitter, etc)

A package would need to include this snippet in their setup.py to work.
Using, https://github.com/errbotio/err-helloworld as an example, we need to add

...
    entry_points = {
        "errbot.plugins": [
            "helloworld = helloWorld:HelloWorld",
        ]
    }
...

I would suggest, plugins use the naming convention of errbot-plugin-$pluginName

@sijis sijis changed the title Feature: plugin entrypoints Feature: plugins installations via pip using entrypoints Jul 3, 2022
Copy link
Contributor

@nzlosh nzlosh left a comment

Choose a reason for hiding this comment

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

LGTM

@sijis sijis marked this pull request as ready for review July 10, 2022 04:41
@sijis sijis changed the title Feature: plugins installations via pip using entrypoints Feature: plugins installations using entrypoints Jul 10, 2022
@sijis sijis changed the title Feature: plugins installations using entrypoints Feature: plugins detection using entrypoints Jul 10, 2022
@sijis sijis merged commit 791a08b into errbotio:master Jul 14, 2022
@sijis sijis deleted the feature/plugin_entrypoints branch July 14, 2022 03:41
sijis added a commit to sijis/errbot that referenced this pull request Jan 1, 2024
* feat: add entrypoint plugin lookup

* feat: add entrypoint plugins

* feat: add entrypoint plugin for backends

* fix: ensure cli uses entrypoints to list backend plugins

* refactor: use importlib instead of pkg_resources

* fix: ensure plugin lookup works for py37

* test: basic entrypoint check

* docs: refactor installing plugins section

* docs: add info on using entrypoints

* docs: add info to CHANGES
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