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 18, 2024
1 parent f72e003 commit e06bbac
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"""\

Check warning on line 197 in smartsim/launchable/job.py

View check run for this annotation

Codecov / codecov/patch

smartsim/launchable/job.py#L197

Added line #L197 was not covered by tests
Launch Record:
Launched Job ID:
{self.launched_id}
Laucnehd Job:
{textwrap.indent(str(self._job), " ")}
""")

0 comments on commit e06bbac

Please sign in to comment.