From bc19b9f41291916e15d96ae36fc99184dac765ef Mon Sep 17 00:00:00 2001 From: Philipp Hennig Date: Thu, 17 Oct 2024 14:48:40 +0200 Subject: [PATCH] Fix: add missing test cases for ProbNum25, addressing comments by `pnkraemer` --- tests/test_rc_params_cases/case_bundles.py | 5 +++++ tests/test_rc_params_cases/case_figsizes.py | 8 ++++++++ tests/test_rc_params_cases/case_fonts.py | 4 ++++ tests/test_rc_params_cases/case_fontsizes.py | 4 ++++ tueplots/bundles.py | 2 +- tueplots/figsizes.py | 8 ++++---- 6 files changed, 26 insertions(+), 5 deletions(-) diff --git a/tests/test_rc_params_cases/case_bundles.py b/tests/test_rc_params_cases/case_bundles.py index 812888d..33a0ed2 100644 --- a/tests/test_rc_params_cases/case_bundles.py +++ b/tests/test_rc_params_cases/case_bundles.py @@ -96,6 +96,11 @@ def case_bundles_tmlr2023(): return bundles.tmlr2023(nrows=2, ncols=2, family="serif") +@pytest_cases.parametrize(column=["full", "half"]) +def case_bundles_probnum2025(column): + return bundles.probnum2025(column=column, nrows=1, ncols=1, family="sans-serif") + + def case_bundles_beamer_moml(): return bundles.beamer_moml(rel_width=0.9, rel_height=0.9) diff --git a/tests/test_rc_params_cases/case_figsizes.py b/tests/test_rc_params_cases/case_figsizes.py index 0bf7a04..0c1f11e 100644 --- a/tests/test_rc_params_cases/case_figsizes.py +++ b/tests/test_rc_params_cases/case_figsizes.py @@ -107,5 +107,13 @@ def case_figsizes_jmlr2001(): return figsizes.jmlr2001(nrows=2, ncols=3, height_to_width_ratio=1.0) +def case_figsizes_probnum2025_full(): + return figsizes.probnum2025_full(nrows=2, ncols=3, height_to_width_ratio=1.0) + + +def case_figsizes_probnum2025_half(): + return figsizes.probnum2025_half(nrows=2, ncols=3, height_to_width_ratio=1.0) + + def case_beamer_169(): return figsizes.beamer_169(rel_width=0.5, rel_height=0.1) diff --git a/tests/test_rc_params_cases/case_fonts.py b/tests/test_rc_params_cases/case_fonts.py index ab58302..f234d29 100644 --- a/tests/test_rc_params_cases/case_fonts.py +++ b/tests/test_rc_params_cases/case_fonts.py @@ -193,3 +193,7 @@ def case_fonts_cvpr2024_tex_default(): def case_fonts_cvpr2024_tex_custom(): return fonts.cvpr2024_tex(family="serif") + + +def case_fonts_probnum2025_tex_default(): + return fonts.probnum2025_tex() diff --git a/tests/test_rc_params_cases/case_fontsizes.py b/tests/test_rc_params_cases/case_fontsizes.py index d74b07d..5207d64 100644 --- a/tests/test_rc_params_cases/case_fontsizes.py +++ b/tests/test_rc_params_cases/case_fontsizes.py @@ -67,5 +67,9 @@ def case_fontsizes_jmlr2001(): return fontsizes.jmlr2001() +def case_fontsizes_probnum2025(): + return fontsizes.probnum2025() + + def case_fontsizes_beamer(): return fontsizes.beamer() diff --git a/tueplots/bundles.py b/tueplots/bundles.py index fb943d7..23d4600 100644 --- a/tueplots/bundles.py +++ b/tueplots/bundles.py @@ -236,7 +236,7 @@ def iclr2024(*, usetex=True, rel_width=1.0, nrows=1, ncols=1, family="serif"): return {**font_config, **size, **fontsize_config} -def probnum2025(*, column="half", nrows=1, ncols=1, family="serif"): +def probnum2025(*, column="half", nrows=1, ncols=1, family="sans-serif"): """ProbNum 2025 bundle.""" if column == "half": size = figsizes.probnum2025_half(nrows=nrows, ncols=ncols) diff --git a/tueplots/figsizes.py b/tueplots/figsizes.py index 90b60b9..e706546 100644 --- a/tueplots/figsizes.py +++ b/tueplots/figsizes.py @@ -336,8 +336,8 @@ def probnum2025_half( pad_inches=_PAD_INCHES, ): """Single-column (half-width) figures for ProbNum 2025.""" - figsize = _from_base_in( - base_width_in=3.333, + figsize = _from_base_pt( + base_width_pt=240, rel_width=1.0, height_to_width_ratio=height_to_width_ratio, nrows=nrows, @@ -362,8 +362,8 @@ def probnum2025_full( pad_inches=_PAD_INCHES, ): """Full-page (full-width) figures for ProbNum 2025.""" - figsize = _from_base_in( - base_width_in=6.944, + figsize = _from_base_pt( + base_width_pt=500, rel_width=rel_width, height_to_width_ratio=height_to_width_ratio, nrows=nrows,