BI-1650 - Store and fetch genotype data#228
Conversation
b2d3e30 to
d47c51c
Compare
src/test/java/org/breedinginsight/services/geno/impl/GigwaGenoServiceImplIntegrationTest.java
Outdated
Show resolved
Hide resolved
HMS17
left a comment
There was a problem hiding this comment.
Importing runs into NullPointerExpection due to addition of dynamic columns. Adding a wrapper to check for null in ImportUpload.java:setDynamicColumnNames fixes it
01ec3c8 to
16ce165
Compare
e41c9bd to
feb842d
Compare
src/main/java/org/breedinginsight/services/geno/impl/GigwaGenoServiceImpl.java
Show resolved
Hide resolved
src/main/java/org/breedinginsight/services/geno/impl/GigwaGenoServiceImpl.java
Outdated
Show resolved
Hide resolved
7562af5 to
5d6a948
Compare
src/main/java/org/breedinginsight/services/geno/impl/GigwaGenoServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/org/breedinginsight/services/geno/impl/GigwaGenoServiceImpl.java
Show resolved
Hide resolved
.env
Outdated
| AWS_REGION=<aws region> | ||
| AWS_ACCESS_KEY_ID=<access key> | ||
| AWS_SECRET_KEY=<secret> | ||
| AWS_GENO_BUCKET=<s3 bucket for genotypic data uploads> No newline at end of file |
There was a problem hiding this comment.
Should this also have the AWS_S3_ENDPOINT= placeholder?
| this.securityService = securityService; | ||
| } | ||
|
|
||
| @Post("programs/{programId}/experiments/{experimentId}/geno/import") |
There was a problem hiding this comment.
Not sure how well the api docs have been kept to date as of late but should new api endpoints be added in the docs?
There was a problem hiding this comment.
@nickpalladino I don't think very well. I'd be more inclined to create a separate card to handle updating the API docs. Thoughts?
| BrAPIGermplasm germplasm = germplasmService.getGermplasmByDBID(programId, germplasmId); | ||
| //Forward the pedigree call to the backing BrAPI system of the program passing the germplasmDbId that came in the request | ||
| GermplasmApi api = new GermplasmApi(programDAO.getCoreClient(programId)); | ||
| GermplasmApi api = brAPIEndpointProvider.get(programDAO.getCoreClient(programId), GermplasmApi.class); |
There was a problem hiding this comment.
What was the reason for this change?
There was a problem hiding this comment.
@nickpalladino To make the code more testable. By changing from using the 'new ()', unit tests can now mock out the creation of certain types of BrAPI endpoint classes that are in the BrAPI Java Client.
| Map<Integer, PendingImport> mappedBrAPIImport, Table data, | ||
| Program program, User user, boolean commit) throws ValidatorException { | ||
|
|
||
| log.debug("Processing germplasm import"); |
There was a problem hiding this comment.
Do you still want the debug logging in here?
There was a problem hiding this comment.
@nickpalladino Yes. My opinion is the more logging in the code the better. We can always change the log level if it's too noisy in production, but we can't add more without rebuilding code.
src/main/java/org/breedinginsight/services/geno/GenoService.java
Outdated
Show resolved
Hide resolved
…asses, and improve testability
…s in the system before starting import
683bef4 to
a6eea82
Compare
Description
Story: https://breedinginsight.atlassian.net/browse/BI-1650
BrAPIEndpointProvider, and refactored how BrAPI endpoint classes are created from the BrAPI Java Client. This makes the code more testable because theBrAPIEndpointProvidercan be mocked in testsImportDAOto use the interface/impl patternImportMappingDAOto use the interface/impl patternUserDAOto use the interface/impl patternDependencies
Testing
Checklist: