-
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
assgin clean_workdir to plugin's builder #667
Conversation
# add plugin workchain | ||
for name, entry_point in plugin_entries.items(): | ||
if name in properties: | ||
plugin_builder = entry_point["get_builder"]( | ||
codes, structure, copy.deepcopy(parameters), **kwargs | ||
) | ||
# assume all builder has a input "clean_workdir" |
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.
Do we need to add something to the documentation for avoid a ext plugin to cause a fail?
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 for pointing out this. Indeed, there is a risk here if the workchain dose not have a clean_workdir
input. I just modified it to check if the plugin has a clean_workdir input.
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.
In this case, I think it should be safe, and no need to add the docs.
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.
LGMT!
@superstar54 before you merge, do we have a test, to check if the builder set the clean_workdir ? in the workchains ? |
For all the plugins we have (bands, pdos, xas, xps etc), I think the default |
Is it possible to just check the generated builder , to check when set clean_workdir is true ? is not then is ok , you can merge. |
Yes, one can check the builder. But the builder test has been removed from this PR ##644. We will add a new builder test in the future. |
fix #666
If a plugin has
clean_workdir
default to True, even if the user didn't select theclean_workdir
box, the plugin still cleans the workdir. This PR assigns theclean_workdir
to the plugin's builder to make sure theclean_workdir
is consistent.