-
Notifications
You must be signed in to change notification settings - Fork 597
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
Splitting out gatk-testUtils as a separate artifact #5112
Changes from all commits
da30c59
d7f450c
73bc6eb
a532ed2
38945dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,8 +182,19 @@ compileTestJava { | |
options.compilerArgs = ['-proc:none', '-Xlint:all', '-Werror', '-Xdiags:verbose'] | ||
} | ||
|
||
|
||
sourceSets { | ||
testUtils | ||
} | ||
|
||
// Dependency change for including MLLib | ||
configurations { | ||
testUtilsCompile.extendsFrom compile | ||
testUtilsRuntime.extendsFrom runtime | ||
|
||
testCompile.extendsFrom testUtilsCompile | ||
testRuntime.extendsFrom testUtilsRuntime | ||
|
||
compile.exclude module: 'jul-to-slf4j' | ||
compile.exclude module: 'javax.servlet' | ||
compile.exclude module: 'servlet-api' | ||
|
@@ -279,8 +290,6 @@ dependencies { | |
} | ||
|
||
compile 'org.jgrapht:jgrapht-core:0.9.1' | ||
compile 'org.testng:testng:' + testNGVersion //compile instead of testCompile because it is needed for test infrastructure that needs to be packaged | ||
compile 'org.apache.hadoop:hadoop-minicluster:' + hadoopVersion | ||
|
||
compile('org.seqdoop:hadoop-bam:' + hadoopBamVersion) { | ||
exclude group: 'org.apache.hadoop' | ||
|
@@ -325,6 +334,12 @@ dependencies { | |
// Required for SV Discovery machine learning | ||
compile group: 'biz.k11i', name: 'xgboost-predictor', version: '0.3.0' | ||
|
||
testUtilsCompile sourceSets.main.output | ||
testUtilsCompile 'org.testng:testng:' + testNGVersion | ||
testUtilsCompile 'org.apache.hadoop:hadoop-minicluster:' + hadoopVersion | ||
|
||
testCompile sourceSets.testUtils.output | ||
|
||
testCompile "org.mockito:mockito-core:2.10.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can/should mockito be moved to testUtilsCompile ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can, but there's no reason to do so. Nothing in testUtils uses it. We can move it when / if we need it. Best to keep dependencies scoped as narrowly as possible I think. Similar issue with jimfs. I suspect your ArgumentsBuilder branch will require jimfs to move to testUtils. |
||
testCompile "com.google.jimfs:jimfs:1.1" | ||
} | ||
|
@@ -677,6 +692,11 @@ task sourcesJar(type: Jar) { | |
classifier = 'sources' | ||
} | ||
|
||
task testUtilsJar(type: Jar){ | ||
baseName = "$project.name-test-utils" | ||
from sourceSets.testUtils.output | ||
} | ||
|
||
tasks.withType(Javadoc) { | ||
// do this for all javadoc tasks, including gatkDoc | ||
options.addStringOption('Xdoclint:none') | ||
|
@@ -690,6 +710,29 @@ javadoc { | |
include '**/*.java' | ||
} | ||
|
||
|
||
task testUtilsJavadoc(type: Javadoc) { | ||
// This is a hack to disable the java 8 default javadoc lint until we fix the html formatting | ||
// We only want to do this for the javadoc task, not gatkDoc | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
source = sourceSets.testUtils.allJava | ||
classpath = sourceSets.testUtils.runtimeClasspath | ||
destinationDir = file("$docBuildDir/testUtilsJavadoc") | ||
include '**/*.java' | ||
} | ||
|
||
task testUtilsJavadocJar(type: Jar, dependsOn: testUtilsJavadoc){ | ||
baseName = "$project.name-test-utils" | ||
classifier = 'javadoc' | ||
from "$docBuildDir/testUtilsJavadoc" | ||
} | ||
|
||
task testUtilsSourceJar(type: Jar){ | ||
baseName = "$project.name-test-utils" | ||
classifier = 'source' | ||
from sourceSets.testUtils.allSource | ||
} | ||
|
||
// Generate GATK Online Doc | ||
task gatkDoc(type: Javadoc, dependsOn: classes) { | ||
final File gatkDocDir = new File("$docBuildDir/gatkdoc") | ||
|
@@ -782,13 +825,18 @@ task gatkTabComplete(type: Javadoc, dependsOn: classes) { | |
options.addStringOption("caller-post-arg-max-occurs", "1 1 1 1 1 1 1 1 1 1") | ||
} | ||
|
||
|
||
|
||
/** | ||
*This specifies what artifacts will be built and uploaded when performing a maven upload. | ||
*/ | ||
artifacts { | ||
archives jar | ||
archives javadocJar | ||
archives sourcesJar | ||
archives testUtilsJar | ||
archives testUtilsJavadocJar | ||
archives testUtilsSourceJar | ||
|
||
} | ||
//remove zip and tar added by the application plugin | ||
|
@@ -803,6 +851,17 @@ signing { | |
sign configurations.archives | ||
} | ||
|
||
def gatkArtifactFilter = { artifact, file -> artifact.name == 'gatk' } | ||
def gatkTestUtilsArtifactFilter = {artifact, file -> artifact.name == 'gatk-test-utils' } | ||
|
||
install { | ||
install { | ||
repositories.mavenInstaller { | ||
addFilter('gatk', gatkArtifactFilter) | ||
addFilter('gatk-test-utils', gatkTestUtilsArtifactFilter) | ||
} | ||
} | ||
} | ||
/** | ||
* Upload a release to sonatype. You must be an authorized uploader and have your sonatype | ||
* username and password information in your gradle properties file. See the readme for more info. | ||
|
@@ -825,6 +884,9 @@ uploadArchives { | |
authentication(userName: System.env.ARTIFACTORY_USERNAME, password: System.env.ARTIFACTORY_PASSWORD) | ||
} | ||
|
||
addFilter('gatk', gatkArtifactFilter) | ||
addFilter('gatk-test-utils', gatkTestUtilsArtifactFilter) | ||
|
||
pom.project { | ||
name 'GATK4' | ||
packaging 'jar' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package org.broadinstitute.hellbender.tools.funcotator.dataSources.gencode; | ||
|
||
import com.google.common.annotations.VisibleForTesting; | ||
import com.google.common.collect.Sets; | ||
import htsjdk.samtools.SAMSequenceRecord; | ||
import htsjdk.samtools.reference.ReferenceSequence; | ||
import htsjdk.samtools.util.Locatable; | ||
|
@@ -23,7 +24,6 @@ | |
import org.broadinstitute.hellbender.utils.param.ParamUtils; | ||
import org.broadinstitute.hellbender.utils.read.ReadUtils; | ||
import org.broadinstitute.hellbender.utils.variant.GATKVariantContextUtils; | ||
import org.testng.collections.Sets; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OMG! |
||
|
||
import java.nio.file.Path; | ||
import java.util.*; | ||
|
@@ -108,16 +108,16 @@ public class GencodeFuncotationFactory extends DataSourceFuncotationFactory { | |
*/ | ||
private static final Set<GencodeFuncotation.VariantClassification> codingVariantClassifications = | ||
Sets.newHashSet(Arrays.asList(GencodeFuncotation.VariantClassification.MISSENSE, | ||
GencodeFuncotation.VariantClassification.NONSENSE, | ||
GencodeFuncotation.VariantClassification.NONSTOP, | ||
GencodeFuncotation.VariantClassification.SILENT, | ||
GencodeFuncotation.VariantClassification.IN_FRAME_DEL, | ||
GencodeFuncotation.VariantClassification.IN_FRAME_INS, | ||
GencodeFuncotation.VariantClassification.FRAME_SHIFT_INS, | ||
GencodeFuncotation.VariantClassification.FRAME_SHIFT_DEL, | ||
GencodeFuncotation.VariantClassification.START_CODON_SNP, | ||
GencodeFuncotation.VariantClassification.START_CODON_INS, | ||
GencodeFuncotation.VariantClassification.START_CODON_DEL)); | ||
GencodeFuncotation.VariantClassification.NONSENSE, | ||
GencodeFuncotation.VariantClassification.NONSTOP, | ||
GencodeFuncotation.VariantClassification.SILENT, | ||
GencodeFuncotation.VariantClassification.IN_FRAME_DEL, | ||
GencodeFuncotation.VariantClassification.IN_FRAME_INS, | ||
GencodeFuncotation.VariantClassification.FRAME_SHIFT_INS, | ||
GencodeFuncotation.VariantClassification.FRAME_SHIFT_DEL, | ||
GencodeFuncotation.VariantClassification.START_CODON_SNP, | ||
GencodeFuncotation.VariantClassification.START_CODON_INS, | ||
GencodeFuncotation.VariantClassification.START_CODON_DEL)); | ||
|
||
|
||
//================================================================================================================== | ||
|
This file was deleted.
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.
Finally these two out of my toolkit dependencies!
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.
:)