-
Notifications
You must be signed in to change notification settings - Fork 15
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
Plugin API: add a update_inputs
to plugin's workchain_and_builder
#656
Plugin API: add a update_inputs
to plugin's workchain_and_builder
#656
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
==========================================
- Coverage 80.73% 75.56% -5.17%
==========================================
Files 49 60 +11
Lines 3415 4334 +919
==========================================
+ Hits 2757 3275 +518
- Misses 658 1059 +401
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi @mikibonacci , this PR has a break change on the plugin's API. You need to update your plugins if this PR gets merged. |
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.
Nice work @superstar54. I've run one test for each basic type of plugin and everything looks fine to me.
I'm interested also to see how this gets built on, since at the moment it's just exposing some inputs, but at least the added functionality is good to have.
@PNOGillespie Thanks for your review. |
This PR enhances the plugin API by by introducing a new feature to the
workchain_and_builder
configuration: theupdate_inputs
method.This addition addresses limitations in the previous design, where the main workchain rigidly passed only the
structure
to the plugins' workchains. This approach had notable disadvantages:structure
, leading to errors if this was not adhered to. This is the case in the newly developed plugin: aiidalab-qe-hp.The introduction of the
update_inputs
method provides a dynamic mechanism for updating the inputs of plugins' workchains. It accepts two parameters:inputs
andctx
. This method enables developers to customize how the inputs to a plugin's workchain are updated, leveraging the broader context of the Workchain. An immediate benefit of this improvement is observed in the bands and pdos plugins, which can now accesscurrent_number_of_bands
from the context if available.