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

Release Candidate 4.0.0 #579

Merged
merged 75 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
48e733f
Merge Back 3.1.1-SNAPSHOT
rtisma Dec 13, 2019
f5065ef
Merge pull request #567 from overture-stack/mergeback-3.1.1-SNAPSHOT
rtisma Dec 13, 2019
92a4adb
sql migration script working and added infra to test it with docker-c…
rtisma Dec 17, 2019
92ae300
renamed base schema and added json schema changes
rtisma Dec 17, 2019
23fae08
changed female to Female
rtisma Dec 17, 2019
01c7ed6
change male to Male
rtisma Dec 17, 2019
8d12963
fixed failing tests
rtisma Dec 17, 2019
5017f27
formatted
rtisma Dec 17, 2019
3566cd3
Merge pull request #568 from overture-stack/song-557-gender-filetype
rtisma Dec 17, 2019
31407f8
Merge branch 'develop' into song-559-change-base-schema
rtisma Dec 17, 2019
085d3f7
updated studyId on the code side
rtisma Dec 17, 2019
21b64ef
change study to studyId in server
rtisma Dec 17, 2019
11a450c
fixed studyId outside of server
rtisma Dec 17, 2019
3b023f0
update presentation of info field to not_empty
rtisma Dec 17, 2019
df0cd62
renamed the sample field in the java analysis model to samples
rtisma Dec 17, 2019
af8b1dc
renamed sample to samples in json fixtures
rtisma Dec 17, 2019
fe7795d
fixed failing tests for sample->samples rename
rtisma Dec 18, 2019
24cf094
renamed file to files for java models
rtisma Dec 18, 2019
43b0c89
renamed field file->files in json test fixtures
rtisma Dec 18, 2019
1641329
passing tests for file->files rename
rtisma Dec 18, 2019
f6f36d2
changed /upload endpoint to /submit
rtisma Dec 18, 2019
dbcf8e0
added data_type to java code
rtisma Dec 18, 2019
94094ed
Merge pull request #570 from overture-stack/file-study-submit-sample-…
rtisma Dec 18, 2019
6e15436
updated test fixtures with dataType
rtisma Dec 18, 2019
2f2fc55
test passing for dataType change
rtisma Dec 18, 2019
9716bbb
Merge branch 'song-559-change-base-schema' into type-changes
rtisma Dec 18, 2019
0c3a33e
renamed donorSubmitterId to submitterDonorId in code
rtisma Dec 18, 2019
66bb64d
changed specimenSubmitterId to submitterSpecimenId
rtisma Dec 18, 2019
9404c84
changed sampleSubmitterId to sampleSpecimenId
rtisma Dec 18, 2019
2eb91a8
deleted unused code and deprecated VariantCall and SequencingCall leg…
rtisma Dec 19, 2019
185fafe
cleaned up old comments and unused code. Added migrations for tumour …
rtisma Dec 20, 2019
8d0bd45
added tumourNormalDesignation and specimenTissueSource
rtisma Dec 20, 2019
f811774
added fix script
rtisma Dec 22, 2019
33c7762
updated
rtisma Jan 2, 2020
8279d34
fixed
rtisma Jan 2, 2020
7a374a9
updated
rtisma Jan 2, 2020
cf7cea0
updated
rtisma Jan 2, 2020
94cc061
added ordering
rtisma Jan 2, 2020
f357200
updated json test fixtures
rtisma Jan 2, 2020
a9c63c5
all tests passing
rtisma Jan 2, 2020
6140e3a
Bugfix: Exported payload now works correctly.
KevinFHartmann Jan 2, 2020
2142856
Documentation: Fixed README
KevinFHartmann Jan 2, 2020
b513c54
Merge branch 'develop' into BUG-client-export-not-writing-to-director…
KevinFHartmann Jan 2, 2020
0270f56
Data fix: Should now pass validation
KevinFHartmann Jan 3, 2020
2c33610
Merge pull request #572 from overture-stack/BUG-client-export-not-wri…
KevinFHartmann Jan 3, 2020
67dbbb3
fixed tumourNormalDesignation and added matched normal and did migration
rtisma Jan 3, 2020
9c473b2
updated all json fixtures
rtisma Jan 3, 2020
c9754c9
updated
rtisma Jan 3, 2020
bc8b426
fixed failing tests
rtisma Jan 6, 2020
b185562
updated code rename from donorGender to gender
rtisma Jan 6, 2020
99c37a5
test passing and ready to merge into main feature branch
rtisma Jan 6, 2020
c262c38
Merge branch 'develop' into song-559-change-base-schema
rtisma Jan 6, 2020
f7d5102
removed helper python script
rtisma Jan 6, 2020
81cd8de
typo: forgot to remove specimenClass and undeprecate speciemnType for…
rtisma Jan 6, 2020
bd86319
merged all migrations created in this branch into 1 file
rtisma Jan 6, 2020
0312dae
Enhancement: No longer includes dcc-common/dcc-id modules. Compiles.
KevinFHartmann Jan 6, 2020
5923936
Bugfix: Now compiles and runs unit tests (mvn clean package runs)
KevinFHartmann Jan 6, 2020
2ae28f4
Bugfix: Now runs all unit-test and make test-* steps correctly
KevinFHartmann Jan 7, 2020
89ef5ff
Merge pull request #573 from overture-stack/song-559-change-base-schema
rtisma Jan 7, 2020
dd5fab6
Merge branch 'develop' into Remove_dcc-common_and_dcc-id_dependency#503
KevinFHartmann Jan 7, 2020
d42e264
Change: Now use a Separators enum consisting of Joiners and Splitters…
KevinFHartmann Jan 7, 2020
845bd8e
updated base schema for submitter ids and db migration. sample_type a…
rtisma Jan 8, 2020
a7c4e57
Merge pull request #574 from overture-stack/Remove_dcc-common_and_dcc…
KevinFHartmann Jan 8, 2020
4531b89
fixed failing tests
rtisma Jan 8, 2020
5fb54a9
Merge branch 'develop' into base-schema-migration-fix
rtisma Jan 8, 2020
020528e
fixed typo
rtisma Jan 8, 2020
6812ea0
made test pass
rtisma Jan 8, 2020
15b6559
Merge pull request #575 from overture-stack/base-schema-migration-fix
rtisma Jan 8, 2020
c75df79
updated
rtisma Jan 10, 2020
bfb43b3
updated
rtisma Jan 13, 2020
232b8c6
Merge pull request #577 from overture-stack/fix-matched-normal
rtisma Jan 13, 2020
3361f63
formatted
rtisma Jan 13, 2020
de3bd7c
make sample.matchednormalSubmitterSampleId always output for song-client
rtisma Jan 13, 2020
51dd3a8
Merge pull request #578 from overture-stack/fixed-client-sample-output
rtisma Jan 13, 2020
c944af2
Release candidate 4.0.0
rtisma Jan 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ _ping_song_server:
'http://localhost:8080/isAlive'
@echo ""

_ping_song_db:
@echo $(YELLOW)$(INFO_HEADER) "Pinging song-db on localhost:8432" $(END)
@$(RETRY_CMD) $(DOCKER_COMPOSE_EXE) exec song-db psql -U postgres song -c 'select 1'
@echo ""


_setup-object-storage:
@echo $(YELLOW)$(INFO_HEADER) "Setting up bucket oicr.icgc.test and heliograph" $(END)
Expand Down Expand Up @@ -170,6 +175,26 @@ clean-output-dirs:
# Clean everything. Kills all services, maven cleans and removes generated files/directories
clean: clean-docker clean-mvn clean-log-dirs clean-output-dirs

#############################################################
# Flyway and Database Related targets
#############################################################

refresh-db:
@echo $(YELLOW)$(INFO_HEADER) "Refreshing song-db" $(END)
@$(DOCKER_COMPOSE_CMD) kill song-db song-server
@$(DOCKER_COMPOSE_CMD) rm -f song-db
@$(DOCKER_COMPOSE_CMD) up -d song-db

migrate: clean-mvn package refresh-db _ping_song_db
@$(MVN_CMD) -X -pl song-server flyway:migrate \
-Dflyway.user=postgres \
-Dflyway.password=password \
-Dflyway.url=jdbc:postgresql://localhost:8432/song?stringtype=unspecified \
-Dflyway.locations=classpath:db/migration

login-db:
@$(DOCKER_COMPOSE_CMD) exec song-db psql -U postgres song

#############################################################
# Building targets
#############################################################
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ docker run --rm \
-e 'CLIENT_PROGRAM_NAME=sing' \
-e 'CLIENT_DEBUG=true' \
-e 'CLIENT_ACCESS_TOKEN=myAccessToken' \
overture/song-client:latest
bin/sing config
overture/song-client:latest \
sing config
```

### Notes
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ services:
POSTGRES_DB: song
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "8432:5432"
volumes:
- "./docker/song-db-init:/docker-entrypoint-initdb.d"
aws-cli:
Expand Down
27 changes: 15 additions & 12 deletions docker/song-example-data/exampleVariantCall.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
{
"study" : "ABC123",
"studyId" : "ABC123",
"analysisType" : {
"name" : "variantCall",
"version" : 1
"name" : "variantCall"
},
"experiment": {
"variantCallingTool": "silver bullet",
"matchedNormalSampleSubmitterId": "sample x24-11a",
"matchedNormalSampleSubmitterId": "sample-x24-11a",
"randomField14" : "we can define any EXPERIMENT field. For example, randomField14",
"randomField15" : "as a second example, we can define another random EXPERIMENT field called randomField15",
"info" : {
"randomField16" : "alternatively, put some extra EXPERIMENT fields here"
}
},
"sample": [
"samples": [
{
"sampleSubmitterId": "internal_sample_98024759826836",
"submitterSampleId": "internal_sample_98024759826836",
"sampleType": "Total RNA",
"matchedNormalSubmitterSampleId": "sample-x24-11a",
"specimen": {
"specimenSubmitterId": "internal_specimen_9b73gk8s02dk",
"specimenClass": "Tumour",
"specimenType": "Primary tumour - other",
"submitterSpecimenId": "internal_specimen_9b73gk8s02dk",
"specimenType": "Primary tumour",
"specimenTissueSource": "Solid tissue",
"tumourNormalDesignation": "Tumour",
"randomField1" : "we can define any SPECIMEN field. For example, randomField1",
"randomField2" : "as a second example, we can define another random SPECIMEN field called randomField2",
"info" : {
"randomField3" : "alternatively, put some extra SPECIMEN fields here"
}
},
"donor": {
"donorSubmitterId": "internal_donor_123456789-00",
"donorGender": "female",
"submitterDonorId": "internal_donor_123456789-00",
"gender": "Female",
"randomField4" : "we can define any DONOR field. For example, randomField4",
"randomField5" : "as a second example, we can define another random DONOR field called randomField5",
"info" : {
Expand All @@ -43,8 +44,9 @@
}
}
],
"file": [
"files": [
{
"dataType": "Variant Calling Data",
"fileName": "example.vcf.gz",
"fileSize": 52,
"fileMd5sum": "9a793e90d0d1e11301ea8da996446e59",
Expand All @@ -57,6 +59,7 @@
}
},
{
"dataType": "Variant Calling Index",
"fileName": "example.vcf.gz.idx",
"fileSize": 25,
"fileMd5sum": "c03274816eb4907a92b8e5632cd6eb81",
Expand Down
29 changes: 3 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<groupId>bio.overture</groupId>
<artifactId>song</artifactId>
<packaging>pom</packaging>
<version>3.1.1</version>
<version>4.0.0</version>
<modules>
<module>song-core</module>
<module>song-java-sdk</module>
Expand All @@ -41,14 +41,6 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>dcc-releases</id>
<url>https://artifacts.oicr.on.ca/artifactory/dcc-release</url>
</repository>
<repository>
<id>dcc-snapshot</id>
<url>https://artifacts.oicr.on.ca/artifactory/dcc-snapshot</url>
</repository>
<repository>
<id>Atlassian 3rd Party</id>
<url>https://maven.atlassian.com/3rdparty/</url>
Expand Down Expand Up @@ -243,9 +235,8 @@
<version>${java-assist.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
Expand All @@ -254,18 +245,6 @@
<version>${javax.interceptor-api.version}</version>
</dependency>

<!--ICGC Libs-->
<dependency>
<groupId>org.icgc.dcc</groupId>
<artifactId>dcc-common-core</artifactId>
<version>${dcc-common.version}</version>
</dependency>
<dependency>
<groupId>org.icgc.dcc</groupId>
<artifactId>dcc-id-client</artifactId>
<version>${dcc-id.version}</version>
</dependency>

<!--Json Schema-->
<dependency>
<groupId>com.networknt</groupId>
Expand Down Expand Up @@ -474,7 +453,6 @@
<!--<spring-data-commons.version>1.12.11.RELEASE</spring-data-commons.version>-->
<spring-framework.version>5.1.9.RELEASE</spring-framework.version>
<spring-cloud.version>Greenwich.SR3</spring-cloud.version>
<dcc-common.version>4.3.8</dcc-common.version>
<postgresql.version>42.2.2</postgresql.version>
<junit.version>4.12</junit.version>
<slf4j.version>1.7.25</slf4j.version>
Expand All @@ -486,7 +464,6 @@
<java-uuid-generator.version>3.1.5</java-uuid-generator.version>
<wiremock.version>2.14.0</wiremock.version>
<springfox.version>2.9.0</springfox.version>
<dcc-id.version>5.2.0</dcc-id.version>
<spring-security-oauth2.version>2.1.0.RELEASE</spring-security-oauth2.version>
<hibernate-native-json.version>0.4</hibernate-native-json.version>

Expand Down
6 changes: 3 additions & 3 deletions song-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>3.1.1</version>
<version>4.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -35,12 +35,12 @@
<dependency>
<groupId>bio.overture</groupId>
<artifactId>song-java-sdk</artifactId>
<version>3.1.1</version>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>bio.overture</groupId>
<artifactId>song-core</artifactId>
<version>3.1.1</version>
<version>4.0.0</version>
</dependency>

<!-- CLI -->
Expand Down
4 changes: 2 additions & 2 deletions song-client/src/main/java/bio/overture/song/client/Main.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package bio.overture.song.client;

import static bio.overture.song.client.cli.ClientMain.createClientMain;
import static bio.overture.song.core.utils.Booleans.convertToBoolean;
import static bio.overture.song.core.utils.JsonDocUtils.getInputStreamClasspath;
import static java.lang.Boolean.parseBoolean;
import static java.nio.file.Files.exists;
import static java.nio.file.Files.newInputStream;
import static java.util.Objects.isNull;
Expand Down Expand Up @@ -62,6 +62,6 @@ private static String getString(String value, String envVar) {

private static boolean getBoolean(boolean value, String envVar) {
val envValue = System.getenv(envVar);
return isNull(envValue) ? value : parseBoolean(envValue);
return isNull(envValue) ? value : convertToBoolean(envValue);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package bio.overture.song.client.util;

import static bio.overture.song.core.utils.Joiners.COMMA;
import static bio.overture.song.core.utils.Separators.COMMA;
import static java.lang.String.format;

import com.beust.jcommander.IStringConverter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public void testAnalysisSearch() {
.analysisId(DUMMY_ANALYSIS_ID)
.analysisState(UNPUBLISHED)
.analysisType(ANALYSIS_TYPE_ID1)
.study(DUMMY_STUDY_ID)
.studyId(DUMMY_STUDY_ID)
.build();
when(songApi.getAnalysis(DUMMY_STUDY_ID, DUMMY_ANALYSIS_ID)).thenReturn(expectedAnalysis);
assertOutputJson(objectToTree(expectedAnalysis), "search", "-a", DUMMY_ANALYSIS_ID);
Expand All @@ -289,7 +289,7 @@ public void testIdSearch() {
.analysisId(DUMMY_ANALYSIS_ID)
.analysisState(UNPUBLISHED)
.analysisType(ANALYSIS_TYPE_ID1)
.study(DUMMY_STUDY_ID)
.studyId(DUMMY_STUDY_ID)
.build());

when(songApi.idSearch(DUMMY_STUDY_ID, expectedSample.getSampleId(), null, null, null))
Expand Down
2 changes: 1 addition & 1 deletion song-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>3.1.1</version>
<version>4.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package bio.overture.song.core.exceptions;

import static java.lang.String.format;

public class BooleanConversionException extends RuntimeException {

public BooleanConversionException() {}

public BooleanConversionException(String formattedMessage, Object... args) {
super(format(formattedMessage, args));
}

public BooleanConversionException(Throwable cause, String formattedMessage, Object... args) {
super(format(formattedMessage, args), cause);
}

public BooleanConversionException(Throwable cause) {
super(cause);
}

public BooleanConversionException(
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace,
String formattedMessage,
Object... args) {
super(format(formattedMessage, args), cause, enableSuppression, writableStackTrace);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ public enum ServerErrors implements ServerError {
REST_CLIENT_UNEXPECTED_RESPONSE(BAD_GATEWAY),
ID_SERVICE_ERROR(BAD_GATEWAY),
MALFORMED_JSON_SCHEMA(BAD_REQUEST),
STORAGE_SERVICE_ERROR(BAD_GATEWAY),
STORAGE_OBJECT_NOT_FOUND(
NOT_FOUND), // Used STORAGE instead of SCORE to not tie it to a specific implementation
UNKNOWN_ERROR(INTERNAL_SERVER_ERROR);
UNKNOWN_ERROR(INTERNAL_SERVER_ERROR),
ILLEGAL_ANALYSIS_TYPE_NAME(BAD_REQUEST);

private static final String ERROR_ID_SEPARATOR = ".";
private static final String ENUM_NAME_SEPARATOR = "_";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
public class Analysis extends DynamicData {

private String analysisId;
private String study;
private String studyId;
private AnalysisStates analysisState;
private AnalysisTypeId analysisType;
private List<CompositeSample> sample;
private List<FileDTO> file;
private List<CompositeSample> samples;
private List<FileDTO> files;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public class Donor extends Metadata {

private String donorId;
private String studyId;
private String donorSubmitterId;
private String donorGender;
private String submitterDonorId;
private String gender;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@

package bio.overture.song.core.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.List;
import lombok.NonNull;
import lombok.Value;
import lombok.Data;
import lombok.val;

@Value
@Data
@JsonPropertyOrder({"studyId", "payloads"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ExportedPayload {
@NonNull private String studyId;
@NonNull private List<JsonNode> payloads;
private String studyId;
private List<JsonNode> payloads;

public static ExportedPayload createExportedPayload(String studyId, List<JsonNode> payloads) {
return new ExportedPayload(studyId, payloads);
val p = new ExportedPayload();
p.setStudyId(studyId);
p.setPayloads(payloads);
return p;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ public interface File extends FileMetadata, FileContent {
String getFileName();

String getFileType();

String getDataType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public class FileDTO extends Metadata implements File {
private String fileMd5sum;
private Long fileSize;
private String fileAccess;
private String dataType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@AllArgsConstructor
@EqualsAndHashCode
@ToString
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Metadata {

private final Map<String, Object> info = new TreeMap<>();
Expand All @@ -59,6 +59,7 @@ public void setInfo(String info) {
}

@JsonGetter
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public JsonNode getInfo() {
return JsonUtils.toJsonNode(info);
}
Expand Down
Loading