Skip to content

[Extension Metadata]: small refactor & add load attribute #54

@onerandomusername

Description

@onerandomusername

Is there an existing issue for this?

  • I have searched the existing issues and there is no existing issue.

What is the feature?

Overview

While our extension loading system is able to handle multiple different cases, we'd like to add support to the metadata to be able to set files to not load when the bot is loaded, and load them at a later time.
We'd also like to have extensions and plugins which are walked, deemed valid, but not loaded. This allows us to have them in the system, but not have them loaded at the time.

Implementation

The majority of the walking takes place in modmail/utils/extensions.py, but a bit of it also takes place in modmail/utils/plugins.py

Both of these metadata loaders should be refactored to load metadata into a dict, in order to make easier to expand over time. Anywhere that these wailking methods are used will need to be updated to use the dict, and where EXTENSIONS or PLUGINS global variables are used.

Would you like to implement this yourself?

No, someone else can implement it

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededl: beginnerp: normalNormal Prioritys: approvedThe issue has received a maintainer's approvalt: enhancementChanges or improvements to existing featurest: featureRelating to the functionality of the application.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions