Commit 6ccec825 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

tweaks

parent 7aacc78b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -150,11 +150,11 @@ class Pipeline:
        h.set("CREATED", self.pipeline_id, comment="pipeline build time")
        return reformat_header(h, strip=False, comment="Pipeline summary")

    def summary(self):
    def summarize(self):
        """Summarize this run."""
        t_stop: Time = Time.now()
        t_cost: float = (t_stop - self.t_start).value * 86400.0
        self.pipeline_logger.info(f"Total cost: {t_cost} sec")
        self.pipeline_logger.info(f"Total cost: {t_cost:.1f} sec")

    def clean_output(self):
        """Clean output directory."""
@@ -294,10 +294,10 @@ class Message:
            for d in dlist:
                f.write(self.dict2msg(d) + "\n")

    def preview(self, dlist: list[dict]) -> str:
        """Preview messages."""
    def preview(self, dlist: list[dict], n: int = 10) -> None:
        """Preview top `n` messages."""
        s = ""
        for d in dlist:
        for d in dlist[:n]:
            s += self.dict2msg(d) + "\n"
        print(s)