Skip to content

Commit f2a206f

Browse files
authored
fix: fix build speed (#1021) (#1023)
* fix: check if build speed can be improved (#1021) * feat: added tests for workflows service (#1021) * refactor: error (#1021) * fix: early exit on loading workflows (#1021) * fix: clear json from public api folder prior to copying new json (#1021) * fix: reuse of page props in workflow inputs view (#1021) --------- Co-authored-by: Fran McDade <[email protected]>
1 parent 361d6d4 commit f2a206f

File tree

30 files changed

+631
-107
lines changed

30 files changed

+631
-107
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ backend/**/.env
3636
# Playwright test artifacts
3737
/test-results
3838
/tests/screenshots
39+
/playwright-report
3940

4041
# python
4142
venv
4243
__pycache__
43-
playwright-report/
44+
45+
46+
## public api
47+
/public/api

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/GTFStep/hooks/UseUCSCFiles/hook.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import { useEffect, useState } from "react";
2-
import { BRCDataCatalogGenome } from "../../../../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
32
import { parseUCSCFilesResult } from "./utils";
43
import { UCSC_FILES_ENDPOINT } from "./constants";
54
import { UseUCSCFiles } from "./types";
6-
import { GA2AssemblyEntity } from "../../../../../../../../../../../../../apis/catalog/ga2/entities";
5+
import { Assembly } from "../../../../../../../../../../../../../views/WorkflowInputsView/types";
76

87
const SPECIAL_CASE_ASSEMBLY_LOOKUP: Record<string, string> = {
98
"GCF_000001405.40": "hg38",
109
} as const;
1110

12-
export const useUCSCFiles = (
13-
genome: BRCDataCatalogGenome | GA2AssemblyEntity
14-
): UseUCSCFiles => {
11+
export const useUCSCFiles = (genome: Assembly): UseUCSCFiles => {
1512
const assemblyId =
1613
SPECIAL_CASE_ASSEMBLY_LOOKUP[genome.accession] ?? genome.accession;
1714
const [geneModelUrls, setGeneModelUrls] = useState<string[] | undefined>();

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/SequencingStep/components/ENASequencingData/components/CollectionSummary/components/Alert/hooks/UseRequirementsMatches/hook.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { ReadRun } from "../../../../../../types";
33
import { UseRequirementsMatches } from "./types";
44
import { useMemo } from "react";
55
import { buildRequirementWarnings } from "./utils";
6-
import { BRCDataCatalogGenome } from "../../../../../../../../../../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
7-
import { GA2AssemblyEntity } from "../../../../../../../../../../../../../../../../../../../apis/catalog/ga2/entities";
6+
import { Assembly } from "../../../../../../../../../../../../../../../../../../../views/WorkflowInputsView/types";
87

98
export const useRequirementsMatches = (
109
table: Table<ReadRun>,
11-
genome: BRCDataCatalogGenome | GA2AssemblyEntity
10+
genome: Assembly
1211
): UseRequirementsMatches => {
1312
const { getSelectedRowModel, initialState } = table;
1413
const { columnFilters } = initialState;

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/SequencingStep/components/ENASequencingData/components/CollectionSummary/components/Alert/hooks/UseRequirementsMatches/utils.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { ColumnFiltersState, Row } from "@tanstack/react-table";
22
import { ReadRun } from "../../../../../../types";
33
import { COLUMN_KEY_TO_LABEL } from "./constants";
4-
import { BRCDataCatalogGenome } from "../../../../../../../../../../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
5-
import { GA2AssemblyEntity } from "../../../../../../../../../../../../../../../../../../../apis/catalog/ga2/entities";
64
import { LABEL } from "@databiosphere/findable-ui/lib/apis/azul/common/entities";
5+
import { Assembly } from "../../../../../../../../../../../../../../../../../../../views/WorkflowInputsView/types";
76

87
/**
98
* Builds warnings for column filter mismatches.
@@ -61,7 +60,7 @@ function buildDataWarnings(
6160
export function buildRequirementWarnings(
6261
initialColumnFilters: ColumnFiltersState,
6362
rows: Row<ReadRun>[],
64-
genome: BRCDataCatalogGenome | GA2AssemblyEntity
63+
genome: Assembly
6564
): string[] {
6665
if (rows.length === 0) return [];
6766
const speciesWarnings = buildSpeciesWarnings(rows, genome);
@@ -77,7 +76,7 @@ export function buildRequirementWarnings(
7776
*/
7877
function buildSpeciesWarnings(
7978
rows: Row<ReadRun>[],
80-
genome: BRCDataCatalogGenome | GA2AssemblyEntity
79+
genome: Assembly
8180
): string[] {
8281
const { ncbiTaxonomyId, taxonomicLevelSpecies } = genome;
8382

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/SequencingStep/components/ENASequencingData/hooks/UseENADataByTaxonomyId/hook.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { UseENADataByTaxonomyId } from "./types";
33
import { fetchENAData } from "./request";
44
import { useAsync } from "@databiosphere/findable-ui/lib/hooks/useAsync";
55
import { isEligible } from "./utils";
6-
import { BRCDataCatalogGenome } from "../../../../../../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
7-
import { GA2AssemblyEntity } from "../../../../../../../../../../../../../../../apis/catalog/ga2/entities";
86
import { useConfig } from "@databiosphere/findable-ui/lib/hooks/useConfig";
97
import { AppSiteConfig } from "../../../../../../../../../../../../../../../../site-config/common/entities";
8+
import { Assembly } from "../../../../../../../../../../../../../../../views/WorkflowInputsView/types";
109

1110
export const useENADataByTaxonomyId = <T>(
12-
genome: BRCDataCatalogGenome | GA2AssemblyEntity
11+
genome: Assembly
1312
): UseENADataByTaxonomyId<T> => {
1413
const { ncbiTaxonomyId: taxonomyId } = genome;
1514
const { config } = useConfig();

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import { ComponentType, ReactNode } from "react";
22
import { StepProps as MStepProps } from "@mui/material";
3-
import {
4-
BRCDataCatalogGenome,
5-
Workflow,
6-
} from "../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
3+
import { Workflow } from "../../../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
74
import {
85
ConfiguredInput,
96
OnConfigure,
107
} from "../../../../../../../../../../views/WorkflowInputsView/hooks/UseConfigureInputs/types";
118
import { Status, OnLaunchGalaxy } from "./hooks/UseLaunchGalaxy/types";
129
import { OnContinue, OnEdit } from "../../hooks/UseStepper/types";
13-
import { GA2AssemblyEntity } from "../../../../../../../../../../apis/catalog/ga2/entities";
10+
import { Assembly } from "../../../../../../../../../../views/WorkflowInputsView/types";
1411

1512
export interface StepConfig {
1613
description?: ReactNode;
@@ -27,7 +24,7 @@ export interface StepProps
2724
Required<Pick<MStepProps, "index" | "active">> {
2825
configuredInput: ConfiguredInput;
2926
entryLabel: string;
30-
genome: BRCDataCatalogGenome | GA2AssemblyEntity;
27+
genome: Assembly;
3128
onConfigure: OnConfigure;
3229
onContinue: OnContinue;
3330
onEdit: OnEdit;

app/components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
import {
2-
BRCDataCatalogGenome,
3-
Workflow,
4-
} from "../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
1+
import { Workflow } from "../../../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
52
import { OnConfigure } from "../../../../../../../../views/WorkflowInputsView/hooks/UseConfigureInputs/types";
63
import {
74
Status,
85
OnLaunchGalaxy,
96
} from "./components/Step/hooks/UseLaunchGalaxy/types";
10-
import { GA2AssemblyEntity } from "../../../../../../../../apis/catalog/ga2/entities";
117
import { StepConfig } from "./components/Step/types";
128
import { ConfiguredInput } from "../../../../../../../../views/WorkflowInputsView/hooks/UseConfigureInputs/types";
9+
import { Assembly } from "../../../../../../../../views/WorkflowInputsView/types";
1310

1411
export interface Props {
1512
configuredInput: ConfiguredInput;
1613
configuredSteps: StepConfig[];
17-
genome: BRCDataCatalogGenome | GA2AssemblyEntity;
14+
genome: Assembly;
1815
onConfigure: OnConfigure;
1916
onLaunchGalaxy: OnLaunchGalaxy;
2017
status: Status;
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
import {
2-
BRCDataCatalogGenome,
3-
Workflow,
4-
} from "../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
1+
import { Workflow } from "../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
52
import {
63
ConfiguredInput,
74
OnConfigure,
85
} from "../../../../../../views/WorkflowInputsView/hooks/UseConfigureInputs/types";
9-
import { GA2AssemblyEntity } from "../../../../../../apis/catalog/ga2/entities";
106
import { StepConfig } from "./components/Stepper/components/Step/types";
7+
import { Assembly } from "../../../../../../views/WorkflowInputsView/types";
118

129
export interface Props {
1310
configuredInput: ConfiguredInput;
1411
configuredSteps: StepConfig[];
15-
genome: BRCDataCatalogGenome | GA2AssemblyEntity;
12+
genome: Assembly;
1613
onConfigure: OnConfigure;
1714
workflow: Workflow;
1815
}
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import {
2-
BRCDataCatalogGenome,
3-
Workflow,
4-
} from "../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
1+
import { Workflow } from "../../../../../../apis/catalog/brc-analytics-catalog/common/entities";
52
import { ConfiguredInput } from "../../../../../../views/WorkflowInputsView/hooks/UseConfigureInputs/types";
6-
import { GA2AssemblyEntity } from "../../../../../../apis/catalog/ga2/entities";
73
import { StepConfig } from "../../../../../../components/Entity/components/ConfigureWorkflowInputs/components/Main/components/Stepper/components/Step/types";
4+
import { Assembly } from "../../../../../../views/WorkflowInputsView/types";
85

96
export interface Props {
107
configuredInput: ConfiguredInput;
118
configuredSteps: StepConfig[];
12-
genome: BRCDataCatalogGenome | GA2AssemblyEntity;
9+
genome: Assembly;
1310
workflow: Workflow;
1411
}

app/components/Entity/components/ConfigureWorkflowInputs/components/Top/top.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Props } from "../../../../../../views/WorkflowInputsView/types";
1+
import { Props } from "./types";
22
import { getBreadcrumbs } from "./utils";
33
import { BackPageHero } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero";
44

0 commit comments

Comments
 (0)