Skip to content

[ENH] OWCorrelations: Data info displayed in the status bar#4455

Merged
VesnaT merged 1 commit into
biolab:masterfrom
aturanjanin:owcorrelations
Feb 28, 2020
Merged

[ENH] OWCorrelations: Data info displayed in the status bar#4455
VesnaT merged 1 commit into
biolab:masterfrom
aturanjanin:owcorrelations

Conversation

@aturanjanin
Copy link
Copy Markdown
Contributor

Description of changes

Input/output data info displayed in the status bar.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link
Copy Markdown

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

Comment thread Orange/widgets/data/owcorrelations.py Outdated
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
Copy Markdown
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.

Comment thread Orange/widgets/data/owcorrelations.py Outdated
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
Copy Markdown
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
Comment thread Orange/widgets/data/owcorrelations.py Outdated
corr_table.name = "Correlations"

self.Outputs.data.send(self.data)
self.info.set_output_summary(len(self.data),
Copy link
Copy Markdown
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