Skip to content

Commit

Permalink
Merge branch 'main' into increase-test-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored May 15, 2023
2 parents 5946515 + 090d713 commit 4e8f538
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 209 deletions.
3 changes: 1 addition & 2 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1646,15 +1646,14 @@
"lodash.isequal": "4.5.0",
"lodash.merge": "4.6.2",
"lodash.omit": "4.5.0",
"node-fetch": "2.6.9",
"process-exists": "5.0.0",
"tree-kill": "1.2.2",
"uuid": "9.0.0",
"vega-util": "1.17.2",
"vscode-languageclient": "8.1.0"
},
"devDependencies": {
"@swc/core": "1.3.56",
"@swc/core": "1.3.58",
"@swc/jest": "0.2.26",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
Expand Down
2 changes: 0 additions & 2 deletions extension/src/test/fixtures/expShow/base/workspaceChanges.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { buildDepPath } from '../../../../experiments/columns/paths'

const data = [
'metrics:summary.json:accuracy',
'metrics:summary.json:loss',
Expand Down
5 changes: 1 addition & 4 deletions extension/src/test/fixtures/expShow/dataTypes/rows.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ExperimentStatus,
EXPERIMENT_WORKSPACE_ID
} from '../../../../cli/dvc/contract'
import { EXPERIMENT_WORKSPACE_ID } from '../../../../cli/dvc/contract'
import { Commit } from '../../../../experiments/webview/contract'

const data: Commit[] = [
Expand Down
17 changes: 3 additions & 14 deletions extension/src/test/fixtures/expShow/dataTypes/tableData.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
import columns from './columns'
import defaultData from '../base/tableData'
import rows from './rows'
import { TableData } from '../../../../experiments/webview/contract'

export const data: TableData = {
changes: [],
columnOrder: [],
...defaultData,
columns,
columnWidths: {},
filteredCount: 0,
filters: [],
hasBranchesToSelect: true,
hasCheckpoints: false,
hasColumns: true,
hasConfig: true,
hasMoreCommits: true,
hasRunningWorkspaceExperiment: false,
hasValidDvcYaml: true,
isShowingMoreCommits: true,
isBranchesView: false,
rows,
selectedForPlotsCount: 0,
sorts: []
selectedForPlotsCount: 0
}

export default data
13 changes: 2 additions & 11 deletions extension/src/test/fixtures/expShow/deeplyNested/tableData.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import columns from './columns'
import rows from './rows'
import defaultData from '../base/tableData'
import { TableData } from '../../../../experiments/webview/contract'

const data: TableData = {
changes: [],
columnOrder: [],
...defaultData,
columns,
columnWidths: {},
filteredCount: 0,
filters: [
'params:params.yaml:nested1.doubled',
'params:params.yaml:nested1%2Enested2%2Enested3.nested4.nested5b.doubled'
],
hasBranchesToSelect: true,
hasCheckpoints: false,
hasColumns: true,
hasConfig: true,
hasMoreCommits: true,
hasRunningWorkspaceExperiment: false,
hasValidDvcYaml: true,
isBranchesView: false,
isShowingMoreCommits: true,
rows,
selectedForPlotsCount: 0,
sorts: [
Expand Down
20 changes: 3 additions & 17 deletions extension/src/test/fixtures/expShow/survival/tableData.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
import { TableData } from '../../../../experiments/webview/contract'
import rowsFixture from './rows'
import columnsFixture from './columns'
import defaultData from '../base/tableData'

const data: TableData = {
changes: [],
columnOrder: [],
...defaultData,
columns: columnsFixture,
columnWidths: {},
filteredCount: 0,
filters: [],
hasBranchesToSelect: true,
hasCheckpoints: true,
hasColumns: true,
hasConfig: true,
hasMoreCommits: true,
hasRunningWorkspaceExperiment: true,
hasValidDvcYaml: true,
isBranchesView: false,
isShowingMoreCommits: true,
rows: rowsFixture,
selectedForPlotsCount: 0,
sorts: []
rows: rowsFixture
}

export default data
30 changes: 3 additions & 27 deletions extension/src/test/suite/experiments/model/filterBy/tree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,9 @@ suite('Experiments Filter By Tree Test Suite', () => {

const filteredTableData: Partial<TableData> = {
changes: workspaceChangesFixture,
columnOrder: columnsOrderFixture,
columnWidths: {},
columns: columnsFixture,
filteredCount: 1,
filters: [accuracyPath],
hasCheckpoints: true,
hasColumns: true,
hasConfig: true,
hasRunningWorkspaceExperiment: true,
hasValidDvcYaml: true,
rows: filteredRows,
sorts: []
rows: filteredRows
}

expect(messageSpy).to.be.calledWithMatch(filteredTableData)
Expand All @@ -135,18 +126,10 @@ suite('Experiments Filter By Tree Test Suite', () => {

const unfilteredTableData: Partial<TableData> = {
changes: workspaceChangesFixture,
columnOrder: columnsOrderFixture,
columnWidths: {},
columns: columnsFixture,
filteredCount: 0,
filters: [],
hasCheckpoints: true,
hasColumns: true,
hasConfig: true,
hasRunningWorkspaceExperiment: true,
hasValidDvcYaml: true,
rows: [workspace, main],
sorts: []
rows: [workspace, main]
}

expect(messageSpy).to.be.calledWithMatch(unfilteredTableData)
Expand Down Expand Up @@ -379,17 +362,10 @@ suite('Experiments Filter By Tree Test Suite', () => {
const filteredTableData: Partial<TableData> = {
changes: workspaceChangesFixture,
columnOrder: columnsOrderFixture,
columnWidths: {},
columns: columnsFixture,
filteredCount: 6,
filters: ['starred'],
hasCheckpoints: true,
hasColumns: true,
hasConfig: true,
hasRunningWorkspaceExperiment: true,
hasValidDvcYaml: true,
rows: filteredRows,
sorts: []
rows: filteredRows
}

expect(messageSpy).to.be.calledWithMatch(filteredTableData)
Expand Down
2 changes: 1 addition & 1 deletion languageServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "jest --collect-coverage"
},
"devDependencies": {
"@swc/core": "1.3.56",
"@swc/core": "1.3.58",
"@swc/jest": "0.2.26",
"@types/jest": "29.5.1",
"clean-webpack-plugin": "4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"svgr": "yarn workspace dvc-vscode-webview svgr"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.59.2",
"@typescript-eslint/parser": "5.59.2",
"@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.5",
"@vscode/codicons": "0.0.33",
"eslint": "8.40.0",
"eslint-config-prettier": "8.8.0",
Expand Down
2 changes: 1 addition & 1 deletion webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@svgr/core": "^8.0.0",
"@svgr/plugin-jsx": "^8.0.1",
"@svgr/plugin-prettier": "^8.0.1",
"@swc/core": "1.3.56",
"@swc/core": "1.3.58",
"@swc/jest": "0.2.26",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
Expand Down
18 changes: 3 additions & 15 deletions webview/src/test/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ColumnType,
TableData
} from 'dvc/src/experiments/webview/contract'
import defaultTableData from 'dvc/src/test/fixtures/expShow/base/tableData'

const defaultColumn = ['Experiment', 'Created']

Expand Down Expand Up @@ -40,21 +41,9 @@ const columns = [
]

export const tableData: TableData = {
changes: [],
columnOrder: [],
columnWidths: {},
...defaultTableData,
columns: columns as Column[],
filteredCount: 0,
filters: [],
hasBranchesToSelect: true,
hasCheckpoints: false,
hasColumns: true,
hasConfig: true,
hasMoreCommits: true,
hasRunningWorkspaceExperiment: false,
hasValidDvcYaml: true,
isBranchesView: false,
isShowingMoreCommits: true,
rows: [
{
branch: 'current',
Expand All @@ -67,8 +56,7 @@ export const tableData: TableData = {
label: 'main'
}
],
selectedForPlotsCount: 0,
sorts: []
selectedForPlotsCount: 0
}

export const getHeaders = async () => {
Expand Down
Loading

0 comments on commit 4e8f538

Please sign in to comment.