Commit 0a8ba937 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add verbose info for Message.preview()

parent 6dcd47aa
Pipeline #2882 passed with stage
in 0 seconds
......@@ -200,6 +200,10 @@ class Pipeline:
"""Move file `file_src` to `file_dist`."""
shutil.copy(file_src, file_dst)
def copy_to_output(self, file_paths: list):
for file_path in file_paths:
pass
def call(self, func: Callable, *args: Any, **kwargs: Any):
self.pipeline_logger.info(
f"====================================================="
......@@ -301,10 +305,13 @@ class Message:
def preview(self, dlist: list[dict], n: int = 10) -> None:
"""Preview top `n` messages."""
print(f"No. of messages = {len(dlist)}")
print(f"=========== Top {n} ===========")
s = ""
for d in dlist[:n]:
s += self.dict2msg(d) + "\n"
print(s)
print("")
@staticmethod
def dict2msg(d: dict):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment