-
Notifications
You must be signed in to change notification settings - Fork 9
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: Read CSV File Redesign #706
ENH: Read CSV File Redesign #706
Conversation
joeykleingers
commented
Sep 29, 2023
•
edited
Loading
edited
- Renamed the filter from ImportCSVData to ReadCSVFile, and also renamed all parameters, widgets, utilities, and helper classes.
- Updated the parameter to only include the data required for the filter, removing unnecessary fields and make sure that all fields can be converted easily with the Python bindings.
- Updated the filter to do additional error checking and cache the file's total lines and headers to avoid reading the entire file every preflight.
- Moved the DynamicTableData tuple dimensions parameter into the CSVImporterData custom parameter.
- Removed all references to "wizard", since the UI no longer involves using a wizard.
- Updated the Python bindings to expose the new ReadCSVData struct to Python.
- Updated the Read CSV File unit test and any other unit tests that use the filter.
- Updated the regular filter documentation as well as the Python documentation.
- Renamed ImportTextFilter to ReadTextDataArrayFilter, to avoid naming confusion.
2fa3ed4
to
23f663e
Compare
src/Plugins/ComplexCore/src/ComplexCore/Filters/ImportCSVDataFilter.cpp
Outdated
Show resolved
Hide resolved
src/Plugins/ComplexCore/src/ComplexCore/Filters/ImportCSVDataFilter.cpp
Outdated
Show resolved
Hide resolved
src/Plugins/ComplexCore/src/ComplexCore/Filters/ImportCSVDataFilter.cpp
Outdated
Show resolved
Hide resolved
efd214d
to
142428e
Compare
It's probably a good idea to add a unit test for the blank line handling. |
9c7a81f
to
409862d
Compare
@JDuffeyBQ Blank lines test has been added. Approve unless there's anything else you'd like fixed/changed. |
Actually, hang on... let me add one more test that checks to make sure that the filter handles unexpected inputs for the other arguments. Like if the user inputs 0 for the start row or a number larger than the total file size for the header row, for example. |
@JDuffeyBQ Last unit test has been added. Ready for review again. |
cc2b209
to
d2a89b4
Compare
62c2722
to
7382a6f
Compare
1a3042d
to
02f1276
Compare
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
02f1276
to
4e8aaa2
Compare
Signed-off-by: Joey Kleingers <[email protected]>
74d3f37
to
4a0d178
Compare
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
I don't have a good suggestion but we have a similarly named filter in ImportTextFilter so I think that they should be easier to distinguish. |
These need renamed: [ ] ImportTextFilter -> ReadTextDataArrayFilter [ ] Rename the parameter from [ ] TextImporterData::writeJson convert the delimiters to a std::vectorstd::string BEFORE writing |
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
Signed-off-by: Joey Kleingers <[email protected]>
@imikejackson All of the most recent suggestions have been implemented. This is ready for final review and approval. |
Signed-off-by: Michael Jackson <[email protected]>
9ded331
to
30e5b6d
Compare
* Redesign CSV importer parameter data. * BUG FIX: Handle boolean types properly. * Update ConvertTo<bool> logic. * Update delimiter booleans to a vector of chars. * Rename ImportCSVDataFilter to ReadCSVFileFilter. * Rename ImportTextFilter to ReadTextDataArrayFilter. --------- Signed-off-by: Joey Kleingers <[email protected]> Signed-off-by: Michael Jackson <[email protected]> Co-authored-by: Michael Jackson <[email protected]>