diff --git a/smtcomp/main.py b/smtcomp/main.py index cb45d62a..3a560571 100644 --- a/smtcomp/main.py +++ b/smtcomp/main.py @@ -377,7 +377,7 @@ def find_disagreement_results( ) def print_answers(d: List[Dict[str, Any]]) -> str: - return ",".join(map(lambda x: "{}({})".format(x["solver"], defs.Answer.name_of_int(x["answer"])), d)) + return ", ".join(map(lambda x: "{}({})".format(x["solver"], defs.Answer.name_of_int(x["answer"])), d)) rich_print_pl( "Disagreements", @@ -397,10 +397,16 @@ def print_answers(d: List[Dict[str, Any]]) -> str: footer="", justify="left", style="cyan", - no_wrap=False, + no_wrap=True, custom=defs.Status.name_of_int, ), - Col("answers", "Disagreement", custom=print_answers, footer=""), + Col( + "answers", + "Disagreement", + custom=print_answers, + footer="", + no_wrap=False, + ), ) diff --git a/smtcomp/utils.py b/smtcomp/utils.py index 858e6d9f..c3340265 100644 --- a/smtcomp/utils.py +++ b/smtcomp/utils.py @@ -72,6 +72,7 @@ class Col: justify: Literal["default", "left", "center", "right", "full"] = "right" style: str | None = None no_wrap: bool = False + min_width: int | None = None custom: Callable[[Any], str] = str @@ -81,7 +82,14 @@ def rich_print_pl(title: str, df: pl.DataFrame, *cols: Col) -> None: table = Table(title=title) for col in cols: - table.add_column(col.header, justify=col.justify, style=col.style, no_wrap=col.no_wrap) + table.add_column( + col.header, + justify=col.justify, + style=col.style, + no_wrap=col.no_wrap, + overflow="fold", + min_width=col.min_width, + ) for d in df.to_dicts(): l = list(map(lambda col: col.custom(d[col.name]), cols))