PwBaseWorkChain
: Set restart_mode
in parameters if parent_folder
#867
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.
Fixes #864
Typically, if a user launches a
PwBaseWorkChain
with aparent_folder
they want to restart from a previously completed but unconverged run. In this case theCONTROL.restart_mode
parameter should be set tofrom_scratch
. This used to be done automatically but was removed in commit cb32be5.Here we reinstate the behavior by calling
set_restart_type
toRestartType.FULL
if theparent_folder
is defined and theCONTROL.restart_mode
hasn't already been set explicitly in the parameters tofrom_scratch
. In this case, it was likely set by the caller and we don't want to silently override this.