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

Datatype I/O fixes #7995

Merged
merged 14 commits into from
May 17, 2019
Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented May 17, 2019

trying a different newline replacement strategy and paramterizing unit test

jmchilton and others added 11 commits May 15, 2019 15:56
Behavior changes:
 - Now includes a trailing new line if the input contained a trailing newline.
 - Now returns only as many lines as are present if the file contains fewer lines than LINE_COUNT.
- Fix bug where sep2tabs didn't work with '\r\n'
- Fix bug where sep2tabs didn't work with '\r' - we were opening it with universal newlines.
- Fix memory bug where convert_newlines would read unbounded buffers - other methods still do though :(.
- Simplify convert_newlines to just let universal newline handling handle the conversion.
@jmchilton
Copy link
Member

This is amazing @mvdbeek - thanks for saving me from this, I was really getting lost in the weeds and everything here looks amazing now.

@mvdbeek mvdbeek marked this pull request as ready for review May 17, 2019 13:14
@mvdbeek mvdbeek changed the title Jmchilton newline fixes Datatype I/O fixes May 17, 2019
@mvdbeek
Copy link
Member Author

mvdbeek commented May 17, 2019

OK, this removes some dead code and should be much more resilient to files with non-standard encoding. Should fix #7412 and #7957

@jmchilton
Copy link
Member

I'm going to backport all of this to 19.05, some of it (e.g. ed24664 probably should go back to 19.01 also).

@jmchilton jmchilton merged commit 96d6b05 into galaxyproject:dev May 17, 2019
jmchilton added a commit that referenced this pull request May 17, 2019
jmchilton added a commit that referenced this pull request May 19, 2019
@mvdbeek mvdbeek deleted the jmchilton-newline_fixes branch March 1, 2021 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants