From 07f2217d44a04e1b3829968a2fd7484e6efb1c22 Mon Sep 17 00:00:00 2001 From: Aleksandra Date: Fri, 6 Mar 2020 11:01:48 +0100 Subject: [PATCH] Data info displayed in the status bar --- Orange/widgets/data/owcontinuize.py | 8 ++++++-- Orange/widgets/data/tests/test_owcontinuize.py | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Orange/widgets/data/owcontinuize.py b/Orange/widgets/data/owcontinuize.py index 5573d81eba8..fb2ebf1f466 100644 --- a/Orange/widgets/data/owcontinuize.py +++ b/Orange/widgets/data/owcontinuize.py @@ -13,6 +13,7 @@ from Orange.widgets.settings import Setting from Orange.widgets.utils.sql import check_sql_input from Orange.widgets.utils.widgetpreview import WidgetPreview +from Orange.widgets.utils.state_summary import format_summary_details from Orange.widgets.widget import Input, Output @@ -116,7 +117,8 @@ def setData(self, data): self.info.set_output_summary(self.info.NoOutput) self.Outputs.data.send(None) else: - self.info.set_input_summary(len(data)) + self.info.set_input_summary(len(data), + format_summary_details(data)) self.unconditional_commit() def enable_normalization(self): @@ -151,9 +153,11 @@ def commit(self): domain = continuizer(self.data) data = self.data.transform(domain) self.Outputs.data.send(data) - self.info.set_output_summary(len(data)) + self.info.set_output_summary(len(data), + format_summary_details(data)) else: self.Outputs.data.send(self.data) # None or empty data + self.info.set_output_summary(self.info.NoOutput) def send_report(self): diff --git a/Orange/widgets/data/tests/test_owcontinuize.py b/Orange/widgets/data/tests/test_owcontinuize.py index dfbe71abdcc..72ba6e3f4b3 100644 --- a/Orange/widgets/data/tests/test_owcontinuize.py +++ b/Orange/widgets/data/tests/test_owcontinuize.py @@ -10,6 +10,7 @@ from Orange.widgets.data import owcontinuize from Orange.widgets.data.owcontinuize import OWContinuize from Orange.widgets.tests.base import WidgetTest +from Orange.widgets.utils.state_summary import format_summary_details from orangewidget.widget import StateInfo @@ -48,9 +49,11 @@ def test_summary(self): output_sum = self.widget.info.set_output_summary = Mock() self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(int(StateInfo.format_number(len(data)))) + input_sum.assert_called_with(len(data), + format_summary_details(data)) output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(int(StateInfo.format_number(len(output)))) + output_sum.assert_called_with(len(output), + format_summary_details(output)) input_sum.reset_mock() output_sum.reset_mock()