Conversation
mlm483
requested changes
Oct 9, 2023
Contributor
There was a problem hiding this comment.
The code looks good and acceptance criterion 2 is met but acceptance criterion 1 is not met; a check for values outside of case insensitive "" (blank => Test), "T", "C", "TEST", "CHECK" should be added, and an appropriate error shown.
Also, please run TAF after making those changes, the test files may need to be updated.
nickpalladino
requested changes
Oct 11, 2023
Member
There was a problem hiding this comment.
During testing I was getting a null pointer exception:
java.lang.RuntimeException: java.lang.NullPointerException
at org.breedinginsight.brapps.importer.services.FileMappingUtil.lambda$sortByField$0(FileMappingUtil.java:90)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.base/java.util.TimSort.sort(TimSort.java:220)
at java.base/java.util.Arrays.sort(Arrays.java:1516)
at java.base/java.util.ArrayList.sort(ArrayList.java:1718)
at org.breedinginsight.brapps.importer.services.FileMappingUtil.sortByField(FileMappingUtil.java:84)
at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.verifyTraits(ExperimentProcessor.java:439)
at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.process(ExperimentProcessor.java:220)
at org.breedinginsight.brapps.importer.services.processors.ProcessorManager.process(ProcessorManager.java:65)
at org.breedinginsight.brapps.importer.model.imports.experimentObservation.ExperimentImportService.process(ExperimentImportService.java:72)
at org.breedinginsight.brapps.importer.services.FileImportService.lambda$processFile$9(FileImportService.java:426)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1771)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1763)
at java.base/java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NullPointerException: null
at org.breedinginsight.brapps.importer.services.FileMappingUtil.lambda$sortByField$0(FileMappingUtil.java:88)
... 19 common frames omitted```
Test files:
[KRSP128_case.xlsx](https://github.com/Breeding-Insight/bi-api/files/12874366/KRSP128_case.xlsx)
[bi_lettuce_ontology_v1.xlsx](https://github.com/Breeding-Insight/bi-api/files/12874371/bi_lettuce_ontology_v1.xlsx)
mlm483
requested changes
Oct 11, 2023
Contributor
mlm483
left a comment
There was a problem hiding this comment.
I'm seeing the Null Pointer Exception as well when uploading Experiment and Observations.
Contributor
Author
Bug fixed (and thanks for finding it?) |
nickpalladino
approved these changes
Oct 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BI-1930 - trait names are case sensitive
Description
When importing an experiment in the current system, the observation-variable must match an ontology in a case-sensitive way. If not it will fail validation. The purpose of this story is to allow the matching between the observation-variable and the ontology to be case-insensitive, while still allowing the observation-variable and the observation data to be saved correctly.
Dependencies
bi-web: develop branch
Testing
WHEN An experiment is imported with observations.
AND At least one observation-variable (i.e. the observation column header) differs from an ontology by case (for example: if the ontology is "Color" the observation-variable could be "cOLoR").
THEN The experiment should pass validation.
WHEN Viewing the experiment summary.
THEN the observation-variable should be displayed with the same cases as the ontology (in the above example: "Color")
Checklist: