Updating GLaDOS for easier plugin development #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch is to make it simpler and easier to develop GLaDOS plugins and then utilizing those bots, as well as making it simpler to do local development.
server.pytoservelocal.pyglados-servelocalwhich will start a local Flask serverglados.servelocalcan exist without issuesread_configto avoid having to import inside a functionisortconfig.yamlfile inside apluginsfolder.glados-servelocalThis is going to be the new
yamlfile for adding a plugin to a named bot:configs/plugins/example.yaml:The idea being here that
modulename.pluginexposes a function namedincludeme, it is passed two arguments:bot, which is an instance of typeGladosBotand a**kwargsthat contains any other configuration parameters that your plugin may need.The function should raise an exception if any of the required settings are not included.
If you change
entrypointtomodulename.pluginit will default toincludemeas the function to be called, so you can pass just a module to be imported/used.This will allow you to easily import new plugins from directories on the local disk (i.e. in the implicit
PYTHONPATH), or plugins installed through a Python package.