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

adding new overloads to IOUtils with Path for some file only methods #1296

Merged
merged 4 commits into from
Feb 21, 2019

Conversation

lbergelson
Copy link
Member

Description

Add Path overloads of some functions in IOUtil that were missing them.
Fixes #1294

Checklist

  • Code compiles correctly
  • New tests covering changes and new functionality
  • All tests passing
  • Extended the README / documentation, if necessary
  • Is not backward compatible (breaks binary or source compatibility)

@codecov-io
Copy link

codecov-io commented Feb 20, 2019

Codecov Report

Merging #1296 into master will increase coverage by 0.234%.
The diff coverage is 61.538%.

@@               Coverage Diff               @@
##              master     #1296       +/-   ##
===============================================
+ Coverage     67.508%   67.742%   +0.234%     
- Complexity      8148      8332      +184     
===============================================
  Files            557       560        +3     
  Lines          33384     33883      +499     
  Branches        5631      5751      +120     
===============================================
+ Hits           22537     22953      +416     
- Misses          8662      8727       +65     
- Partials        2185      2203       +18
Impacted Files Coverage Δ Complexity Δ
src/main/java/htsjdk/samtools/util/IOUtil.java 57.606% <61.538%> (+0.463%) 118 <11> (+3) ⬆️
...samtools/util/AsyncBlockCompressedInputStream.java 72% <0%> (-4%) 12% <0%> (-1%)
...ava/htsjdk/samtools/CRAMContainerStreamWriter.java 70.612% <0%> (-0.289%) 54% <0%> (ø)
...dk/samtools/util/IntervalCoordinateComparator.java 58.333% <0%> (ø) 6% <0%> (?)
.../main/java/htsjdk/samtools/util/IntervalCodec.java 79.412% <0%> (ø) 8% <0%> (?)
.../java/htsjdk/samtools/util/IntervalListWriter.java 88% <0%> (ø) 5% <0%> (?)
...rc/main/java/htsjdk/samtools/util/BinaryCodec.java 70.183% <0%> (+0.459%) 57% <0%> (+1%) ⬆️
src/main/java/htsjdk/samtools/BAMFileReader.java 68.665% <0%> (+0.817%) 52% <0%> (+1%) ⬆️
src/main/java/htsjdk/samtools/util/Interval.java 63.636% <0%> (+1.818%) 26% <0%> (+1%) ⬆️
src/main/java/htsjdk/samtools/util/StringUtil.java 70.936% <0%> (+1.97%) 73% <0%> (+2%) ⬆️
... and 4 more

@lbergelson lbergelson mentioned this pull request Feb 20, 2019
5 tasks
src/main/java/htsjdk/samtools/util/IOUtil.java Outdated Show resolved Hide resolved
try( final Writer out = IOUtil.openFileForBufferedWriting(tmp)){
out.write(expected);
}
try( final BufferedReader in = IOUtil.openFileForBufferedReading(tmp)){
Copy link
Contributor

Choose a reason for hiding this comment

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

can you somehow check that the zipped files are really zipped and that the plaintext ones are really plaintext?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Yossi Farjoun and others added 2 commits February 21, 2019 14:09
@lbergelson
Copy link
Member Author

@yfarjoun I responded to your comments, good to go?

Copy link
Contributor

@yfarjoun yfarjoun left a comment

Choose a reason for hiding this comment

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

no need for final in TWR..also spaces

src/test/java/htsjdk/samtools/util/IOUtilTest.java Outdated Show resolved Hide resolved
src/test/java/htsjdk/samtools/util/IOUtilTest.java Outdated Show resolved Hide resolved
src/test/java/htsjdk/samtools/util/IOUtilTest.java Outdated Show resolved Hide resolved
change spaces

Co-Authored-By: lbergelson <[email protected]>
@lbergelson lbergelson merged commit 3b3d107 into master Feb 21, 2019
@lbergelson lbergelson deleted the lb_more_path_methods_ioutil branch February 21, 2019 21:59
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.

3 participants