Skip to content

Commit

Permalink
Merge branch 'main' into allow-multi-file-select-on-plot-wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 authored Oct 5, 2023
2 parents bd3e211 + c6e227c commit a651084
Show file tree
Hide file tree
Showing 19 changed files with 570 additions and 264 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,25 @@ jobs:

- run: yarn run lint

- uses: paambaati/codeclimate-action@v5.0.0
- name: Run Coverage Report
if: '!github.event.pull_request.head.repo.fork'
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: xvfb-run -a yarn run cover
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov

- run: yarn build-storybook
- name: Run Fork Coverage
if: 'github.event.pull_request.head.repo.fork'
run: xvfb-run -a yarn run cover

- name: Build Storybook
if: '!github.event.pull_request.head.repo.fork'
run: yarn build-storybook

- name: Publish to Chromatic
if: '!github.event.pull_request.head.repo.fork'
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file.

## [1.1.0] - 2023-10-02

### 🚀 New Features and Enhancements

- Flatten table on sort [#4685](https://github.com/iterative/vscode-dvc/pull/4685) by [@julieg18](https://github.com/julieg18)

### 🐛 Bug Fixes

- Ensure custom plots legend matches plot values [#4729](https://github.com/iterative/vscode-dvc/pull/4729) by [@julieg18](https://github.com/julieg18)

### 🔨 Maintenance

- Update demo project and latest tested CLI version (3.23.0) [#4736](https://github.com/iterative/vscode-dvc/pull/4736) by [@julieg18](https://github.com/julieg18)

## [1.0.58] - 2023-09-27

### 🚀 New Features and Enhancements
Expand Down
2 changes: 1 addition & 1 deletion demo
Submodule demo updated 1 files
+1 −1 requirements.txt
12 changes: 6 additions & 6 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"extensionDependencies": [
"vscode.git"
],
"version": "1.0.58",
"version": "1.1.0",
"license": "Apache-2.0",
"readme": "./README.md",
"repository": {
Expand Down Expand Up @@ -1723,11 +1723,11 @@
"tree-kill": "1.2.2",
"uuid": "9.0.1",
"vega-util": "1.17.2",
"vscode-languageclient": "9.0.0",
"vscode-languageclient": "9.0.1",
"yaml": "2.3.2"
},
"devDependencies": {
"@swc/core": "1.3.88",
"@swc/core": "1.3.90",
"@swc/jest": "0.2.29",
"@types/chai": "4.3.6",
"@types/chai-as-promised": "7.1.6",
Expand All @@ -1740,11 +1740,11 @@
"@types/lodash.isequal": "4.5.6",
"@types/lodash.merge": "4.6.7",
"@types/lodash.omit": "4.5.7",
"@types/mocha": "10.0.1",
"@types/mocha": "10.0.2",
"@types/mock-require": "2.0.1",
"@types/node": "16.x",
"@types/react-vega": "7.0.0",
"@types/sinon-chai": "3.2.9",
"@types/sinon-chai": "3.2.10",
"@types/uuid": "9.0.4",
"@types/vega": "3.2.0",
"@types/vscode": "1.64.0",
Expand All @@ -1754,7 +1754,7 @@
"@wdio/local-runner": "8.16.7",
"@wdio/mocha-framework": "8.16.7",
"@wdio/spec-reporter": "8.16.7",
"chai": "4.3.8",
"chai": "4.3.9",
"chai-as-promised": "7.1.1",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
Expand Down
2 changes: 1 addition & 1 deletion extension/src/cli/dvc/contract.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Plot } from '../../plots/webview/contract'

export const MIN_CLI_VERSION = '2.58.1'
export const LATEST_TESTED_CLI_VERSION = '3.23.0'
export const LATEST_TESTED_CLI_VERSION = '3.24.0'

export const PLOT_TEMPLATES = [
'simple',
Expand Down
6 changes: 6 additions & 0 deletions extension/src/experiments/model/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ describe('ExperimentsModel', () => {
[{ branch: 'main', sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77' }],
{ main: 10 }
)

model.addSort({
path: 'params:params.yaml:nested1.doubled',
descending: true
})

expect(model.getRowData()).toStrictEqual(
expect.objectContaining(deeplyNestedRowsFixture)
)
Expand Down
19 changes: 13 additions & 6 deletions extension/src/experiments/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,21 +858,28 @@ export class ExperimentsModel extends ModelWithPersistence {
}

private getFlattenedRowData(workspaceRow: Commit): Commit[] {
const branchesBySha: { [sha: string]: string[] } = {}
for (const { branch, sha } of this.rowOrder) {
if (!branchesBySha[sha]) {
branchesBySha[sha] = []
}
branchesBySha[sha].push(branch)
}

const commitsBySha: { [sha: string]: Commit[] } =
this.applyFiltersToFlattenedCommits()
const rows = []
const rows: Commit[] = []
for (const [sha, commitAndExps] of Object.entries(commitsBySha)) {
const flatBranches = branchesBySha[sha]

for (const { branch, sha } of this.rowOrder) {
const commitsAndExps = commitsBySha[sha]
if (!commitsAndExps) {
if (!flatBranches) {
continue
}

rows.push(
...commitsAndExps.map(commitOrExp => ({ ...commitOrExp, branch }))
...commitAndExps.map(commitOrExp => ({ ...commitOrExp, flatBranches }))
)
}

return [workspaceRow, ...sortExperiments(this.getSorts(), rows)]
}
}
1 change: 1 addition & 0 deletions extension/src/experiments/webview/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export type Experiment = {
executorStatus?: ExecutorStatus
timestamp?: string | null
branch?: string | typeof WORKSPACE_BRANCH
flatBranches?: string[]
baselineSha?: string | undefined
studioLinkType?: StudioLinkType
}
Expand Down
2 changes: 1 addition & 1 deletion extension/src/test/fixtures/expShow/deeplyNested/rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export const data = [
starred: false
},
{
branch: 'main',
id: 'main',
label: 'main',
Created: '2020-11-21T19:58:22',
flatBranches: ['main'],
sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
params: {
'params.yaml': {
Expand Down
108 changes: 93 additions & 15 deletions extension/src/test/fixtures/expShow/sorted/rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,84 @@ const rowsFixture: Commit[] = [
starred: false
},
{
branch: 'main',
commit: {
author: 'Julie G',
date: '5 days ago',
message: 'Drop checkpoint: true (#74)\n\n',
tags: []
},
description: 'Drop checkpoint: true (#74)\n\n',
displayColor: undefined,
flatBranches: ['main'],
id: 'fe2919b',
label: 'fe2919b',
metrics: {
'summary.json': {
loss: 2.048856019973755,
accuracy: 0.3484833240509033,
val_loss: 1.9979369640350342,
val_accuracy: 0.4277999997138977
}
},
params: {
'params.yaml': {
code_names: [0, 1],
epochs: 10,
learning_rate: 2.1e-7,
dvc_logs_dir: 'dvc_logs',
log_file: 'logs.csv',
dropout: 0.122,
process: { threshold: 0.86, test_arg: 'string' }
},
[join('nested', 'params.yaml')]: {
test: true
}
},
selected: false,
sha: 'fe2919bb4394b30494bea905c253e10077b9a1bd',
starred: false,
Created: '2020-11-16T19:58:22'
},
{
commit: {
author: 'Matt Seddon',
date: '3 days ago',
message: 'Update dependency dvclive to v2.6.4 (#75)\n\n',
tags: []
},
description: 'Update dependency dvclive to v2.6.4 (#75)\n\n',
displayColor: undefined,
flatBranches: ['main'],
id: '7df876c',
label: '7df876c',
metrics: {
'summary.json': {
loss: 2.048856019973755,
accuracy: 0.3484833240509033,
val_loss: 1.9979369640350342,
val_accuracy: 0.4277999997138977
}
},
params: {
'params.yaml': {
code_names: [0, 1],
epochs: 7,
learning_rate: 2.1e-7,
dvc_logs_dir: 'dvc_logs',
log_file: 'logs.csv',
dropout: 0.122,
process: { threshold: 0.86, test_arg: 'string' }
},
[join('nested', 'params.yaml')]: {
test: true
}
},
selected: false,
sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
starred: false,
Created: '2020-11-18T19:58:22'
},
{
commit: {
author: 'github-actions[bot]',
date: '6 hours ago',
Expand All @@ -57,6 +134,7 @@ const rowsFixture: Commit[] = [
},
description: 'Update version and CHANGELOG for release (#4022) ...',
displayColor: undefined,
flatBranches: ['main'],
id: 'main',
label: 'main',
metrics: {
Expand Down Expand Up @@ -87,11 +165,11 @@ const rowsFixture: Commit[] = [
Created: '2020-11-21T19:58:22'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
description: '[exp-83425]',
executor: Executor.WORKSPACE,
flatBranches: ['main'],
id: 'exp-83425',
label: EXPERIMENT_WORKSPACE_ID,
metrics: {
Expand Down Expand Up @@ -122,12 +200,12 @@ const rowsFixture: Commit[] = [
Created: '2020-12-29T15:27:02'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
description: '[exp-f13bca]',
id: 'exp-f13bca',
error: "unable to read: 'summary.json', JSON file structure is corrupted",
flatBranches: ['main'],
label: 'f0f9186',
metrics: {},
params: {
Expand All @@ -151,10 +229,10 @@ const rowsFixture: Commit[] = [
Created: '2020-12-29T15:26:36'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
error: 'Experiment run failed.',
flatBranches: ['main'],
id: '55d492c',
label: '55d492c',
metrics: {},
Expand All @@ -179,7 +257,6 @@ const rowsFixture: Commit[] = [
Created: '2020-12-29T15:25:27'
},
{
branch: 'main',
commit: {
author: 'Julie G',
date: '6 hours ago',
Expand All @@ -189,8 +266,9 @@ const rowsFixture: Commit[] = [
},
description: 'Improve "Get Started" walkthrough (#4020) ...',
displayColor: undefined,
id: 'fe2919b',
label: 'fe2919b',
flatBranches: ['main', 'other-branch'],
id: 'other-branch',
label: 'other-branch',
metrics: {
'summary.json': {
loss: 2.048856019973755,
Expand All @@ -214,12 +292,11 @@ const rowsFixture: Commit[] = [
}
},
selected: false,
sha: 'fe2919bb4394b30494bea905c253e10077b9a1bd',
sha: '90aea7f2482117a55dfcadcdb901aaa6610fbbc9',
starred: false,
Created: '2020-11-21T19:58:22'
},
{
branch: 'main',
commit: {
author: 'Matt Seddon',
date: '8 hours ago',
Expand All @@ -230,8 +307,9 @@ const rowsFixture: Commit[] = [
description:
'Add capabilities to text mentioning storage provider extensions (#4015)',
displayColor: undefined,
id: '7df876c',
label: '7df876c',
flatBranches: ['main', 'other-branch', 'another-branch'],
id: 'another-branch',
label: 'another-branch',
metrics: {
'summary.json': {
loss: 2.048856019973755,
Expand All @@ -255,16 +333,16 @@ const rowsFixture: Commit[] = [
}
},
selected: false,
sha: '7df876cb5147800cd3e489d563bc6dcd67188621',
sha: '55d492c9c633912685351b32df91bfe1f9ecefb9',
starred: false,
Created: '2020-11-21T19:58:22'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
description: '[exp-e7a67]',
executor: Executor.DVC_TASK,
flatBranches: ['main'],
id: 'exp-e7a67',
label: '4fb124a',
metrics: {
Expand Down Expand Up @@ -296,10 +374,10 @@ const rowsFixture: Commit[] = [
Created: '2020-12-29T15:31:52'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
description: '[test-branch]',
flatBranches: ['main'],
id: 'test-branch',
label: '42b8736',
metrics: {
Expand Down Expand Up @@ -332,9 +410,9 @@ const rowsFixture: Commit[] = [
Created: '2020-12-29T15:28:59'
},
{
branch: 'main',
baselineSha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
displayColor: undefined,
flatBranches: ['main'],
id: '489fd8b',
sha: '489fd8bdaa709f7330aac342e051a9431c625481',
label: '489fd8b',
Expand Down
Loading

0 comments on commit a651084

Please sign in to comment.