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

load plugins from additive directories #222

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

appleshampooid
Copy link

@appleshampooid appleshampooid commented Nov 23, 2023

Addresses #221 with an extension to the --pluginpath argument.

If one wishes to add some plugins, and keep the original, you will have to invoke it with two -p arguments: your custom plugins, and then a path to the default plugin dir. e.g.:

SLACK_TOKEN=<REDACTED> /home/appleshampoo/venvs/limbo-fresh/bin/limbo -d /home/appleshampoo/gitlab/cannabot/test.db -p /home/appleshampoo/gitlab/cannabot/limbo_plugins -p ./limbo/plugins

Happy to accept feedback and constructive criticism. I am not an experienced pythonista 😂

bin/limbo Outdated
help="The path where limbo should look to find its plugins")
help=("The primary path where limbo should look to find its plugins. Setting this "
"will override the default list of plugins."))
parser.add_argument('--extrapluginpaths', '-epp', dest='extrapluginpaths', default=[],
Copy link
Owner

Choose a reason for hiding this comment

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

Could we just modify --pluginpath to accept multiple instances instead of adding a new flag?

Copy link
Owner

Choose a reason for hiding this comment

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

I put some suggestions in a branch llimllib-suggestions. Here's the diff: appleshampooid/limbo@appleshampooid_additive_plugins...llimllib:limbo:llimllib-suggestions

How do they look to you?

Copy link
Author

Choose a reason for hiding this comment

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

Could we just modify --pluginpath to accept multiple instances instead of adding a new flag?

I generally like this idea better, other than the somewhat-clunky nature of including the default plugins along with your custom ones (see my updated PR description for an example).

Let me know what you think? Could also include the default plugins by default, all the time, and then maybe an extra param to remove them? Shrug.

@llimllib
Copy link
Owner

llimllib commented Mar 9, 2024

Apologies for the super slow review!

@appleshampooid
Copy link
Author

Apologies for the super slow review!

No problem at all, I understand this is not anyone's full time job. Taking a look at your suggestions this weekend!

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