Skip to content
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

allow missing CVR headers #818

Merged
merged 10 commits into from
Jun 17, 2024
Merged

Conversation

artoonie
Copy link
Collaborator

@artoonie artoonie commented Mar 31, 2024

closes #813

This type of CSV is allowed and I don't see a reason to not support it. Added a test to account for it.

Because getHeaderNames skips all null/empty columns, I had to move away from using the built-in header parser.

I also put the Generic CSV Writer behind a encounteredSourceProblem flag since it will lead to more exceptions on failure.

@yezr
Copy link
Collaborator

yezr commented Apr 12, 2024

Do we need to then add some basic validation checks to make sure that each candidate column has characters? I created a .csv generic_csv_test_cvr_2.csv that has a blank candidate name and I get the following error.

image

@artoonie
Copy link
Collaborator Author

Good catch -- yes, will need to fix that.

@artoonie artoonie added the WIP label Apr 12, 2024
@artoonie artoonie self-assigned this Apr 12, 2024
@artoonie artoonie force-pushed the bugfix/issue-813_cvr-missing-header branch from f0f4b40 to ec6879d Compare April 12, 2024 19:16
@artoonie artoonie removed the WIP label Apr 12, 2024
@artoonie
Copy link
Collaborator Author

Fixed -- it took a bit more work than expected, the built-in header parser really doesn't like null header names, even though it's fairly common practice in CVRs/Spreadsheets to have empty headers...go ahead and give this a whirl?

@yezr
Copy link
Collaborator

yezr commented Apr 17, 2024

image success!

@artoonie artoonie force-pushed the bugfix/issue-813_cvr-missing-header branch from 43ffd86 to e92bf84 Compare June 14, 2024 23:28
@artoonie artoonie merged commit 9db43dc into develop Jun 17, 2024
1 check passed
@artoonie artoonie deleted the bugfix/issue-813_cvr-missing-header branch June 17, 2024 17:17
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.

CSV Candidate Auto-Load fails if no text in upper left corner
3 participants