Skip to content

Commit

Permalink
chore: Use emoji markup as proposed in rich (#1089)
Browse files Browse the repository at this point in the history
Instead of using the direct emoji, let's change it to the markup one.
However, it does not fix the issue in width in ipython.
  • Loading branch information
glemaitre authored Jan 10, 2025
1 parent 6f6fafb commit 7dcb197
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions skore/src/skore/sklearn/_estimator/metrics_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _MetricsAccessor(_BaseAccessor, DirNamesMixin):
}

def __init__(self, parent):
super().__init__(parent, icon="πŸ“")
super().__init__(parent, icon=":straight_ruler:")

# TODO: should build on the `add_scorers` function
def report_metrics(
Expand Down Expand Up @@ -796,7 +796,7 @@ def _create_help_tree(self):
tree = super()._create_help_tree()

# Add plot methods in a separate branch
plot_branch = tree.add("[bold cyan].plot 🎨[/bold cyan]")
plot_branch = tree.add("[bold cyan].plot :art:[/bold cyan]")
plot_methods = self.plot._get_methods_for_help()
plot_methods = self.plot._sort_methods_for_help(plot_methods)

Expand Down Expand Up @@ -829,7 +829,7 @@ class _PlotMetricsAccessor(_BaseAccessor):
"""Plotting methods for the metrics accessor."""

def __init__(self, parent):
super().__init__(parent._parent, icon="🎨")
super().__init__(parent._parent, icon=":art:")
self._metrics_parent = parent

def _get_display(
Expand Down
8 changes: 4 additions & 4 deletions skore/src/skore/sklearn/_estimator/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class EstimatorReport(_HelpMixin, DirNamesMixin):
"""

_ACCESSOR_CONFIG = {
"metrics": {"icon": "πŸ“", "name": "metrics"},
"metrics": {"icon": ":straight_ruler:", "name": "metrics"},
# Add other accessors as they're implemented
# "inspection": {"icon": "πŸ”", "name": "inspection"},
# "linting": {"icon": "βœ”οΈ", "name": "linting"},
# "inspection": {"icon": ":magnifying_glass:", "name": "inspection"},
# "linting": {"icon": ":check:", "name": "linting"},
}

@staticmethod
Expand Down Expand Up @@ -338,7 +338,7 @@ def _get_cached_response_values(

def _get_help_panel_title(self):
return (
f"[bold cyan]πŸ““ Tools to diagnose estimator "
f"[bold cyan]:notebook: Tools to diagnose estimator "
f"{self.estimator_name}[/bold cyan]"
)

Expand Down
4 changes: 2 additions & 2 deletions skore/src/skore/sklearn/_plot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def _create_help_panel(self):
return Panel(
self._create_help_tree(),
title=(
f"[bold cyan]πŸ“Š {self.__class__.__name__} for {self.estimator_name}"
"[/bold cyan]"
f"[bold cyan]:bar_chart: {self.__class__.__name__} for "
f"{self.estimator_name}[/bold cyan]"
),
border_style="orange1",
expand=False,
Expand Down

0 comments on commit 7dcb197

Please sign in to comment.