Skip to content

Commit

Permalink
Add a Record.__str__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
MattToast committed Oct 17, 2024
1 parent f72e003 commit 2e367a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions smartsim/launchable/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from __future__ import annotations

import textwrap
import typing as t
from copy import deepcopy

Expand Down Expand Up @@ -191,3 +192,12 @@ def job(self) -> Job:
:returns: A deep copy of the launched job.
"""
return deepcopy(self._job)

def __str__(self) -> str:
return textwrap.dedent(f"""\
Launch Record:
Launched Job ID:
{self.launched_id}
Laucnehd Job:
{textwrap.indent(str(job), " ")}
""")

0 comments on commit 2e367a0

Please sign in to comment.