Skip to content

Commit bc8a46d

Browse files
committed
Add a Record.__str__ method
1 parent e07fb84 commit bc8a46d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

smartsim/launchable/job.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
from __future__ import annotations
2828

29+
import textwrap
2930
import typing as t
3031
from copy import deepcopy
3132

@@ -191,3 +192,12 @@ def job(self) -> Job:
191192
:returns: A deep copy of the launched job.
192193
"""
193194
return deepcopy(self._job)
195+
196+
def __str__(self) -> str:
197+
return textwrap.dedent(f"""\
198+
Launch Record:
199+
Launched Job ID:
200+
{self.launched_id}
201+
Laucnehd Job:
202+
{textwrap.indent(str(self._job), " ")}
203+
""")

0 commit comments

Comments
 (0)