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

Fix category parsing of quoted headers #51

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

sammacbeth
Copy link
Contributor

Most CSV parsers will write strings with whitespace with quotes. We recently changed categorized_trackers.csv in tracker-radar to go through a parser when being written, which caused some headers to get quoted. To remove any ambiguity when reading that file, this change updates getCategories to use the csv library's parsing, which will remove quotes from the header columns. I've also added some tests to confirm it works as expected.

@sammacbeth sammacbeth requested a review from dharb January 26, 2024 14:58
Copy link
Collaborator

@dharb dharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the quick fix and for adding a test!

@sammacbeth sammacbeth merged commit d8f044f into main Jan 29, 2024
2 checks passed
@sammacbeth sammacbeth deleted the sam/fix-category-parse branch January 29, 2024 07:54
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.

2 participants