Skip to content

Commit

Permalink
more improvements of the CSV output
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Apr 30, 2024
1 parent e15ab07 commit dc9b4a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion moptipy/evaluation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,23 @@ def motipy_footer_bottom_comments(
_: Any, dest: Callable[[str], Any],
additional: str | None = None) -> None:
"""
Print the standard csv footer.
Print the standard csv footer for moptipy.
:param _: the setup object, ignored
:param dest: the destination callable
:param dest: the destination to write to
:param additional: any additional output string
>>> def __qpt(s: str):
... print(s[:49])
>>> motipy_footer_bottom_comments(None, __qpt, "bla")
This data has been generated with moptipy version
bla
You can find moptipy at https://thomasweise.githu
>>> motipy_footer_bottom_comments(None, __qpt, None)
This data has been generated with moptipy version
You can find moptipy at https://thomasweise.githu
"""
dest("This data has been generated with moptipy version "
f"{moptipy_version}.")
Expand Down
3 changes: 2 additions & 1 deletion moptipy/evaluation/end_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,8 @@ def to_csv(data: EndStatistics | Iterable[EndStatistics],
get_column_titles=CsvWriter.get_column_titles,
get_row=CsvWriter.get_row,
get_header_comments=CsvWriter.get_header_comments,
get_footer_comments=CsvWriter.get_footer_comments)
get_footer_comments=CsvWriter.get_footer_comments,
get_footer_bottom_comments=CsvWriter.get_footer_bottom_comments)
logger(f"Done writing end result statistics to CSV file {path!r}.")
return path

Expand Down

0 comments on commit dc9b4a0

Please sign in to comment.