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

Feat/cleanup old GWAS UI app code #1231

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ module.exports = {
'react/no-unused-prop-types': 'off',
},
},
{
files: ['src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx'],
rules: {
'react/no-unknown-property': ['error', { ignore: ['align'] }], // centering in h3
},
},
// Linting settings for Typescript
{
files: ['*.ts', '*.tsx'],
Expand Down
15 changes: 0 additions & 15 deletions .github/linters/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,21 +225,6 @@
"react/no-unused-prop-types": "off"
}
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment, no changes needed:

This was probably a bad approach to begin with. Better would have been to ignore the line or the entire file rather than adding a new global rule for one file.

"files": [
"src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx"
],
"rules": {
"react/no-unknown-property": [
"error",
{
"ignore": [
"align"
]
}
]
}
},
{
"files": [
"*.ts",
Expand Down
22 changes: 2 additions & 20 deletions src/Analysis/AnalysisApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import { TourProvider } from '@reactour/tour';
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
import BackLink from '../components/BackLink';
import HIVCohortFilter from '../HIVCohortFilter/HIVCohortFilter';
import ReduxGWASUIApp from './GWASUIApp/ReduxGWASUIApp';
import { analysisApps } from '../localconf';
import './AnalysisApp.css';
import sessionMonitor from '../SessionMonitor';
import GWASWorkflowList from './GWASUIApp/GWASWorkflowList';
import GWASWorkflowList from './GWASResults/GWASWorkflowList';
import GWASContainer from './GWASV2/GWASContainer';

const queryClient = new QueryClient();
Expand Down Expand Up @@ -96,30 +95,13 @@ class AnalysisApp extends React.Component {
<Button label='Run' buttonType='primary' onClick={this.onSubmitJob} isPending={this.isJobRunning()} />
</React.Fragment>
);
case 'GWASUIApp':
return (
<TourProvider
afterOpen={disableBody}
beforeClose={enableBody}
disableInteraction
onClickClose={({ setCurrentStep, setIsOpen }) => {
setIsOpen(false);

setCurrentStep(0);
}}
>
<div className='analysis-app_flex_col'>
<ReduxGWASUIApp />
</div>
</TourProvider>
);
case 'GWASResults':
return (
<div className='analysis-app_flex_row'>
<GWASWorkflowList refetchInterval={5000} />
</div>
);
case 'GWAS++': {
case 'GWASUIApp': {
return (
<TourProvider
afterOpen={disableBody}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
} from '@ant-design/icons';
import { useQuery } from 'react-query';
import PropTypes from 'prop-types';
import { gwasWorkflowPath } from '../../../localconf';
import { headers } from '../../../configs';
import { getPresignedUrl } from '../../AnalysisJob';
import { gwasWorkflowPath } from '../../localconf';
import { headers } from '../../configs';
import { getPresignedUrl } from '../AnalysisJob';
import { gwasStatus } from './constants';

const GWASJob = ({ workflow }) => {
Expand Down Expand Up @@ -163,7 +163,7 @@ const GWASJob = ({ workflow }) => {
};

GWASJob.propTypes = {
workflow: PropTypes.string.isRequired,
workflow: PropTypes.object.isRequired,
};

export default GWASJob;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './GWASUIApp.css';
import { useQuery } from 'react-query';
import PropTypes from 'prop-types';
import { gwasWorkflowPath } from '../../localconf';
import GWASJob from '../GWASWizard/shared/GWASJob';
import GWASJob from './GWASJob';

const GWASWorkflowList = ({ refetchInterval }) => {
const { Panel } = Collapse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { useState } from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import { rest } from 'msw';
import GWASWorkflowList from './GWASWorkflowList';
import { gwasStatus } from '../GWASWizard/shared/constants';
import { gwasStatus } from './constants';

export default {
title: 'Tests2/GWASUI/WorkflowList',
title: 'Tests2/GWASResults/WorkflowList',
component: GWASWorkflowList,
};

Expand Down
7 changes: 7 additions & 0 deletions src/Analysis/GWASResults/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const gwasStatus = {
pending: 'Pending',
running: 'Running',
succeeded: 'Succeeded',
failed: 'Failed',
error: 'Error',
};
102 changes: 0 additions & 102 deletions src/Analysis/GWASUIApp/GWASUIApp.jsx

This file was deleted.

9 changes: 0 additions & 9 deletions src/Analysis/GWASUIApp/ReduxGWASUIApp.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import SelectCohortDropDown from '../SelectCohort/SelectCohortDropDown';
import CohortsOverlapDiagram from '../Diagrams/CohortsOverlapDiagram/CohortsOverlapDiagram';
import './Covariates.css';
import '../../../GWASUIApp/GWASUIApp.css';
import '../../../GWASResults/GWASUIApp.css';

const CustomDichotomousCovariates = ({
dispatch,
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/GWASV2/Components/SearchBar/SearchBar.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { SearchOutlined } from '@ant-design/icons';
import '../../../GWASUIApp/GWASUIApp.css';
import '../../../GWASResults/GWASUIApp.css';

const SearchBar = ({ searchTerm, handleSearch, field = 'variable name' }) => (
<div data-tour='search-bar' className='GWASUI-searchContainer'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SourceContextProvider } from '../../Utils/Source';
import ACTIONS from '../../Utils/StateManagement/Actions';
import './SelectCohort.css';
import '../../../GWASV2/GWASV2.css';
import '../../../GWASUIApp/GWASUIApp.css';
import '../../../GWASResults/GWASUIApp.css';

export default {
title: 'Tests3/GWASV2/SelectCohort/SelectCohort',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Space } from 'antd';
import { SourceContextProvider } from '../../Utils/Source';
import './SelectCohort.css';
import '../../../GWASV2/GWASV2.css';
import '../../../GWASUIApp/GWASUIApp.css';
import '../../../GWASResults/GWASUIApp.css';

export default {
title: 'Tests3/GWASV2/SelectCohort/SelectCohortDropDown',
Expand Down
105 changes: 0 additions & 105 deletions src/Analysis/GWASWizard/CohortOverlap.jsx

This file was deleted.

Loading