-
Notifications
You must be signed in to change notification settings - Fork 67
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
[SVCS-531] Improve tabular renderer to handle more TSV cases #308
base: develop
Are you sure you want to change the base?
[SVCS-531] Improve tabular renderer to handle more TSV cases #308
Conversation
Csv.sniff could cause random characters or spaces to be used as the delimiter. Separating these functions and using a hard coded dialect fixes this display problem.
SVCS-531 Our handling of CVS/TSV files was convoluted and unnecessary, this cleaned up and simplified. Collateral- Updated two tests that were working fine, but producing unnecessary noise in the test logs.
@felliott The previous PR was already Phase 2. Do you want to review this or should I do another round of phase 1? |
I'll take it. Phase 2 is good. |
Sounds good! Added Phase 2 label to the PR. |
hey guys, i think you may have some issues with this:
i remember having issues with the jamovi csv importer when the data returned didn't end with a complete line. i worked around it thus:
and
https://github.com/jamovi/jamovi/blob/master/server/jamovi/server/formatio/csv.py#L85 i'd also take exception to this:
i don't think excel saves .csv files separated by commas by default |
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.
As mentioned by @jonathon-love, there are some issues with out implementation and we need to double check our assumptions about CSV and TSV files.
Credits goes to @AddisonSchiller and @TomBaxter for the original work. I will take over for the update/fix.
Ticket
SVCS-531
Purpose
[SVCS-531] Improve tabular renderer to handle more TSV cases
Changes
mfr/extensions/tabular/libs/init.py
mfr/extensions/tabular/libs/stdlib_tools.py
mfr/extensions/tabular/settings.py
tests/extensions/tabular/files/invalid_null.csv
tests/extensions/tabular/test_stdlib_tools.py
tests/extensions/ipynb/files/no_metadata.ipynb - quiet test (incidental)
tests/extensions/zip/test_renderer.py - quiet test (incidental)
Side effects
Possible increase in system resource use due to full file being sniffed
QA Notes
In addition to the tsv files found in https://osf.io/pexrv/?view_only=af771fef666049a9aefa85642230e80a also test json_test.csv attached to ticket.
This ticket only effects .tsv and .csv files rendered in MFR.
Deployment Notes
None