From e81e9fa10a657023b47a68a2dbf758258871987e Mon Sep 17 00:00:00 2001 From: Nozomi Ichihara <31800566+nozomione@users.noreply.github.com> Date: Wed, 13 Sep 2023 17:33:32 -0400 Subject: [PATCH 1/2] 429 - Upgrade to Nextjs 13 / Yarn 3 / Storybook (#432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove warning 'Received 'true' for a non-boolean attribute crossOrigin' at compile time * remove the flag deprecation warning '--static-dir CLI flag is deprecated’ at compile time * remove the error 'TypeError: Cannot read property 'definitions' of undefined’ at compile * remove the performance warning ‘Reverting webpack devtool to 'eval-source-map'. Changing the webpack devtool in development mode will cause severe performance regressions’ at compile by removing the custom devtool override in next.config since it reverts back to eval-source-map during the compilation (ref: https://nextjs.org/docs/messages/improper-devtool) * upgrade node image to v18.17.1 (stored the node image to the enviromental variable) * upgrade the storybook to v7 from v6 * (fix) resolve runtime error 'MyDocument.getInitialProps() should resolve to an object with a html' * (fix) add the legacyBehavior prop to Next.js buit-in Link component * (fix) remove the warning 'The value at .experimental has an unexpected property, productionBrowserSourceMaps, which is not in the list of allowed propertie'(no longer the property of experiment) at compile * (fix) resolve 'Warning: A title element received an array with more than 1 element as children' at compile by updating the PageTitle component JSX * (fix) resolve the datatype warning ‘Failed prop type: Invalid prop supplied to , expected one of type [string]’ at compile * upgrade Yarn to latest stable v3.6.3 from v1.22.19 and add a local .gitignore file in the client directory for Yarn none-zero-installs instead of editing .gitignore in the root * (edit) specified Yarn version in the docker compose * (fix) remove ‘RESOURCE-NAME’ undefined errors at the runtime (storybook): - add the alias for the data directory for import - adjust the data and remove unused resource files - update the stories based on the above changes * remove trailing white space and add new line at the end in .gitignore * remove trailing whitespace after the yarn set version command * (test) remove trailing whitespace inauto-generate file ./yarn/release * (edit) exclude .yarn (auto-generated files) from pre-commit test and revert back the test change (previous commit for removing the whitespace from auti-generated ./yarn/release) file * (edit) use module import, add addons, and rearrange the properties in alphabetical order * (edit) remove the env var for the docker node image and hard-code in the docker compose file --- .pre-commit-config.yaml | 1 + client/.eslintrc.js | 6 +- client/.gitignore | 13 + client/.storybook/data/project.js | 440 +- client/.storybook/data/projects.js | 218 - client/.storybook/data/samples.js | 398 - client/.storybook/main.js | 28 +- .../stories/DetailsTable.stories.js | 3 +- client/.storybook/stories/Download.stories.js | 6 +- client/.storybook/stories/Footer.stories.js | 2 +- .../stories/PojectSamplesTable.stories.js | 8 +- .../stories/ProjectHeader.stories.js | 4 +- .../ProjectSamplesSummaryTable.stories.js | 8 +- .../stories/ProjectSearchResult.stories.js | 4 +- client/.storybook/stories/Table.stories.js | 4 +- client/.yarn/releases/yarn-3.6.3.cjs | 874 + client/.yarnrc.yml | 5 + client/next.config.js | 5 +- client/package.json | 28 +- client/src/components/Layout.js | 2 +- client/src/components/Link.js | 2 +- client/src/components/PageTitle.js | 5 +- client/src/pages/_document.js | 12 +- client/yarn.lock | 24697 +++++++++------- docker-compose.yml | 3 +- 25 files changed, 14890 insertions(+), 11886 deletions(-) create mode 100644 client/.gitignore delete mode 100644 client/.storybook/data/projects.js delete mode 100644 client/.storybook/data/samples.js create mode 100755 client/.yarn/releases/yarn-3.6.3.cjs create mode 100644 client/.yarnrc.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e84ff7c..c2d538bc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,7 @@ repos: args: - --fix=lf - id: trailing-whitespace + exclude: ^client/.yarn/* args: - --markdown-linebreak-ext=md # - id: check-executables-have-shebangs diff --git a/client/.eslintrc.js b/client/.eslintrc.js index 80e3d85e..71d129bf 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -12,7 +12,11 @@ module.exports = { configFile: path.resolve(`${__dirname}/.babelrc.js`) } }, - extends: ['airbnb', 'plugin:prettier/recommended'], + extends: [ + 'airbnb', + 'plugin:prettier/recommended', + 'plugin:storybook/recommended' + ], env: { browser: true, es6: true diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 00000000..2f6b0936 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,13 @@ +# dependencies +.pnp.* + +# yarn +# (resources) +# https://yarnpkg.com/features/zero-installs +# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/client/.storybook/data/project.js b/client/.storybook/data/project.js index a9f065f1..f73e88a5 100644 --- a/client/.storybook/data/project.js +++ b/client/.storybook/data/project.js @@ -1,78 +1,404 @@ export default { - scpca_id: 'SCPCP00003', - computed_file: { - project: 'SCPCP00003', - sample: null, - id: 2, - type: 'PROJECT_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCP00003.zip', - size_in_bytes: 7183873, - created_at: '2021-09-20T22:05:52.857602Z', - updated_at: '2021-09-20T22:05:52.857634Z' - }, + abstract: + 'Pediatric brain tumors are now the most common cause of mortality from disease in childhood. Molecular characteristics of pediatric high- and low-grade gliomas (PHGG and PLGG), the most common tumor category overall, are crucial to treatment and outcomes, but the impact of these characteristics and of the variety of cell populations in these tumors is poorly understood. We performed single-cell RNA-sequencing on viably banked single cell samples of high- and low- grade glial tumors from children treated at Children’s Hospital Colorado. These samples are part of ongoing single-cell pediatric brain tumor banking that our group initiated a decade ago. The maturity of this resource, collected over a decade, provides us with the opportunity to perform well-powered outcome association studies. Samples are collected during routine surgery and immediately disaggregated to isolate single cells. These are then viably frozen in DMSO and banked for later use. We have tumors that cover the variety of subtypes in each of these diseases, as well as comprehensive clinical information on these cases, which will allow us to correlate molecular subtypes and research findings with these clinical measures. Here, we perform single-cell RNA-sequencing on 26 samples from patients with PLGG. In PLGG, we will leverage scRNA-Seq analysis to identify lineage specific development and subpopulations within these tumors. We will then evaluate single-cell RNA-sequencing signatures and clinical outcomes of LGG with BRAF WT, KIAA1549:BRAF fusion and BRAFV600E to identify unique drivers of aggressiveness of BRAFV600E tumors. These studies will significantly advance our understanding of disease biology and provide the detailed molecular and functional insights needed to identify new therapeutic targets for these biologically and clinically heterogeneous tumors.', + additional_metadata_keys: + 'BRAF_status, participant_id, scpca_project_id, spinal_leptomeningeal_mets, submitter, submitter_id', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.293532Z', + id: 1278, + project: 'SCPCP000002', + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCP000002.zip', + sample: null, + size_in_bytes: 4015745697, + type: 'PROJECT_ZIP', + updated_at: '2022-12-20T16:02:26.293539Z', + workflow_version: 'v0.4.0' + } + ], + contacts: [ + { + email: 'jean.mulcahy-levy@childrenscolorado.org', + name: 'Jean Mulcahy Levy' + } + ], + created_at: '2022-12-20T15:48:44.283166Z', + diagnoses_counts: + 'Ependymoma (1), Ganglioglioma (5), Ganglioglioma/ATRT (1), Low grade glioma (3), Pilocytic astrocytoma (16)', + diagnoses: + 'Ependymoma, Ganglioglioma, Ganglioglioma/ATRT, Low grade glioma, Pilocytic astrocytoma', + disease_timings: 'Initial diagnosis', + downloadable_sample_count: 26, + has_bulk_rna_seq: true, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + human_readable_pi_name: 'Green/Mulcahy Levy', + modalities: 'Bulk', + multiplexed_sample_count: 0, + pi_name: 'green_mulcahy_levy', + publications: [], + sample_count: 26, samples: [ { - scpca_id: 'SCPCS000109', - computed_file: { - project: null, - sample: 'SCPCS000109', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: '1799T>A; P. V600E', + submitter_id: '1216', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' + }, + age_at_diagnosis: '14', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292774Z', + id: 1255, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000027.zip', + sample: 'SCPCS000027', + size_in_bytes: 184350972, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292780Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505189Z', + demux_cell_count_estimate: null, + diagnosis: 'Ganglioglioma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: false, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: [], + project: 'SCPCP000002', + sample_cell_count_estimate: 2189, + scpca_id: 'SCPCS000027', + seq_units: 'cell', + sex: 'F', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Medial left temporal lobe', + treatment: 'GTR/NTR', + updated_at: '2022-12-20T15:48:44.505202Z' + }, + { + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: 'NA', + submitter_id: '1226', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' + }, + age_at_diagnosis: '5', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292799Z', + id: 1256, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000028.zip', + sample: 'SCPCS000028', + size_in_bytes: 111052672, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292805Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505300Z', + demux_cell_count_estimate: null, + diagnosis: 'Low grade glioma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: true, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: ['Bulk'], + project: 'SCPCP000002', + sample_cell_count_estimate: 2003, + scpca_id: 'SCPCS000028', + seq_units: 'cell', + sex: 'F', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Left posterior fossa', + treatment: 'GTR', + updated_at: '2022-12-20T15:48:44.505315Z' + }, + { + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: 'NA', + submitter_id: '855', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' + }, + age_at_diagnosis: '8', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292825Z', + id: 1257, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000029.zip', + sample: 'SCPCS000029', + size_in_bytes: 58653983, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292831Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505410Z', + demux_cell_count_estimate: null, + diagnosis: 'Pilocytic astrocytoma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: true, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: ['Bulk'], + project: 'SCPCP000002', + sample_cell_count_estimate: 936, + scpca_id: 'SCPCS000029', + seq_units: 'cell', + sex: 'M', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Supracellar', + treatment: 'XRT/Carbo/VBL', + updated_at: '2022-12-20T15:48:44.505424Z' + }, + { + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: 'Negative for BRAF V600E, not tested for fusion', + submitter_id: '927', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' }, - project: 'SCPCP00003', + age_at_diagnosis: '15', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292851Z', + id: 1258, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000030.zip', + sample: 'SCPCS000030', + size_in_bytes: 15471264, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292857Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505564Z', + demux_cell_count_estimate: null, + diagnosis: 'Pilocytic astrocytoma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: true, has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: ['Bulk'], + project: 'SCPCP000002', + sample_cell_count_estimate: 2022, + scpca_id: 'SCPCS000030', + seq_units: 'cell', + sex: 'M', + subdiagnosis: 'NA', technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', + tissue_location: 'Thalamus', + treatment: 'GTR', + updated_at: '2022-12-20T15:48:44.505580Z' + }, + { + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: 'NA', + submitter_id: '879', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' + }, + age_at_diagnosis: '6', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292876Z', + id: 1259, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000031.zip', + sample: 'SCPCS000031', + size_in_bytes: 60357628, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292882Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505675Z', + demux_cell_count_estimate: null, + diagnosis: 'Pilocytic astrocytoma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: false, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: [], + project: 'SCPCP000002', + sample_cell_count_estimate: 818, + scpca_id: 'SCPCS000031', + seq_units: 'cell', sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Posterior fossa', + treatment: 'GTR', + updated_at: '2022-12-20T15:48:44.505688Z' + }, + { + additional_metadata: { + submitter: 'green_mulcahy_levy', + BRAF_status: 'NA', + submitter_id: '957', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' + }, + age_at_diagnosis: '13', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.292902Z', + id: 1260, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000032.zip', + sample: 'SCPCS000032', + size_in_bytes: 122351810, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.292909Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505782Z', + demux_cell_count_estimate: null, + diagnosis: 'Pilocytic astrocytoma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: true, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: ['Bulk'], + project: 'SCPCP000002', + sample_cell_count_estimate: 1799, + scpca_id: 'SCPCS000032', seq_units: 'cell', + sex: 'F', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Posterior fossa', + treatment: 'GTR x 2', + updated_at: '2022-12-20T15:48:44.505795Z' + }, + { additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' + submitter: 'green_mulcahy_levy', + BRAF_status: 'BRAF:KIAA fusion', + submitter_id: '1056', + participant_id: 'NA', + scpca_project_id: 'SCPCP000002', + spinal_leptomeningeal_mets: 'No' }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' + age_at_diagnosis: '4', + computed_files: [ + { + created_at: '2022-12-20T16:02:26.293004Z', + id: 1261, + project: null, + s3_bucket: 'scpca-local-data', + s3_key: 'SCPCS000033.zip', + sample: 'SCPCS000033', + size_in_bytes: 151265721, + type: 'SAMPLE_ZIP', + updated_at: '2022-12-20T16:02:26.293014Z', + workflow_version: 'v0.4.0' + } + ], + created_at: '2022-12-20T15:48:44.505888Z', + demux_cell_count_estimate: null, + diagnosis: 'Pilocytic astrocytoma', + disease_timing: 'Initial diagnosis', + has_bulk_rna_seq: true, + has_cite_seq_data: false, + has_multiplexed_data: false, + has_single_cell_data: true, + has_spatial_data: false, + modalities: ['Bulk'], + project: 'SCPCP000002', + sample_cell_count_estimate: 2031, + scpca_id: 'SCPCS000033', + seq_units: 'cell', + sex: 'F', + subdiagnosis: 'NA', + technologies: '10Xv3', + tissue_location: 'Posterior fossa', + treatment: 'NTR', + updated_at: '2022-12-20T15:48:44.505899Z' } ], + scpca_id: 'SCPCP000002', + seq_units: 'cell', summaries: [ { - diagnosis: 'Neuroblastoma', + diagnosis: 'Pilocytic astrocytoma', + sample_count: 16, seq_unit: 'cell', technology: '10Xv3', + updated_at: '2022-12-20T16:02:26.329987Z' + }, + { + diagnosis: 'Ganglioglioma', + sample_count: 5, + seq_unit: 'cell', + technology: '10Xv3', + updated_at: '2022-12-20T16:02:26.333458Z' + }, + { + diagnosis: 'Low grade glioma', + sample_count: 3, + seq_unit: 'cell', + technology: '10Xv3', + updated_at: '2022-12-20T16:02:26.337124Z' + }, + { + diagnosis: 'Ganglioglioma/ATRT', + sample_count: 1, + seq_unit: 'cell', + technology: '10Xv3', + updated_at: '2022-12-20T16:02:26.340337Z' + }, + { + diagnosis: 'Ependymoma', sample_count: 1, - updated_at: '2021-09-20T22:05:52.825288Z' + seq_unit: 'cell', + technology: '10Xv3', + updated_at: '2022-12-20T16:02:26.343580Z' } ], - pi_name: 'dyer_chen', - human_readable_pi_name: 'Dyer and Chen', - additional_metadata_keys: 'Treatment, Primary Site, COG Risk, IGSS Stage', - title: - 'Profiling the transcriptional heterogeneity of diverse pediatric solid tumors', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: '', - disease_timings: 'Initial Diagnosis', - diagnoses: 'Neuroblastoma', - diagnoses_counts: 'Neuroblastoma (1)', - seq_units: 'cell', technologies: '10Xv3', - sample_count: 38, - downloadable_sample_count: 4, - created_at: '2021-09-20T22:05:52.421147Z', - updated_at: '2021-09-20T22:05:52.859615Z' + title: 'Single cell RNA sequencing of pediatric low-grade gliomas', + unavailable_samples_count: 0, + updated_at: '2022-12-20T16:02:26.325284Z' } diff --git a/client/.storybook/data/projects.js b/client/.storybook/data/projects.js deleted file mode 100644 index 58e3eef2..00000000 --- a/client/.storybook/data/projects.js +++ /dev/null @@ -1,218 +0,0 @@ -export default [ - { - scpca_id: 'SCPCP00008', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'teachey_tan', - human_readable_pi_name: 'Teachey and Tan', - additional_metadata_keys: null, - title: - 'Single Cell Profiling of Early T cell Precursor Acute Lymphoblastic Leukemia', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.900240Z', - updated_at: '2021-09-20T22:05:52.900339Z' - }, - { - scpca_id: 'SCPCP00007', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'murphy_chen', - human_readable_pi_name: 'Murphy and Chen', - additional_metadata_keys: null, - title: - 'Single Nuclear RNA-seq and Spatial Transcriptomic Analysis of Anaplastic and Favorable Histology Wilms Tumor', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.892454Z', - updated_at: '2021-09-20T22:05:52.892485Z' - }, - { - scpca_id: 'SCPCP00006', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'mullighan', - human_readable_pi_name: 'Mullighan', - additional_metadata_keys: null, - title: 'Single-cell sequencing of acute lymphoblastomic leukemia', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.882628Z', - updated_at: '2021-09-20T22:05:52.882657Z' - }, - { - scpca_id: 'SCPCP00005', - computed_file: null, - samples: [], - summaries: [], - pi_name: ' Mulcahy', - human_readable_pi_name: 'Green', - additional_metadata_keys: null, - title: ' and Levy', - abstract: 'green_mulcahy_levy', - contact: - 'Single Cell RNA Sequencing of Pediatric High- and Low-Grade Gliomas', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.875837Z', - updated_at: '2021-09-20T22:05:52.875865Z' - }, - { - scpca_id: 'SCPCP00004', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'gawad', - human_readable_pi_name: 'Gawad', - additional_metadata_keys: null, - title: - 'Single-Cell Profiling of Acute Myeloid Leukemia for High-Resolution Chemo-immunotherapy Target Discovery', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.865810Z', - updated_at: '2021-09-20T22:05:52.865834Z' - }, - { - scpca_id: 'SCPCP00003', - computed_file: { - project: 'SCPCP00003', - sample: null, - id: 2, - type: 'PROJECT_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCP00003.zip', - size_in_bytes: 7183873, - created_at: '2021-09-20T22:05:52.857602Z', - updated_at: '2021-09-20T22:05:52.857634Z' - }, - samples: ['SCPCS000109'], - summaries: [ - { - diagnosis: 'Neuroblastoma', - seq_unit: 'cell', - technology: '10Xv3', - sample_count: 1, - updated_at: '2021-09-20T22:05:52.825288Z' - } - ], - pi_name: 'dyer_chen', - human_readable_pi_name: 'Dyer and Chen', - additional_metadata_keys: 'Treatment, Primary Site, COG Risk, IGSS Stage', - title: - 'Profiling the transcriptional heterogeneity of diverse pediatric solid tumors', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: '', - disease_timings: 'Initial Diagnosis', - diagnoses: 'Neuroblastoma', - diagnoses_counts: 'Neuroblastoma (1)', - seq_units: 'cell', - technologies: '10Xv3', - sample_count: 1, - created_at: '2021-09-20T22:05:52.421147Z', - updated_at: '2021-09-20T22:05:52.859615Z' - }, - { - scpca_id: 'SCPCP00002', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'collins', - human_readable_pi_name: 'Collins', - additional_metadata_keys: null, - title: 'A Single Cell Atlas of Pediatric Sarcoma', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.411432Z', - updated_at: '2021-09-20T22:05:52.411462Z' - }, - { - scpca_id: 'SCPCP00001', - computed_file: null, - samples: [], - summaries: [], - pi_name: 'christensen', - human_readable_pi_name: 'Christensen', - additional_metadata_keys: null, - title: - 'Single-cell gene expression and cytosine modification profiling in pediatric central nervous system tumors', - abstract: '', - contact: '', - has_bulk_rna_seq: false, - has_cite_seq_data: false, - has_spatial_data: false, - modalities: null, - disease_timings: '', - diagnoses: null, - diagnoses_counts: null, - seq_units: null, - technologies: null, - sample_count: 0, - created_at: '2021-09-20T22:05:52.393576Z', - updated_at: '2021-09-20T22:05:52.393616Z' - } -] diff --git a/client/.storybook/data/samples.js b/client/.storybook/data/samples.js deleted file mode 100644 index cbc9fe41..00000000 --- a/client/.storybook/data/samples.js +++ /dev/null @@ -1,398 +0,0 @@ -export default [ - { - scpca_id: 'SCPCS000109', - computed_file: { - project: null, - sample: 'SCPCS000109', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000110', - computed_file: { - project: null, - sample: 'SCPCS000110', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000111', - computed_file: { - project: null, - sample: 'SCPCS000111', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000112', - computed_file: { - project: null, - sample: 'SCPCS000112', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000113', - computed_file: { - project: null, - sample: 'SCPCS000113', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000114', - computed_file: { - project: null, - sample: 'SCPCS000114', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000115', - computed_file: { - project: null, - sample: 'SCPCS000115', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000116', - computed_file: { - project: null, - sample: 'SCPCS000116', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000117', - computed_file: { - project: null, - sample: 'SCPCS000117', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '9', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000118', - computed_file: { - project: null, - sample: 'SCPCS000118', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '10', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000119', - computed_file: { - project: null, - sample: 'SCPCS000119', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '10', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - }, - { - scpca_id: 'SCPCS000120', - computed_file: { - project: null, - sample: 'SCPCS000120', - id: 1, - type: 'SAMPLE_ZIP', - s3_bucket: 'scpca-local-data', - s3_key: 'SCPCS000109.zip', - size_in_bytes: 7183777, - created_at: '2021-09-20T22:05:52.778949Z', - updated_at: '2021-09-20T22:05:52.778993Z' - }, - project: 'SCPCP00003', - has_cite_seq_data: false, - technologies: '10Xv3', - diagnosis: 'Neuroblastoma', - subdiagnosis: 'MYCN non-amplified', - age_at_diagnosis: '10', - sex: 'F', - disease_timing: 'Initial Diagnosis', - tissue_location: 'Adrenal Gland', - treatment: 'treated', - seq_units: 'cell', - additional_metadata: { - 'COG Risk': 'High', - Treatment: 'treated', - 'IGSS Stage': '4', - 'Primary Site': 'Adrenal' - }, - created_at: '2021-09-20T22:05:52.788597Z', - updated_at: '2021-09-20T22:05:52.788630Z' - } -] diff --git a/client/.storybook/main.js b/client/.storybook/main.js index 8ee8f21d..b67fecd0 100644 --- a/client/.storybook/main.js +++ b/client/.storybook/main.js @@ -1,5 +1,4 @@ -const path = require('path') -const Dotenv = require('dotenv-webpack') +import * as path from 'path' const envVars = { API_HOST: 'http://localhost:8000', @@ -7,16 +6,31 @@ const envVars = { } module.exports = { + addons: [ + '@storybook/addon-storysource', + '@storybook/addon-links', + '@storybook/addon-essentials' + ], + framework: { + name: '@storybook/react-webpack5', + options: {} + }, + staticDirs: ['./../public'], stories: ['./stories/**/*.stories.@(js|mdx)'], - addons: ['@storybook/addon-storysource'], + webpackFinal: async (config) => { // Add src to imports (so this works with app webpack config) config.resolve.modules.push(path.resolve(__dirname, './../src')) - + config.resolve.alias['data'] = path.resolve(__dirname, './data') // Add env vars for helpers - Object.keys(envVars).forEach((key) => { - config.plugins.DefinePlugin.definitions[`process.env.${key}`] = - JSON.stringify(envVars[key]) + config.plugins.forEach((plugin) => { + if (Object.keys(plugin)[0] === 'definitions') { + Object.keys(envVars).forEach((key) => { + plugin['definitions'][`process.env.${key}`] = JSON.stringify( + envVars[key] + ) + }) + } }) return config diff --git a/client/.storybook/stories/DetailsTable.stories.js b/client/.storybook/stories/DetailsTable.stories.js index d1d6f4f3..0cfe8df9 100644 --- a/client/.storybook/stories/DetailsTable.stories.js +++ b/client/.storybook/stories/DetailsTable.stories.js @@ -1,7 +1,6 @@ import React from 'react' -import { Box } from 'grommet' import { DetailsTable } from 'components/DetailsTable' -import project from '../data/project' +import project from 'data/project' const defaultData = [ { label: 'String', value: 'This is a string.' }, diff --git a/client/.storybook/stories/Download.stories.js b/client/.storybook/stories/Download.stories.js index a8791e55..774c1dc9 100644 --- a/client/.storybook/stories/Download.stories.js +++ b/client/.storybook/stories/Download.stories.js @@ -1,10 +1,10 @@ import React from 'react' import { Download } from 'components/Download' -import project from '../data/project' +import project from 'data/project' export default { title: 'Components/Download', - args: { computedFile: project.computed_files } + args: { resource: project } } -export const Default = (args) => +export const Default = (args) => diff --git a/client/.storybook/stories/Footer.stories.js b/client/.storybook/stories/Footer.stories.js index 92dcd5f0..0b46e41e 100644 --- a/client/.storybook/stories/Footer.stories.js +++ b/client/.storybook/stories/Footer.stories.js @@ -5,4 +5,4 @@ export default { title: 'Components/Footer' } -export const Default = (args) =>