From c0aaef4203c1a15c7e9b58b95c59b1d36bfff2c9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 4 Jun 2025 09:33:06 +0200 Subject: [PATCH 1/2] pages: replace URLs by icons Make the table a bit less crowded. :eyes: https://benchmarking-initiative.github.io/Benchmark-Models-PEtab/ --- src/python/benchmark_models_petab/overview.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/python/benchmark_models_petab/overview.py b/src/python/benchmark_models_petab/overview.py index 1b1211f..42644d9 100644 --- a/src/python/benchmark_models_petab/overview.py +++ b/src/python/benchmark_models_petab/overview.py @@ -363,7 +363,8 @@ def get_formatter(col: str): ) if pd.api.types.is_integer_dtype(df[col].dtype): return NumberFormatter(text_align="right") - if col in ["reference_uris", "sbml4humans_urls"]: + if col in ("reference_uris", "sbml4humans_urls"): + icon = "📚" if col == "reference_uris" else "🧮" return HTMLTemplateFormatter( template=""" <% @@ -376,9 +377,9 @@ def get_formatter(col: str): } for (let i = 0; i < urls.length; i++) { %> - <%= urls[i] %> + LINK_TEXT <% } %> - """ + """.replace("LINK_TEXT", icon) ) return StringFormatter() From bce15f522351446ea4f8154cadc6be79297c16f6 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 4 Jun 2025 09:51:00 +0200 Subject: [PATCH 2/2] Update src/python/benchmark_models_petab/overview.py Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- src/python/benchmark_models_petab/overview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/benchmark_models_petab/overview.py b/src/python/benchmark_models_petab/overview.py index 42644d9..52f5e55 100644 --- a/src/python/benchmark_models_petab/overview.py +++ b/src/python/benchmark_models_petab/overview.py @@ -364,7 +364,7 @@ def get_formatter(col: str): if pd.api.types.is_integer_dtype(df[col].dtype): return NumberFormatter(text_align="right") if col in ("reference_uris", "sbml4humans_urls"): - icon = "📚" if col == "reference_uris" else "🧮" + icon = "📚" if col == "reference_uris" else "🌠" return HTMLTemplateFormatter( template=""" <%