-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BI-1930] trait names are case sensitive #300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing the Null Pointer Exception as well when uploading Experiment and Observations.
Bug fixed (and thanks for finding it?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
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: