Skip to content
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

Release 2.2rc1 #293

Merged
merged 38 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
df7855d
Upgraded to yarn v3 berry
victorskl May 24, 2023
a9ee013
Add PDF Viewer (#266)
williamputraintan May 24, 2023
fe6ce69
Merge pull request #267 from umccr/upgrade-yarn-v3-berry
victorskl May 24, 2023
df0e653
Bumped dependencies
victorskl Jun 16, 2023
b45ac55
Merge pull request #268 from umccr/bump-deps-20230616
victorskl Jun 16, 2023
c55b793
Bumped dependencies
victorskl Jul 7, 2023
605691f
Merge pull request #270 from umccr/bump-deps-20230707
victorskl Jul 7, 2023
fd1a0ba
Rolled back prettier
victorskl Jul 7, 2023
d7d5012
Merge pull request #271 from umccr/roll-back-prettier
victorskl Jul 7, 2023
06dcddd
Fixed code formats by prettier
victorskl Jul 7, 2023
ba9316c
Merge pull request #272 from umccr/prettier-fixes
victorskl Jul 7, 2023
46bc21c
Fixed lint issues
victorskl Jul 7, 2023
db1606a
Merge pull request #273 from umccr/lint-fixes
victorskl Jul 7, 2023
52ff2d7
Added WTS fusions report to Analysis Results summary panel
victorskl Jul 11, 2023
3ccca4d
Merge pull request #274 from umccr/add-wts-fusions-report-filter
victorskl Jul 11, 2023
3d889c9
Added germline VCFs to Analysis Results summary panel
victorskl Jul 11, 2023
f9d2dbf
Merge pull request #275 from umccr/expose-germline-vcf
victorskl Jul 12, 2023
76665a3
Fix S3 Archival API (#276)
williamputraintan Jul 12, 2023
2a225c6
Improved TN launch pad meta table to show all WGS libraries
victorskl Aug 4, 2023
b271d6c
Bumped dependencies
victorskl Aug 4, 2023
22a9247
Merge pull request #277 from umccr/fix-tn-launch-pad-meta-rows
victorskl Aug 14, 2023
50477ae
Merge pull request #278 from umccr/bump-deps-20230804
victorskl Aug 14, 2023
b0d6d2d
feat: Trigger Star Alignment from UI (#279)
williamputraintan Aug 17, 2023
d4e6916
feat: Oncoanalyser Trigger (#280)
williamputraintan Aug 21, 2023
fb93ffb
Bump `primereact` 9.6.2 (#282)
williamputraintan Aug 21, 2023
d2c2dd5
Fix: GPL Eligibility Check && Some UI Fixes (#281)
williamputraintan Aug 22, 2023
627e5f0
Fix Discrepancy Variable Naming (#283)
williamputraintan Aug 22, 2023
ad8bce4
Update Default Component Name for RNAsum trigger (#285)
williamputraintan Aug 22, 2023
f563f7b
Fix Attempt CodeBuild (#286)
williamputraintan Aug 23, 2023
4615480
FE Chores (#288)
williamputraintan Aug 28, 2023
b47744a
Update yarn.lock (#289)
williamputraintan Sep 4, 2023
0528af1
Bumped dependencies
victorskl Oct 26, 2023
8b610eb
Merge pull request #290 from umccr/bump-deps-20231026
victorskl Oct 26, 2023
0150408
Bumped CodeBuild Nodejs 18
victorskl Oct 26, 2023
64e2d33
Merge pull request #291 from umccr/fix-codebuild-nodejs-18
victorskl Oct 26, 2023
636bfc1
Disabled temporarily oncoanalyser from Launch Pad UI
victorskl Oct 27, 2023
650382b
More commenting
williamputraintan Oct 27, 2023
070c2c6
Merge pull request #292 from umccr/hide-onco-buttons
victorskl Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
{
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
]
],
"@typescript-eslint/no-explicit-any": "off"
},
"settings": {
"react": {
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
hooks:
- id: yarn-audit
name: yarn audit
entry: npx yarn audit --groups dependencies
entry: npx yarn audit
language: system
pass_filenames: false

Expand Down
16 changes: 11 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# See https://prettier.io/docs/en/ignore.html

# Ignore artifacts:
build
coverage
local_ignore
bams
vcfs
build/
coverage/
local_ignore/
bams/
vcfs/
htsget/

# Ignore all HTML files:
*.html
Expand All @@ -15,3 +16,8 @@ buildspec.yml
docker-compose.yml
README.md
start.sh

.yarnrc.yml
.yarn/
.local/
dist/
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-outdated.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

873 changes: 873 additions & 0 deletions .yarn/releases/yarn-3.5.1.cjs

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"

yarnPath: .yarn/releases/yarn-3.5.1.cjs
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ git push origin main
### TL;DR
```
node -v
v16.15.0
v18.16.0

npm i -g yarn

(NOTE: yarn should auto resolve to local version from `.yarn` that configure in `package.json` > `packageManager`)
yarn -v
3.5.1

yarn install

aws sso login --profile dev
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.2
phases:
install:
runtime-versions:
nodejs: 14
nodejs: 18
commands:
- yarn install
build:
Expand Down
62 changes: 33 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
{
"name": "data-portal-client",
"version": "2.1.0",
"version": "2.2.0-rc.1",
"private": true,
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"scripts": {
"start": "source start.sh",
"dev": "source start.sh",
"start": "bash -c 'source start.sh'",
"dev": "bash -c 'source start.sh'",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint src",
"prettier": "prettier --check .",
"precommit": "pre-commit run --all-files"
"prettier-fix": "prettier --write .",
"precommit": "pre-commit run --all-files",
"audit": "yarn npm audit"
},
"dependencies": {
"@aws-amplify/api": "^5.0.22",
"@aws-amplify/auth": "^5.2.0",
"@aws-amplify/core": "^5.1.5",
"@aws-sdk/client-lambda": "^3.300.0",
"igv": "2.13.11",
"@aws-amplify/api": "^5.4.5",
"@aws-amplify/auth": "^5.6.5",
"@aws-amplify/core": "^5.8.5",
"@aws-sdk/client-lambda": "^3.436.0",
"igv": "2.15.11",
"lodash": "^4.17.21",
"mime": "^3.0.0",
"moment": "^2.29.4",
"primeflex": "^3.3.0",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primereact": "^8.7.3",
"primereact": "^9.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-json-pretty": "^2.2.0",
"react-query": "^3.39.3",
"react-router-dom": "^6.9.0",
"unsplash-js": "^7.0.15"
"react-router-dom": "^6.17.0",
"unsplash-js": "^7.0.18"
},
"devDependencies": {
"@types/mime": "^3.0.1",
"@types/node": "^18.15.10",
"@types/react": "^18.0.30",
"@types/react-dom": "^18.0.11",
"@types/lodash": "^4.14.200",
"@types/mime": "^3.0.3",
"@types/node": "^20.8.9",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"@vitejs/plugin-react": "^3.1.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"prettier": "^2.8.7",
"typescript": "^4.9.4",
"vite": "^4.2.1"
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/plugin-react": "^4.1.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.1",
"prettier": "^3.0.1",
"typescript": "^5.1.6",
"vite": "^4.5.0"
},
"resolutions": {}
"packageManager": "yarn@3.5.1"
}
10 changes: 8 additions & 2 deletions src/api/fastq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,22 @@ export type FastqRow = {

export type FastqApiRes = DjangoRestApiResponse & { results: FastqRow[] };
type UsePortalFastqAPIProps = {
additionalPath: string;
additionalPath?: string;
apiConfig: Record<string, any>;
useQueryOption?: Record<string, any>;
};
export function usePortalFastqAPI({ additionalPath, apiConfig }: UsePortalFastqAPIProps) {
export function usePortalFastqAPI({
additionalPath = '',
apiConfig,
useQueryOption,
}: UsePortalFastqAPIProps) {
return useQuery(
['portal-fastq', additionalPath, apiConfig],
async (): Promise<FastqApiRes> =>
await API.get('portal', `/fastq/${additionalPath}`, apiConfig),
{
staleTime: Infinity,
...useQueryOption,
}
);
}
18 changes: 17 additions & 1 deletion src/api/gds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,30 @@ export type PresignApiData = {
export function usePortalGDSPresignAPI(gdsId?: string | number, apiConfig?: Record<string, any>) {
return useQuery(
['portal-gds-presign', gdsId, apiConfig],
async () => await API.get('portal', `/gds/${gdsId}/presign`, { ...apiConfig }),
async (): Promise<PresignApiData> =>
await API.get('portal', `/gds/${gdsId}/presign`, { ...apiConfig }),
{
staleTime: 60 * 60 * 1000, // 1hour,
enabled: !!gdsId,
}
);
}

/**
* Generate a brand new presigned url for the particular object Id.
*
* By default, the API it will have 'Attachment' Content-Disposition. For 'inline' set the 'Content-Disposition' and 'Content-Type'.
* Example on specifying inline in the apiConfig as follows.
{
"headers": {
"Content-Disposition": "inline",
"Content-Type": "text/html"
}
}
* @param id
* @param apiConfig
* @returns
*/
export async function getGDSPreSignedUrl(id: number, apiConfig?: Record<string, any>) {
const { error, signed_url } = await API.get('portal', `/gds/${id}/presign`, { ...apiConfig });
if (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/api/lims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type LimsRow = {
assay: string;
override_cycles: string;
phenotype: string;
} & Record<string, string>;
} & Record<string, string | number | null>;

export type LimsApiRes = DjangoRestApiResponse & { results: LimsRow[] };

Expand Down
2 changes: 1 addition & 1 deletion src/api/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export type PresignApiData = {
export function usePortalS3PresignAPI(s3Id?: string | number) {
return useQuery(
['portal-s3-presign', s3Id],
async () => await API.get('portal', `/s3/${s3Id}/presign`, {}),
async (): Promise<PresignApiData> => await API.get('portal', `/s3/${s3Id}/presign`, {}),
{
staleTime: 60 * 60 * 1000, // 1hour,
enabled: !!s3Id,
Expand Down
3 changes: 2 additions & 1 deletion src/api/subject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { API } from '@aws-amplify/api';
import { useQuery } from 'react-query';
import { S3Row } from './s3';
import { GDSRow } from './gds';
import { LimsRow } from './lims';
/**
* Portal `/subject/{subjectId}` api
*/

export type SubjectApiRes = {
id: string;
lims: Record<string, string | number | boolean | null>[];
lims: LimsRow[];
features: string;
results: S3Row[];
results_gds: GDSRow[];
Expand Down
2 changes: 1 addition & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ button {
}

body {
/*background-color: rgb(231, 235, 240);*/
background-color: rgb(231, 235, 240);
}

.p-listbox-item:focus {
Expand Down
3 changes: 1 addition & 2 deletions src/components/CircularLoaderWithText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default function CircularLoaderWithText(props: Props): React.ReactElement
}}>
<ProgressSpinner
style={{ height: spinnerSize, width: spinnerSize }}
strokeWidth='8'
fill='var(--surface-ground)'
strokeWidth='4'
animationDuration='.5s'
/>
{props.text ? <div style={{ paddingTop: '1rem' }}>{text}</div> : <></>}
Expand Down
16 changes: 15 additions & 1 deletion src/components/DataTableWrapper/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.p-dropdown{
.p-dropdown {
margin-right: auto;
}
.p-datatable-wrapper {
Expand All @@ -10,6 +10,20 @@
border-radius: 50% !important;
}

.p-paginator .p-paginator-current {
background-color: transparent !important;
border: 0 none !important;
color: #6c757d !important;
min-width: 3rem !important;
height: 3rem !important;
margin: 0.143rem !important;
padding: 0 0.5rem !important;
}

.p-paginator-pages button {
margin: 0.1rem !important;
}

.ui-datatable-hor-scroll .ui-datatable-tablewrapper,
.scrolling-div .ui-datatable-tablewrapper {
overflow: auto;
Expand Down
29 changes: 12 additions & 17 deletions src/components/DataTableWrapper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React, { useState } from 'react';
import {
DataTable,
DataTableProps,
DataTablePFSEvent,
DataTableSortOrderType,
} from 'primereact/datatable';
import { DataTable, DataTableProps, DataTableStateEvent } from 'primereact/datatable';
import { Column, ColumnProps } from 'primereact/column';
import { Dialog } from 'primereact/dialog';
import { Button } from 'primereact/button';
Expand All @@ -25,13 +20,13 @@ export type PaginationProps = {
type DataTableWrapperProps = {
columns: ColumnProps[];
isLoading: boolean;
dataTableValue: unknown[];
overrideDataTableProps?: DataTableProps;
dataTableValue: Record<string, any>[];
overrideDataTableProps?: DataTableProps<Record<string, any>[]>;
paginationProps?: PaginationProps;
handlePaginationPropsChange?: (event: { [key: string]: number }) => void;
sortField?: string;
sortOrder?: DataTableSortOrderType;
onSort?: (event: DataTablePFSEvent) => void;
sortOrder?: 0 | 1 | -1 | null;
onSort?: (event: DataTableStateEvent) => void;
};

function DataTableWrapper(props: DataTableWrapperProps) {
Expand All @@ -47,7 +42,8 @@ function DataTableWrapper(props: DataTableWrapperProps) {
onSort,
} = props;

const additionalDataTableProps = { ...overrideDataTableProps };
const additionalDataTableProps = overrideDataTableProps ? { ...overrideDataTableProps } : {};

// Pagination could be undefined (if not needed or don't want it)
// This will guard if pagination props exist and could be mounter to the UI
if (paginationProps && handlePaginationPropsChange) {
Expand Down Expand Up @@ -79,7 +75,6 @@ function DataTableWrapper(props: DataTableWrapperProps) {
loading={isLoading}
rowHover
size='small'
responsiveLayout='scroll'
className='ui-datatable-hor-scroll'
emptyMessage='No Data found!'
resizableColumns
Expand Down Expand Up @@ -195,19 +190,19 @@ export const convertPaginationEventToDjangoQueryParams = (event: { [key: string]
/**
* Django to Data Table Sorting Props
*/
export type djangoSortingFormat = {
sortOrder: DataTableSortOrderType;
export type DjangoSortingFormat = {
sortOrder: 0 | 1 | -1 | null | undefined;
sortField: string;
};
export function convertDjangoStateToDjangoQuery(state: djangoSortingFormat) {
export function convertDjangoStateToDjangoQuery(state: DjangoSortingFormat) {
const ordering = state.sortOrder == -1 ? '-' : '';
return {
ordering: `${ordering}${state.sortField}`,
};
}
type queryParamDjango = { ordering?: string } & Record<string, string | number>;
type QueryParamDjango = { ordering?: string } & Record<string, string | number>;
export function convertDjangoSortParamToDataTableProp(
queryParam: queryParamDjango
queryParam: QueryParamDjango
): Record<string, any> {
const ordering = queryParam.ordering ?? '-id';
const sortOrder = ordering.startsWith('-') ? -1 : 1;
Expand Down
Loading