-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Austenem/CAT-980 Fix EPIC Bulk Data Transfer sections (#3582)
* update bulk data panel processing * add tests and updated dataset types * add changelog * update variable names for clarity
- Loading branch information
Showing
8 changed files
with
99 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Fix EPIC Bulk Data Transfer section tabs and prevent these from crashing the page. |
This file contains 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
69 changes: 69 additions & 0 deletions
69
context/app/static/js/components/detailPage/ProcessedData/ProcessedDataset/hooks.spec.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { processDatasetLabel } from './hooks'; | ||
|
||
const hits: { | ||
_source: { | ||
assay_display_name: string[]; | ||
hubmap_id: string; | ||
pipeline?: string; | ||
status: string; | ||
}; | ||
}[] = [ | ||
{ | ||
_source: { | ||
assay_display_name: ['PAS Stained Microscopy [Kaggle-1 Glomerulus Segmentation]'], | ||
hubmap_id: 'HBM739.DJFC.689', | ||
pipeline: 'Kaggle-1 Glomerulus Segmentation', | ||
status: 'QA', | ||
}, | ||
}, | ||
{ | ||
_source: { | ||
assay_display_name: ['Segmentation Mask'], | ||
hubmap_id: 'HBM984.FHHM.241', | ||
status: 'Published', | ||
}, | ||
}, | ||
]; | ||
|
||
it('checks if bulk data transfer panels are labeled correctly', () => { | ||
const labels = hits.map((hit) => processDatasetLabel(hit._source, hits)); | ||
expect(labels).toEqual(['Kaggle-1 Glomerulus Segmentation', 'Segmentation Mask']); | ||
}); | ||
|
||
const hitsWithDuplicates = [ | ||
...hits, | ||
{ | ||
_source: { | ||
assay_display_name: ['PAS Stained Microscopy [Kaggle-1 Glomerulus Segmentation]'], | ||
hubmap_id: 'HBM739.DJFC.675', | ||
pipeline: 'Kaggle-1 Glomerulus Segmentation', | ||
status: 'QA', | ||
}, | ||
}, | ||
{ | ||
_source: { | ||
assay_display_name: ['Segmentation Mask'], | ||
hubmap_id: 'HBM984.FHHM.240', | ||
status: 'QA', | ||
}, | ||
}, | ||
{ | ||
_source: { | ||
assay_display_name: ['Visium (no probes)'], | ||
hubmap_id: 'HBM878.KLWL.738', | ||
pipeline: 'Visium (no probes)', | ||
status: 'QA', | ||
}, | ||
}, | ||
]; | ||
|
||
it('checks if bulk data transfer panels with duplicate analyses are labeled correctly', () => { | ||
const labels = hitsWithDuplicates.map((hit) => processDatasetLabel(hit._source, hitsWithDuplicates)); | ||
expect(labels).toEqual([ | ||
'Kaggle-1 Glomerulus Segmentation (QA) [HBM739.DJFC.689]', | ||
'Segmentation Mask (Published)', | ||
'Kaggle-1 Glomerulus Segmentation (QA) [HBM739.DJFC.675]', | ||
'Segmentation Mask (QA)', | ||
'Visium (no probes)', | ||
]); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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