File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 5
5
from typing import List
6
6
7
7
from atomate .utils .utils import get_fws_and_tasks
8
- from fireworks import Workflow , FileWriteTask
8
+ from fireworks import FileWriteTask , Workflow
9
9
from fireworks .utilities .fw_utilities import get_slug
10
10
11
11
__author__ = "Janine George, Guido Petretto, Ryan Kingsbury"
@@ -86,21 +86,23 @@ def add_tags(original_wf, tags_list):
86
86
return original_wf
87
87
88
88
89
- def add_namefile (original_wf , use_slug = True ):
89
+ def add_namefile (original_wf : Workflow , use_slug : bool = True ) -> Workflow :
90
90
"""
91
91
Every FireWork begins by writing an empty file with the name
92
- "FW--<fw.name>". This makes it easy to figure out what jobs are in what
93
- launcher directories, e.g. "ls -l launch*/FW--*" from within a "block" dir.
92
+ "FW--<fw.name>-<fw.fw_id>". This makes it easy to figure out what jobs are
93
+ in what launcher directories, e.g. "ls -l launch*/FW--*" from within a
94
+ "block" dir.
94
95
95
96
Args:
96
97
original_wf (Workflow)
97
- use_slug (bool): whether to replace whitespace-type chars with a slug
98
+ use_slug (bool): whether to replace whitespace-type chars with a slug.
99
+ Defaults to True.
98
100
99
101
Returns:
100
102
Workflow
101
103
"""
102
104
for idx , fw in enumerate (original_wf .fws ):
103
- fname = f"FW--{ fw .name } "
105
+ fname = f"FW--{ fw .name } - { fw . fw_id } "
104
106
if use_slug :
105
107
fname = get_slug (fname )
106
108
You can’t perform that action at this time.
0 commit comments