Skip to content

Commit

Permalink
add warnings for list recent results and summarize
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Jul 12, 2024
1 parent 4110c26 commit 70af18f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pipestat/pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ def list_recent_results(
:return dict results: a dict containing start, end, num of records, and list of retrieved records
"""

if self.cfg["pephub_path"]:
_LOGGER.warning(f"List recent results not supported for PEPHub backend")
return {}
date_format = "%Y-%m-%d %H:%M:%S"
if start is None:
start = datetime.datetime.now()
Expand Down Expand Up @@ -904,7 +907,7 @@ def summarize(
looper_samples: Optional[list] = None,
amendment: Optional[str] = None,
portable: Optional[bool] = False,
) -> None:
) -> Union[str, None]:
"""
Builds a browsable html report for reported results.
:param Iterable[str] looper_samples: list of looper Samples from PEP
Expand All @@ -913,6 +916,11 @@ def summarize(
:return str: report_path
"""
if self.cfg["pephub_path"]:
_LOGGER.warning(
f"Summarize not supported for PEPHub backend. Please generate report via PEPHub website."
)
return None

self.check_multi_results()

Expand Down
2 changes: 2 additions & 0 deletions tests/test_pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2689,3 +2689,5 @@ def test_pephub_unsupported_funcs(
assert results is None

psm.link("somedir")
psm.list_recent_results()
psm.summarize()

0 comments on commit 70af18f

Please sign in to comment.