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

loader, plugin, plugins.rules: add allow_bots decorator #2244

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

dgw
Copy link
Member

@dgw dgw commented Jan 26, 2022

Description

You know, it's fun when you find an unmerged branch hanging around during a local cleanup.

It needs rebasing, which I'll handle in a moment, but it will fill a gap in the plugin decorator library. After #2089 we're missing a way for plugin authors to opt back into getting messages from other bots. Most will probably appreciate the filtering Sopel now does on their behalf, but I'm sure there are a few who relied on the old behavior

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
    • I will make sure of this after rebasing. It was true! And I even remembered to upgrade the dev-reqs before running tests.
  • I have tested the functionality of the things this change touches

@dgw dgw added the Feature label Jan 26, 2022
@dgw dgw added this to the 8.0.0 milestone Jan 26, 2022
@dgw dgw requested a review from a team January 26, 2022 15:06
@dgw dgw force-pushed the plugin.allow_bots branch from 61544fc to 2f27ab4 Compare January 26, 2022 15:18
@Exirel
Copy link
Contributor

Exirel commented Jan 26, 2022

Is there a section of the documentation about non-rule decorators, such as echo and now allow_bot? If so, it should be updated. Otherwise, it means a future PR will be needed to talk about that.

@dgw
Copy link
Member Author

dgw commented Jan 26, 2022

Do you mean a section on the plugin/anatomy page? Many of the (what I'll call) "conditional" decorators are documented as subsections of how to define rules, but not the (again, coining a term) "filter" decorators like echo and this new allow_bots feature are mentioned yet. I don't mind adding that here, if you don't. It's relevant.

And of course the decorators themselves are autodoc'd at plugin/decorators.

@Exirel
Copy link
Contributor

Exirel commented Jan 26, 2022

[...] "filter" decorators like echo and this new allow_bots feature are mentioned yet. [...] It's relevant.

Great! And yes, I was thinking about that, so that would be perfect thank you. ❤️

@dgw
Copy link
Member Author

dgw commented Jan 27, 2022

I took a stab at the documentation update.

My IRC client is currently closed because my ongoing network problems are so distracting. I might stick to GitHub comments for a while, just for my own sanity's sake.

Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

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

A nitpick, and it's more or less a question/suggestion. The doc looks dope.

docs/source/plugin/anatomy.rst Outdated Show resolved Hide resolved
@dgw
Copy link
Member Author

dgw commented Jan 27, 2022

Happy to get a second look before I squash, @Exirel. I almost committed a nemesiS of my own. 😁

@Exirel
Copy link
Contributor

Exirel commented Jan 27, 2022

Let's. Go. 🚢

dgw added 2 commits January 27, 2022 08:33
Noted some gaps in the test suite regarding the loader setting defaults
for certain callable attributes (including this new one), but elected to
leave that for a future patch.
These didn't get any brief mention on the "Anatomy of a plugin" page,
like most of their siblings already had. It seemed only fair.

Also added a gotcha to the `echo` decorator's docs.
@dgw dgw force-pushed the plugin.allow_bots branch from 526bf73 to 834f546 Compare January 27, 2022 14:34
@dgw dgw merged commit e223044 into master Feb 4, 2022
@dgw dgw deleted the plugin.allow_bots branch February 4, 2022 22:55
@half-duplex half-duplex mentioned this pull request Feb 9, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants