Skip to content
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

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

aturanjanin
Copy link
Contributor

Description of changes

Input/output data info displayed in the status bar.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #4455 into master will decrease coverage by 4.29%.
The diff coverage is 100%.

@@            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),
Copy link
Contributor

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)
Copy link
Contributor

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.

@aturanjanin aturanjanin changed the title [ENH] OWCorrelations: Data info displayed in the status bar [WIP][ENH] OWCorrelations: Data info displayed in the status bar Feb 28, 2020
@aturanjanin aturanjanin changed the title [WIP][ENH] OWCorrelations: Data info displayed in the status bar [ENH] OWCorrelations: Data info displayed in the status bar Feb 28, 2020
@@ -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),
Copy link
Contributor

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.

@VesnaT VesnaT merged commit e00e95d into biolab:master Feb 28, 2020
@aturanjanin aturanjanin deleted the owcorrelations branch February 28, 2020 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants