-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] OWCorrelations: Data info displayed in the status bar #4455
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4455 +/- ##
==========================================
- Coverage 87.46% 83.16% -4.3%
==========================================
Files 405 268 -137
Lines 74128 53997 -20131
==========================================
- Hits 64836 44907 -19929
+ Misses 9292 9090 -202 |
@@ -352,12 +356,16 @@ def set_data(self, data): | |||
cont_data = Table.from_table(Domain(cont_vars), data) | |||
remover = Remove(Remove.RemoveConstant) | |||
cont_data = remover(cont_data) | |||
self.info.set_input_summary(len(data), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Info is not updated with one instance on the input.
@@ -384,6 +392,7 @@ def commit(self): | |||
self.Outputs.data.send(self.data) | |||
self.Outputs.features.send(None) | |||
self.Outputs.correlations.send(None) | |||
self.info.set_output_summary(self.info.NoOutput) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This it not correct info when self.cont_data is None
and self.data is not None
.
38e986a
to
cd44a14
Compare
@@ -402,6 +415,8 @@ def commit(self): | |||
corr_table.name = "Correlations" | |||
|
|||
self.Outputs.data.send(self.data) | |||
self.info.set_output_summary(len(self.data), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid duplicated code, I'd suggest removing upper to lines and add something like:
def commit(self):
self.Outputs.data.send(self.data)
summary = len(self.data) if self.data else self.info.NoOutput
detail = format_summary_details(self.data) if self.data else ""
self.info.set_output_summary(summary, detail)
if self.data is None or self.cont_data is None:
self.Outputs.features.send(None)
self.Outputs.correlations.send(None)
return
at the beginning of the function.
cd44a14
to
1ca1db5
Compare
Description of changes
Input/output data info displayed in the status bar.
Includes