Skip to content

Commit

Permalink
JUnit minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Jan 10, 2023
1 parent f99edea commit bc82ec4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void updateCellbaseInProject() throws CatalogException, JsonProcessingExc
null, "GRCh38", INCLUDE_RESULT, sessionIdUser).first();
assertNotNull(pr.getCellbase());
assertEquals("https://ws.zettagenomics.com/cellbase", pr.getCellbase().getUrl());
assertEquals("v5", pr.getCellbase().getVersion());
assertEquals(ParamConstants.CELLBASE_VERSION, pr.getCellbase().getVersion());

CellBaseConfiguration cb = new CellBaseConfiguration("https://ws.opencb.org/cellbase", "v3");
OpenCGAResult<Project> update = catalogManager.getProjectManager().setCellbaseConfiguration(pr.getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

package org.opencb.opencga.catalog.utils;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.*;
import org.opencb.biodata.models.pedigree.Individual;
import org.opencb.biodata.models.pedigree.Pedigree;
import org.opencb.commons.datastore.core.DataResult;
Expand Down Expand Up @@ -48,6 +45,7 @@
import java.net.URL;
import java.util.*;

@Ignore
public class CatalogSampleAnnotationsLoaderTest extends GenericTest {

private static final List<String> populations = Arrays.asList("ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM", "ESN", "FIN",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class CellBaseConfiguration {
@DataField(id = "version", description = "URL to CellBase REST web services, by default official ZettaGenomics installation is used")
private String version;

@DataField(id = "version", description = "CellBase data release version to be used. If empty, will use the latest")
@DataField(id = "dataRelease", description = "CellBase data release version to be used. If empty, will use the active one")
private String dataRelease;

public CellBaseConfiguration() {
Expand All @@ -60,8 +60,9 @@ public CellBaseConfiguration(String url, String version, String dataRelease) {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("CellBaseConfiguration{");
sb.append("url=").append(url);
sb.append("url='").append(url).append('\'');
sb.append(", version='").append(version).append('\'');
sb.append(", dataRelease='").append(dataRelease).append('\'');
sb.append('}');
return sb.toString();
}
Expand All @@ -75,56 +76,21 @@ public CellBaseConfiguration setUrl(String url) {
return this;
}

public String getDataRelease() {
return dataRelease;
public String getVersion() {
return version;
}

public CellBaseConfiguration setDataRelease(String dataRelease) {
this.dataRelease = dataRelease;
public CellBaseConfiguration setVersion(String version) {
this.version = version;
return this;
}

// @Deprecated
// public String getHost() {
// return url;
// }
//
// @Deprecated
// public CellBaseConfiguration setHost(String host) {
// if (host != null) {
// LoggerFactory.getLogger(CellBaseConfiguration.class).warn("Deprecated option 'cellbase.host'. Use 'cellbase.url'");
// }
// url = host;
// return this;
// }

// @Deprecated
// public List<String> getHosts() {
// return Collections.singletonList(url);
// }
//
// @Deprecated
// public CellBaseConfiguration setHosts(List<String> hosts) {
// if (hosts != null) {
// LoggerFactory.getLogger(CellBaseConfiguration.class).warn("Deprecated option 'cellbase.hosts'. Use 'cellbase.url'");
// }
// if (hosts == null || hosts.isEmpty()) {
// url = null;
// } else {
// if (hosts.size() != 1) {
// throw new IllegalArgumentException("Unsupported multiple cellbase hosts");
// }
// url = hosts.get(0);
// }
// return this;
// }

public String getVersion() {
return version;
public String getDataRelease() {
return dataRelease;
}

public CellBaseConfiguration setVersion(String version) {
this.version = version;
public CellBaseConfiguration setDataRelease(String dataRelease) {
this.dataRelease = dataRelease;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public enum VariantField {
ANNOTATION_ANCESTRAL_ALLELE(ANNOTATION, "annotation.ancestralAllele"),
ANNOTATION_ID(ANNOTATION, "annotation.id"),
ANNOTATION_XREFS(ANNOTATION, "annotation.xrefs"),
ANNOTATION_GWAS(ANNOTATION, "annotation.gwas"),
ANNOTATION_HGVS(ANNOTATION, "annotation.hgvs"),
ANNOTATION_CYTOBAND(ANNOTATION, "annotation.cytoband"),
ANNOTATION_DISPLAY_CONSEQUENCE_TYPE(ANNOTATION, "annotation.displayConsequenceType"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@
<parent>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga-storage-hadoop-deps</artifactId>
<<<<<<< HEAD
<<<<<<< HEAD
<version>2.4.11-SNAPSHOT</version>
=======
<version>2.6.0-SNAPSHOT</version>
>>>>>>> develop
=======
<version>2.6.0-SNAPSHOT</version>
>>>>>>> develop
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,7 @@
<parent>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga-storage-hadoop</artifactId>
<<<<<<< HEAD
<<<<<<< HEAD
<version>2.4.11-SNAPSHOT</version>
=======
<version>2.6.0-SNAPSHOT</version>
>>>>>>> develop
=======
<version>2.6.0-SNAPSHOT</version>
>>>>>>> develop
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit bc82ec4

Please sign in to comment.