[BI-873] Remove crosses from the germplasm importer#86
Conversation
| germplasmSearch.germplasmNames(germplasmNames); | ||
| // Germplasm doesn't have program attached. Do species as next best thing | ||
| germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName())); | ||
| //germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName())); |
| List<GermplasmImportPending> mappedBrAPIImport = germplasmImports.stream() | ||
| .map(germplasmImport -> new GermplasmImportPending()).collect(Collectors.toList()); |
There was a problem hiding this comment.
Why do you create all of these objects ahead of time? Couldn't you create them during processing below and add them to this list?
There was a problem hiding this comment.
Good catch, moved into the main data set loop.
| germplasmSearch.germplasmNames(germplasmNames); | ||
| // Germplasm doesn't have program attached. Do species as next best thing | ||
| germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName())); | ||
| //germplasmSearch.setCommonCropNames(List.of(brAPIProgram.getCommonCropName())); |
There was a problem hiding this comment.
What's going on with this?
There was a problem hiding this comment.
Removed it, breedbase didn't like it.
| BrAPIGermplasm germplasm = constructBrAPIGermplasm(); | ||
| germplasm.setSpecies(species); | ||
| germplasm.setCommonCropName(species); | ||
| //germplasm.setSpecies(species); |
There was a problem hiding this comment.
why is this commented out vs being removed?
| description = "This import is used to create a pedigree history by importing germplasm.") | ||
| public class PedigreeImport implements BrAPIImport { | ||
| @ImportConfigMetadata(id="GermplasmImport", name="Germplasm Import", | ||
| description = "This import is used to create germplasm and create a pedigree by specify parental connections.") |
| } | ||
|
|
||
| public BrAPIGermplasm constructBrAPIGermplasm(String species) { | ||
| public BrAPIGermplasm constructBrAPIGermplasm(BrAPIProgram brAPIProgram) { |
There was a problem hiding this comment.
Not here but in the constructBrAPIGermplasm without parameters, getting an error for germplasm.setAccessionNumber(getAccessionNumber()); and also duplicated.
There was a problem hiding this comment.
Spoke with Nick, the error is his IntelliJ environment because github actions builds it fine. I removed the duplicate.
| // statistics | ||
| // Germplasm | ||
| // new | ||
| // ObservationUnits |
There was a problem hiding this comment.
I removed this comment, it was just to help me work through the class structure.
Removed the crosses from the germplasm importer and handled pedigrees through the pedigree string.
Tested against BreedBase and everything works well.