Skip to content

Commit

Permalink
Modified _ to - in latex output
Browse files Browse the repository at this point in the history
  • Loading branch information
benedikt-schesch committed Sep 29, 2023
1 parent 9a2e9a5 commit f2c8b96
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
6 changes: 4 additions & 2 deletions src/python/latex_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def merge_tool_latex_name(name: str) -> str:
"""
if name in MERGE_TOOL_RENAME:
return MERGE_TOOL_RENAME[name]
name = name.capitalize()
name = name.replace("_", "-")
return name.capitalize()


Expand Down Expand Up @@ -434,12 +436,12 @@ def main(): # pylint: disable=too-many-locals,too-many-branches,too-many-statem
# Table run time
table3 = """% Do not edit. This file is automatically generated.
\\begin{tabular}{c|c|c|c}
& \multicolumn{3}{c}{Run time (seconds)} \\\\
& \\multicolumn{3}{c}{Run time (seconds)} \\\\
Tool & Mean & Median & Max \\\\
\\hline\n"""

for merge_tool in merge_tools:
table3 += f" {merge_tool.capitalize():32}"
table3 += f" {merge_tool_latex_name(merge_tool):32}"
for f in [np.mean, np.median, np.max]:
run_time = f(result_df[merge_tool + "_run_time"])
if run_time < 10:
Expand Down
22 changes: 11 additions & 11 deletions test/small-goal-files/tables/all/table_feature_main_summary.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
\multicolumn{2}{c}{Feature Branch} \\
\hline
& \# & \% & \# & \% & \# & \% & \# & \% & \# & \% & \# & \% \\
Gitmerge_ort & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_ort_ignorespace & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_recursive_ignorespace & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_ort_imports & 3 & 100\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_ort_imports_ignorespace & 3 & 100\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_recursive_patience & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_recursive_minimal & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_recursive_histogram & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_recursive_myers & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge_resolve & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Git_hires_merge & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-ort & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-ort-ignorespace & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-recursive-ignorespace & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-ort-imports & 3 & 100\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-ort-imports-ignorespace & 3 & 100\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-recursive-patience & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-recursive-minimal & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-recursive-histogram & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-recursive-myers & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Gitmerge-resolve & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Git-hires-merge & 2 & 67\% & 0 & -1\% & 1 & 33\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
Spork & 3 & 100\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 0 & 0\% & 0 & -1\% \\
IntelliMerge & 2 & 67\% & 0 & -1\% & 0 & 0\% & 0 & -1\% & 1 & 33\% & 0 & -1\% \\
\end{tabular}
22 changes: 11 additions & 11 deletions test/small-goal-files/tables/all/table_summary.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
\multicolumn{2}{c}{Incorrect Merges} \\
& \# & \% & \# & \% & \# & \% \\
\hline
Gitmerge_ort & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_ort_ignorespace & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_recursive_ignorespace & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_ort_imports & 3 & 100\% & 0 & 0\% & 0 & 0\% \\
Gitmerge_ort_imports_ignorespace & 3 & 100\% & 0 & 0\% & 0 & 0\% \\
Gitmerge_recursive_patience & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_recursive_minimal & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_recursive_histogram & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_recursive_myers & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge_resolve & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Git_hires_merge & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-ort & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-ort-ignorespace & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-recursive-ignorespace & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-ort-imports & 3 & 100\% & 0 & 0\% & 0 & 0\% \\
Gitmerge-ort-imports-ignorespace & 3 & 100\% & 0 & 0\% & 0 & 0\% \\
Gitmerge-recursive-patience & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-recursive-minimal & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-recursive-histogram & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-recursive-myers & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Gitmerge-resolve & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Git-hires-merge & 2 & 67\% & 1 & 33\% & 0 & 0\% \\
Spork & 3 & 100\% & 0 & 0\% & 0 & 0\% \\
IntelliMerge & 2 & 67\% & 0 & 0\% & 1 & 33\% \\
\end{tabular}

0 comments on commit f2c8b96

Please sign in to comment.