-
Notifications
You must be signed in to change notification settings - Fork 52
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
Setup pluggy with locking plugin #965
Conversation
✅ Deploy Preview for conda-store canceled.
|
✅ Deploy Preview for conda-store canceled.
|
0309540
to
8ebc697
Compare
conda-store-server/conda_store_server/plugins/lock/conda_lock.py
Outdated
Show resolved
Hide resolved
conda-store-server/conda_store_server/plugins/plugin_registry.py
Outdated
Show resolved
Hide resolved
2cc11d8
to
fc992ff
Compare
conda-store-server/conda_store_server/plugins/plugin_registry.py
Outdated
Show resolved
Hide resolved
conda-store-server/conda_store_server/plugins/plugin_context.py
Outdated
Show resolved
Hide resolved
conda-store-server/conda_store_server/plugins/plugin_context.py
Outdated
Show resolved
Hide resolved
self.conda_flags = conda_flags | ||
|
||
@utils.run_in_tempdir | ||
@hookspec.hookimpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I was expecting the implementations to live in a different abstraction level, not so close to the actual code. For reference, this is how conda does it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @soapy1! I like what I'm seeing, but I'm wondering if we could leverage some "community knowledge" and steal what conda is doing for their hooks. They have one more layer in between the plugin and the hook, and the best part if that they have documented it veeery well. Do you think you can take a look at their setup and see what things we could benefit from? 🙏
Co-authored-by: jaimergp <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM assuming all tests are passing. Thanks for the hard work @soapy1!
Fixes #929
Description
This set's up conda-lock to be run as a plugin. By running the locking functionality as a plugin, opposed to a builtin action, we will be able to more easily swap out locking implementations. This is helpful for developer experimentation and providing users with another way of customize their conda-store install.
Some things that this PR adds:
For a more complete demo of how this approach can be extended, see main...soapy1:conda-store:plugin-demo-pluggy. For a more complete description of what is added by this demo see the conversation in GH.
Next steps
fast follow pr's
opportunities to extend the use of plugins
Pull request checklist