File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ def set_queue_adapter(
223
223
224
224
225
225
def powerup_by_kwargs (
226
- wf ,
226
+ original_wf : Workflow ,
227
227
add_powerup_module : List [str ] = None ,
228
- ** kwargs ,
228
+ ** powerup_kwargs ,
229
229
):
230
230
"""
231
231
apply powerups in the form using a kwargs dictionary of the form:
@@ -239,6 +239,15 @@ def powerup_by_kwargs(
239
239
"update_dict" : {"foo" : "bar"}
240
240
}
241
241
)
242
+
243
+ Args:
244
+ original_wf: workflow that will be changed
245
+ add_powerup_module: user_made modules that contain powerups
246
+ powerup_kwargs: KWARGS used to apply any power: {"add_modify_incar": {
247
+ "modify_incar_params": {
248
+ "incar_update": {"KPAR": 8}}
249
+ }}
250
+
242
251
"""
243
252
# a list of possible powerups in atomate (most specific first)
244
253
powerup_modules = [
@@ -250,13 +259,13 @@ def powerup_by_kwargs(
250
259
if add_powerup_module is not None :
251
260
powerup_modules = add_powerup_module + powerup_modules
252
261
253
- for k , v in kwargs .items ():
262
+ for k , v in powerup_kwargs .items ():
254
263
for module_name in powerup_modules :
255
264
try :
256
265
module = import_module (module_name )
257
266
powerup = getattr (module , k )
258
- wf = powerup (wf , ** v )
267
+ original_wf = powerup (original_wf , ** v )
259
268
break
260
269
except Exception :
261
270
pass
262
- return wf
271
+ return original_wf
You can’t perform that action at this time.
0 commit comments