From c56c6812f5bd2b6e9efbf7f6d189e99b90f8dbe2 Mon Sep 17 00:00:00 2001 From: Luke Sikina Date: Sun, 7 Jan 2024 11:30:42 -0500 Subject: [PATCH] Explain hpds artifacts --- .../harvard/dbmi/avillach/dataupload/hpds/HPDSClient.java | 1 + .../hpds/hpdsartifactsdonotchange/DONOTCHANGE.txt | 8 ++++++++ .../hpds/{ => hpdsartifactsdonotchange}/Filter.java | 2 +- .../hpds/{ => hpdsartifactsdonotchange}/Query.java | 2 +- .../hpds/{ => hpdsartifactsdonotchange}/ResultType.java | 2 +- .../dbmi/avillach/dataupload/status/StatusService.java | 2 +- .../avillach/dataupload/upload/DataUploadController.java | 4 ++-- .../avillach/dataupload/upload/DataUploadService.java | 2 +- .../dbmi/avillach/dataupload/hpds/HPDSClientTest.java | 1 + .../avillach/dataupload/status/StatusRepositoryTest.java | 2 +- .../avillach/dataupload/status/StatusServiceTest.java | 3 +-- .../dataupload/upload/DataUploadControllerTest.java | 2 +- 12 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/DONOTCHANGE.txt rename uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/{ => hpdsartifactsdonotchange}/Filter.java (95%) rename uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/{ => hpdsartifactsdonotchange}/Query.java (99%) rename uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/{ => hpdsartifactsdonotchange}/ResultType.java (97%) diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClient.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClient.java index 76aeaca..2e79c95 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClient.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClient.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import edu.harvard.dbmi.avillach.domain.GeneralQueryRequest; import edu.harvard.dbmi.avillach.domain.QueryRequest; import org.slf4j.Logger; diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/DONOTCHANGE.txt b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/DONOTCHANGE.txt new file mode 100644 index 0000000..1dff610 --- /dev/null +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/DONOTCHANGE.txt @@ -0,0 +1,8 @@ +These files are copied directly from HPDS manually. Please only change these as you change them in HPDS. +We're doing this rather than referencing the artifacts directly because: +- HPDS depends on artifacts in the pic-sure repo +- We can't make HPDS pull those artifacts from Jitpack because FISMA +- Because HPDS relies on your m2 cache, we can't build it in Jitpack +- So we have no way to reference the artifacts directly that doesn't lean on your m2 local + - Which I refuse to do. I think this is clearer. + - Also, that won't work well with Docker builds \ No newline at end of file diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Filter.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Filter.java similarity index 95% rename from uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Filter.java rename to uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Filter.java index 270825f..525fefd 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Filter.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Filter.java @@ -1,4 +1,4 @@ -package edu.harvard.dbmi.avillach.dataupload.hpds; +package edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange; public interface Filter { public boolean apply(T value); diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Query.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Query.java similarity index 99% rename from uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Query.java rename to uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Query.java index b7ebe03..bf7889f 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/Query.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/Query.java @@ -1,4 +1,4 @@ -package edu.harvard.dbmi.avillach.dataupload.hpds; +package edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/ResultType.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/ResultType.java similarity index 97% rename from uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/ResultType.java rename to uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/ResultType.java index 23e74b6..5cc3850 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/ResultType.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/hpds/hpdsartifactsdonotchange/ResultType.java @@ -1,4 +1,4 @@ -package edu.harvard.dbmi.avillach.dataupload.hpds; +package edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange; public enum ResultType { /** diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/status/StatusService.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/status/StatusService.java index 2d3b83f..407fa97 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/status/StatusService.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/status/StatusService.java @@ -1,6 +1,6 @@ package edu.harvard.dbmi.avillach.dataupload.status; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadController.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadController.java index 1b8878b..87cf848 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadController.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadController.java @@ -1,7 +1,7 @@ package edu.harvard.dbmi.avillach.dataupload.upload; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; -import edu.harvard.dbmi.avillach.dataupload.hpds.ResultType; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.ResultType; import edu.harvard.dbmi.avillach.dataupload.status.DataUploadStatuses; import edu.harvard.dbmi.avillach.dataupload.status.UploadStatus; import edu.harvard.dbmi.avillach.dataupload.status.StatusService; diff --git a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadService.java b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadService.java index 96d18ca..a77d95c 100644 --- a/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadService.java +++ b/uploader/src/main/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadService.java @@ -3,7 +3,7 @@ import edu.harvard.dbmi.avillach.dataupload.aws.SelfRefreshingS3Client; import edu.harvard.dbmi.avillach.dataupload.aws.SiteAWSInfo; import edu.harvard.dbmi.avillach.dataupload.hpds.HPDSClient; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import edu.harvard.dbmi.avillach.dataupload.status.DataUploadStatuses; import edu.harvard.dbmi.avillach.dataupload.status.UploadStatus; import edu.harvard.dbmi.avillach.dataupload.status.StatusService; diff --git a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClientTest.java b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClientTest.java index 2a17ea5..2e1672f 100644 --- a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClientTest.java +++ b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/hpds/HPDSClientTest.java @@ -1,5 +1,6 @@ package edu.harvard.dbmi.avillach.dataupload.hpds; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; diff --git a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusRepositoryTest.java b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusRepositoryTest.java index e6aead8..481dc4b 100644 --- a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusRepositoryTest.java +++ b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusRepositoryTest.java @@ -1,6 +1,6 @@ package edu.harvard.dbmi.avillach.dataupload.status; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusServiceTest.java b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusServiceTest.java index faa049f..2769eeb 100644 --- a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusServiceTest.java +++ b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/status/StatusServiceTest.java @@ -1,12 +1,11 @@ package edu.harvard.dbmi.avillach.dataupload.status; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.time.LocalDate; diff --git a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadControllerTest.java b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadControllerTest.java index b0e3e0b..9fb69e3 100644 --- a/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadControllerTest.java +++ b/uploader/src/test/java/edu/harvard/dbmi/avillach/dataupload/upload/DataUploadControllerTest.java @@ -1,6 +1,6 @@ package edu.harvard.dbmi.avillach.dataupload.upload; -import edu.harvard.dbmi.avillach.dataupload.hpds.Query; +import edu.harvard.dbmi.avillach.dataupload.hpds.hpdsartifactsdonotchange.Query; import edu.harvard.dbmi.avillach.dataupload.status.DataUploadStatuses; import edu.harvard.dbmi.avillach.dataupload.status.UploadStatus; import edu.harvard.dbmi.avillach.dataupload.status.StatusService;