-
Notifications
You must be signed in to change notification settings - Fork 513
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
Proposal: Plugin configuration #1121
Comments
Great idea! I say we do it! |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our work with pluggable DID resolvers, I found that we needed the ability to configure the plugin at startup to set values relevant to the resolver plugin. However, as a plugin, we can't add command line arguments to the ACA-Py instance so we resorted to loading a separate yaml file specified by an environment variable. This worked fine but it got me thinking about easier to use solutions, especially when considering loading multiple resolvers (i.e. uniresolver + didcomm resolver + ...) and anticipating writing more plugins in the near future that will likewise require their own configuration.
So, to field an idea I had, what do we think of a
--plugin-config plugin.yml
command line argument that just loads the yaml into a map in settings and performs no further validation? Plugins would then subsequently look underneath their own namespace and perform validation if necessary for the options they define. In essence, I view this as analogous tosetup.cfg
/setup.ini
/pyproject.toml
tool configurations, allowing various plugins to retrieve configuration from a single source rather than having one configuration file and environment variable each. This also avoids having to do multiple passes of command line argument parsing to allow plugins to define their own. This multi-pass parsing is, of course, doable but doesn't feel as clean to me.The text was updated successfully, but these errors were encountered: