Skip to content

Commit

Permalink
add publications + deposition name to test metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Oct 16, 2024
1 parent abe15f3 commit 7dbfa6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const GET_RUN_BY_ID_QUERY_V2 = gql(`
organismName
organismTaxid
otherSetup
# publications # TODO(bchu): Change to new name.
datasetPublications
relatedDatabaseEntries
relatedDatabaseEntries
releaseDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Tiltseries,
} from 'app/__generated__/graphql'
import {
Dataset,
Fiducial_Alignment_Status_Enum,
Tomogram,
} from 'app/__generated_v2__/graphql'
Expand Down Expand Up @@ -172,14 +173,13 @@ function getAnnotationTestMetdata(

function getTomogramDrawerTestMetadata(
tomogram: DeepPartial<Tomogram>,
dataset: DeepPartial<Dataset>,
): DrawerTestMetadata {
return {
authors: tomogram.authors!.edges!.map((edge) => edge.node!.name),
publications: '--',
publications: dataset.datasetPublications ?? '--',
relatedDatabases: '--',
// TODO(bchu): Uncomment when API name change is in prod.
// depositionName: tomogram.deposition?.title ?? '--',
depositionName: '--',
depositionName: tomogram.deposition?.title ?? '--',
depositionId: tomogram.deposition?.id ?? '--',
depositionDate: tomogram.deposition?.depositionDate ?? '--',
releaseDate: '--',
Expand Down Expand Up @@ -298,12 +298,13 @@ export async function getTomogramTestData(
const { data } = await getRunByIdV2(client, +E2E_CONFIG.runId, 1)

const tomogram = data.tomograms[0]
const dataset = data.runs[0].dataset

return {
title: startCase(
`${tomogram.id} ${tomogram.reconstructionMethod} ${tomogram.processing}`,
),
metadata: getTomogramDrawerTestMetadata(tomogram),
metadata: getTomogramDrawerTestMetadata(tomogram, dataset),
}
}
// #endregion Data Getters

0 comments on commit 7dbfa6d

Please sign in to comment.