Closed onerandomusername closed 3 years ago
Merging #43 (f708632) into main (a65e576) will decrease coverage by
54.59%
. The diff coverage is23.15%
.
@@ Coverage Diff @@
## main #43 +/- ##
===========================================
- Coverage 91.51% 36.92% -54.60%
===========================================
Files 5 12 +7
Lines 283 520 +237
Branches 7 60 +53
===========================================
- Hits 259 192 -67
- Misses 20 323 +303
- Partials 4 5 +1
Impacted Files | Coverage Δ | |
---|---|---|
modmail/extensions/extension_manager.py | 0.00% <0.00%> (ø) |
|
modmail/extensions/meta.py | 0.00% <0.00%> (ø) |
|
modmail/extensions/plugin_manager.py | 0.00% <0.00%> (ø) |
|
modmail/plugin_helpers.py | 0.00% <0.00%> (ø) |
|
modmail/bot.py | 43.05% <32.65%> (-21.05%) |
:arrow_down: |
modmail/utils/plugins.py | 39.53% <39.53%> (ø) |
|
modmail/__main__.py | 47.05% <50.00%> (-2.95%) |
:arrow_down: |
modmail/utils/extensions.py | 60.46% <60.46%> (ø) |
|
modmail/utils/cogs.py | 90.00% <90.00%> (ø) |
|
modmail/__init__.py | 100.00% <100.00%> (ø) |
|
... and 9 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a65e576...f708632. Read the comment docs.
Still pending writing tests, but the rest of the pull looks ready.
@onerandomusername @bast0006 What do you think of my review comment, of merging them into a base class and the two inheriting them?
@onerandomusername @bast0006 What do you think of my review comment, of merging them into a base class and the two inheriting them?
Yep. That's what I was thinking as well and mentioned in the wall of review somewhere. Honestly I think we don't need a base class, Plugin should just subclass Extension.
The .env.template
file should have descriptions for the variables not mentioned in CONTRIBUTING.md.
The
.env.template
file should have descriptions for the variables not mentioned in CONTRIBUTING.md.
Addressed by removing vars which the bot does not currently use.
Once @bast0006 re-reviews, I'm planning to merge this tomorrow.
Description
Adds the ability to load extensions, and manage them.
Most of the code of the first commit is taken from this project, at that position in time.
Added
PROD
: the default mode, no dev extensions or dev plugins loadDEVELOP
: the bot developer mode, most useful for people adding features to modmailPLUGIN_DEV
: the plugin developer mode, useful for enabling plugin-specific featuresmodmail/extensions
folder and loads them if they are of the right format.modmail/plugins
folder and loads them.ext
command for more details when the bot is inDEVELOP
mode.plugins
command for more details.modmail/plugin_helpers.py
contains several helpers for making pluginsPluginCog
ModmailBot
, imported frommodmail.bot
ModmailLogger
, imported frommodmail.log
Fixed
Todo in later issues: