Open onerandomusername opened 3 years ago
Merging #69 (9987b26) into main (4b07917) will decrease coverage by
3.98%
. The diff coverage is56.58%
.:exclamation: Current head 9987b26 differs from pull request most recent head bfba8e2. Consider uploading reports for the commit bfba8e2 to get more accurate results
@@ Coverage Diff @@
## main #69 +/- ##
==========================================
- Coverage 70.90% 66.92% -3.99%
==========================================
Files 33 44 +11
Lines 1619 2313 +694
Branches 199 321 +122
==========================================
+ Hits 1148 1548 +400
- Misses 439 717 +278
- Partials 32 48 +16
Impacted Files | Coverage Δ | |
---|---|---|
modmail/extensions/plugin_manager.py | 30.08% <26.23%> (-39.48%) |
:arrow_down: |
modmail/extensions/extension_manager.py | 35.63% <31.08%> (+1.28%) |
:arrow_up: |
modmail/bot.py | 36.84% <31.57%> (-2.01%) |
:arrow_down: |
modmail/addons/plugins.py | 46.06% <46.06%> (ø) |
|
modmail/addons/utils.py | 51.72% <51.72%> (ø) |
|
modmail/config.py | 95.52% <60.00%> (-1.41%) |
:arrow_down: |
modmail/utils/__init__.py | 66.66% <66.66%> (ø) |
|
modmail/errors.py | 75.00% <75.00%> (ø) |
|
modmail/addons/models.py | 77.68% <77.68%> (ø) |
|
modmail/utils/extensions.py | 82.50% <81.81%> (-10.53%) |
:arrow_down: |
... and 19 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 df5dbb9...bfba8e2. Read the comment docs.
This seems to be ready for review now.
This pr is now feature frozen.
The bot not using the cached downloaded files will be resolved in a seperate pr.
:tada: All dependencies have been resolved !
This still depends on solving the docker problem, however the rest of the code can be review.
Linting workflows are going to fail until this is merged with main again due to how github merges then and a dependency mismatch. Given that there's so many merge commits already, I'm holding off on a merge until later.
depends on #74
Relevant Issues
Closes #54 Closes #62 Closes #63
Overview
Installation system for plugins. Portions of this may be used in the future for other addons, so nearly everything up to when the import is done should be in an addons.py utility file.
The currently supported type of repos are in zip format, using the following structure:
This gives the advantage to be able to extend the addons api in the future without having to worry about the structure of the repo.
A sample repository is viewable here: onerandomusername/modmal-addons, with a clone to gitlab/onerandomusername/modmal-addons
Details
Provided a github or gitlab repo, parses it to get the specific plugin information, if it exists, from the plugin.toml file. The plugin.toml file is supplemental to the folders, meaning that the nature of the toml file existing does not override the existing plugins.
Rather than provide a list of all of the features here, I recommend checking out the documentation for this pull request, found here: https://discord-modmail.readthedocs.io/en/feat-plugin-install/addons/