-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
(I#1750) Option to remove Blank Columns upon project creation #4757
base: master
Are you sure you want to change the base?
Conversation
Three parts of changes: 1. Determine whether a column is blank: (based on OpenRefine#3497): Create a new list<Boolean> in the TabularImportingParserBase class, that represents whether each column has data. 2. If the store blank column is false, delete this column (only happens when store blank column == false): removeColumn method is created in the ColumnModel class. This will use columns.remove(all empty columns), which will remove both data lines and header lines. 3. The checkbox of the store blank column added to the front-end page. After testing with real files (csv, xls, tsv), this function works. I think it should work on other Tabular files as well, since I'm optimizing directly in the TabularImportingParserBase class. But I'm not really sure how to test in TabularImportingParserBase directly. In addition, I've tested tree files (xml, json), and now it is possible to do blank columns. So I didn't make changes.
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.
Thank you, it looks pretty good to me! It would be good to have unit tests to demonstrate the feature, for instance you could test the feature on a few tabular importers (CSV, Excel…)
// for (int j = 0; j < deletedSoFar ; j++) { | ||
// row.setCell(row.cells.size()-1-j, null); | ||
// } | ||
// } |
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.
Is this commented out code meant to be submitted in this PR? If it is not needed, I would remove it entirely.
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.
Is this commented out code meant to be submitted in this PR? If it is not needed, I would remove it entirely.
I have removed the extra code in the new commits(?). I think it is more reasonable to remove the automatically added column names when deleting blank columns.
I found the failed email just now. This is my first pull request. Is there anything else I should do? |
@wsmmxmm The reason for failling intergation is explained when you click on detaills. In your case its formatting issues. From the developers manual
|
revert "excel test" from last version
@wsmmxmm The integration error still persists.
|
Fixes #1750
Changes proposed in this pull request: