-
-
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
OWCSVImport: Get ready for OWFile merge #5077
base: master
Are you sure you want to change the base?
Conversation
4d50c06
to
13a54b3
Compare
Codecov Report
@@ Coverage Diff @@
## master #5077 +/- ##
==========================================
- Coverage 86.38% 86.35% -0.03%
==========================================
Files 304 304
Lines 61753 61870 +117
==========================================
+ Hits 53343 53428 +85
- Misses 8410 8442 +32 |
No it has to be a part of import dialog. The type casting has to be done on actual text values as read from the file. You cannot for instance read text column of codes '000', '007', '008', (them being converted to numbers) and then convert to text or categorical. |
You are absolutely right. This would warrant a warning when changing a variable that was imported as numeric to string in the domain editor. |
@ales-erjavec On second thought, what if everything were imported as text initially, and cast to whatever attribute type was selected/automatically determined afterward? |
Then memory consumption (and probably overall performance) would be on par with File. |
I see, warning it is then. |
From the user perspective, my only objection is that the options button is now rather hidden. I loaded some data where I needed to chose the decimal number format, and had to look around for the button. In terms of the flow, you first select the file, then set delimiters etc, and the you edit domain. Perhaps the layout should follow this. |
13a54b3
to
5973430
Compare
59aa70a
to
1e8269e
Compare
I have a couple of comments.
|
Agreed, I was just playing around/experimenting. How's this?
Can you attach a video of this?
Reproduced on master. |
'may result in altered values.\n' | ||
'For example, 001 turns into 1.\n' | ||
'Change the variable type to String in ' | ||
'the Import Options to avoid this.') |
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 warning is too long (but I'll admit, I have no better alternative either). In the widget it looks like it's just one line and it leaves the user confused. I didn't see there's more text until I checked it here. Also, when hovering over the warning, only the missing part of the warning showed in the tooltip? That is weird - is it intentional? 🤔 If we have long warnings, then there must be eliding (...) so that the user knows to look for more information, IMO.
Also, newline character is missing at the end of the first line (or a space, your choice).
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 seems like a general problem, maybe we should put a little down arrow at the end of warnings with more details
I could move it closer.
This isn't ready to replace the File widget, just adds a domain editor and rearranges the gui.
Some info is good, but CSV doesn't make good use of it. I'll use File's info box later on. |
Here are my latest comments:
Something that is a problem on master as well: |
This is what I'm working with now. I've realized that users need a 'tangible' view of data to intuit that data exists there. E.g., when I asked users to describe a basic workflow, they described 'A file is loaded in the File widget, then it is transformed into a table in the Data Table widget, ...'. Hopefully with a table view in the file loading widget, this confusion will go away. |
Some work still required in maintaining consistency between import options and domain editor - establishing a singular deduplication mechanism
5f89fb9
to
38e9d7c
Compare
Before it would set the wrong chice sometimes, as the combobox would move under your cursor and be set again
This would fail with google sheets if it included #gid=?
38e9d7c
to
797ab7b
Compare
This should be ready to replace OWFile. Lots of bugs which were also present in OWFile were fixed, particularly with loading URLs and spreadsheets. That said, it still needs better coverage, and the lint is pretty bad – I'm calling a lot of private stuff in io/owfile/owtable. Check it out though, I think it works pretty great :) |
This works very well! I have tested:
I propose to disable selection in a data table, because it is misleading (no effect on the output). Perhaps turning of sorting would not be bad either, because the table is just a (pre)view here. But if everyone thinks this is valuable, let's keep it. |
Issue
First step in fixing #3997.
Description of changes
Adds a domain editor widget to CSV File Import. This is the first and probably most complicated step in merging CSV File Import and File.
I ignored context settings for now, @janezd, this is something I'd rather let you implement.
I tried to keep it clean, but I did something hacky in
Orange.widgets.data.owcsvimport.Options
, to insert the set type in between the Option ranges, and inOrange.widgets.utils.domaineditor.DomainEditor
, to store the original column ordering (domain loses this information by converting to attributes/meta/class). @ales-erjavec, feel free to nitpick the implementation, I'll do my best to make it as nice as I can.Some things to note:
The logic is that you use the Import dialogue for importing, and afterward, Domain Editor for domain editing. Following this line of thought, it seems like setting column types shouldn't be a feature of the import dialogue. I'm quite partial to the interface though, so I'd like to keep it. Domain editor would need a way to edit several columns types at a time before I'm willing to give it up. I suppose the 'not being able to cast text to numerical' issue is a wontfix, and users likely wouldn't stumble upon it, or would find the fix for it by themselves (reimporting with the correct vartype).
Is there a reason OWFile's domain editor has an Apply button? Would this be necessary in OWCSVImport, given the comprehensive import options?
Future work in merging CSVFileImport and File includes:
Includes