-
-
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] Data Info widget displays data attributes #3022
Conversation
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.
Apart from 2 minor comments in the code, the main issue I see is that this widget cannot be resized but fits to its contents automatically. The new Data Attributes
box does not wrap text nicely and will result in strange looking widget geometry for larger meta data - this can already be seen in e.g. iris
(which does not really have a long description/reference).
Data Attributes box should probably have a max width and wrap longer text.
self.widget = self.create_widget(OWDataInfo) | ||
|
||
def test_data(self): | ||
"""No crash on empty 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.
Wrong docstring (the data in this test is not empty).
@@ -179,10 +177,14 @@ def join_if(items): | |||
("{} textual", str_metas) | |||
)) | |||
|
|||
if data.attributes: | |||
self.data_attributes = pack_table(data.attributes.items()) |
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.
else:
self.data_attributes = ""
to clear this box for data without attributes.
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.
Long data attribute labels are now stripped. I decided against wrapping, as this would solve only the problem for shorter labels and or longer labels we would need to implement something entirely different.
Codecov Report
@@ Coverage Diff @@
## master #3022 +/- ##
==========================================
+ Coverage 82.12% 82.19% +0.06%
==========================================
Files 334 335 +1
Lines 57659 57688 +29
==========================================
+ Hits 47355 47417 +62
+ Misses 10304 10271 -33 |
Issue
Some data in orange contain meta information about the data table. For instance, bioinformatics add-on passes the data on the organism or location of gene names by adding this information in .attributes field of the Orange data table. While this information is used in practically all bioinformatics widgets, there is no widget that would explicitly display this information.
Description of changes
The box Data Attributes was added to the widget.
Includes