Skip to content

Commit

Permalink
Adding http-nio as a dependency (#1929)
Browse files Browse the repository at this point in the history
* This is a plugin which provides HttpFileSystemProvider which allows connecting to http(s) paths
  through the nio Path and Files interfaces.
* Updating htsjdk to 4.1.0 which improves support for plugins lke this in Tribble.
* Adding an extremely simple test to show that http-nio is available
  • Loading branch information
lbergelson authored Dec 19, 2023
1 parent 5e2c94a commit e7f9a54
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def ensureBuildPrerequisites(buildPrerequisitesMessage) {

ensureBuildPrerequisites(buildPrerequisitesMessage)

final htsjdkVersion = System.getProperty('htsjdk.version', '4.0.2')
final htsjdkVersion = System.getProperty('htsjdk.version', '4.1.0')
dependencies {
implementation('com.intel.gkl:gkl:0.8.11') {
exclude module: 'htsjdk'
Expand All @@ -76,8 +76,10 @@ dependencies {
implementation 'org.openjdk.nashorn:nashorn-core:15.4'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.cloud:google-cloud-nio:0.127.0'
implementation 'org.broadinstitute:http-nio:1.1.0'
implementation 'commons-io:commons-io:2.11.0'


testImplementation 'org.testng:testng:7.7.0'
}

Expand Down
17 changes: 17 additions & 0 deletions src/test/java/picard/nio/HttpNioIntegrationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package picard.nio;

import htsjdk.samtools.util.IOUtil;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.IOException;
import java.nio.file.Files;

public class HttpNioIntegrationTest {
@Test
public void testCanReadFromHttpsPath() throws IOException {
final String theWholeReadme = Files.readString(IOUtil.getPath("https://raw.githubusercontent.com/broadinstitute/picard/master/README.md"));
Assert.assertTrue(theWholeReadme.contains("Picard"));
}

}
1 change: 1 addition & 0 deletions testdata/picard/util/BedToIntervalListTest/simple.bed
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

chr1 100 2000
chr1 3000 4000

0 comments on commit e7f9a54

Please sign in to comment.