Skip to content

Commit

Permalink
Merge branch 'main' into add-python-ext-ref-to-dvc-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 authored Jun 19, 2023
2 parents 3119616 + d5e7c48 commit b92216c
Show file tree
Hide file tree
Showing 23 changed files with 307 additions and 285 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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

## [1.0.7] - 2023-06-18

### 🐛 Bug Fixes

- Use regex to handle detached HEAD branch name in other languages [#4137](https://github.com/iterative/vscode-dvc/pull/4137) by [@mattseddon](https://github.com/mattseddon)

## [1.0.6] - 2023-06-16

### 🚀 New Features and Enhancements

- Switch experiment table radio buttons to plot icons [#4121](https://github.com/iterative/vscode-dvc/pull/4121) by [@mattseddon](https://github.com/mattseddon)

### 🔨 Maintenance

- Fix "Get Started" walkthrough typos and outdated mentions [#4118](https://github.com/iterative/vscode-dvc/pull/4118) by [@julieg18](https://github.com/julieg18)
- Update README with up to date information [#4126](https://github.com/iterative/vscode-dvc/pull/4126) by [@mattseddon](https://github.com/mattseddon)

## [1.0.5] - 2023-06-14

### 🐛 Bug Fixes
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ databases are required.

## Quick start

1. [Install DVC](https://dvc.org/doc/install) on your system.
2. Install [this extension] in VS Code.
3. Follow the steps set out on the [Setup](#useful-commands) page!
1. Install [this extension] in VS Code.
2. Follow the steps set out on the [Setup](#useful-commands) page!

<!-- prettier-ignore -->
> 💡 Feel free to try our [example DVC project] first! Opening it [with Github
> Codespaces] will include this extension automatically.
[this extension]:
https://marketplace.visualstudio.com/items?itemName=Iterative.dvc
[example dvc project]: https://github.com/iterative/example-get-started
[example dvc project]:
https://github.com/iterative/example-get-started-experiments
[with github codespaces]:
https://docs.github.com/en/codespaces/getting-started/quickstart#creating-your-codespace

Expand Down
8 changes: 4 additions & 4 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.5",
"version": "1.0.7",
"license": "Apache-2.0",
"readme": "./README.md",
"repository": {
Expand Down Expand Up @@ -1469,7 +1469,7 @@
},
{
"view": "dvc.views.welcome",
"contents": "The extension is currently unable to initialize.\n[Show Setup](command:dvc.showDvcSetup)\nNew to the extension? Watch a [demo of the extension](https://youtu.be/E26IaD7bNXg?t=1177) in action or quickly try the extension yourself with our [example project](https://github.com/iterative/example-dvc-experiments.git). Dive deeper into DVC at [dvc.org](https://dvc.org/).",
"contents": "The extension is currently unable to initialize.\n[Show Setup](command:dvc.showDvcSetup)\nNew to the extension? Watch a [demo of the extension](https://youtu.be/E26IaD7bNXg?t=1177) in action or quickly try the extension yourself with our [example project](https://github.com/iterative/example-get-started-experiments). Dive deeper into DVC at [dvc.org](https://dvc.org/).",
"when": "true"
},
{
Expand Down Expand Up @@ -1666,7 +1666,7 @@
"@types/node": "16.x",
"@types/react-vega": "7.0.0",
"@types/sinon-chai": "3.2.9",
"@types/uuid": "9.0.1",
"@types/uuid": "9.0.2",
"@types/vega": "3.2.0",
"@types/vscode": "1.64.0",
"@vscode/test-electron": "2.3.3",
Expand All @@ -1686,7 +1686,7 @@
"mocha": "10.2.0",
"mock-require": "3.0.3",
"shx": "0.3.4",
"sinon": "15.1.0",
"sinon": "15.1.2",
"sinon-chai": "3.7.0",
"ts-loader": "9.4.3",
"vscode-uri": "3.0.7",
Expand Down
6 changes: 3 additions & 3 deletions extension/resources/walkthrough/command-palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

> ℹ️ The extension's features cannot be accessed until DVC is installed and a
> DVC project is available in the workspace. Please refer to the
> [setup page](command:dvc.dvc.showDvcSetup) if you have not setup DVC yet.
> [setup page](command:dvc.showDvcSetup) if you have not setup DVC yet.
This extension makes extensive use of the
[Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
Which can be accessed via `F1` or ⇧⌃P on Windows/Linux or ⇧⌘P on macOS.
[Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette)
which can be accessed via `F1` or ⇧⌃P on Windows/Linux or ⇧⌘P on macOS.

To see a list of available commands click [here](command:dvc.showCommands) or
type DVC into the Command Palette.
Expand Down
2 changes: 1 addition & 1 deletion extension/resources/walkthrough/experiments-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Use `DVC: Show Experiments` from the
[Command Palette](command:workbench.action.quickOpen?%22>DVC:%20Show%20Experiments%22)
to open up the experiments table or access it.

The table provides context menus to access basic operation on experiments and
The table provides context menus to access basic operations on experiments and
table headers. You can edit parameters, sort or filter, run new experiments and
more:

Expand Down
2 changes: 1 addition & 1 deletion extension/resources/walkthrough/live-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:
</p>

This functionality comes baked in when you update your plots files in your
training code. For example like this, using the
training code. For examples like this, use the
[DVCLive](https://dvc.org/doc/dvclive) library that also
[supports](https://dvc.org/doc/dvclive/ml-frameworks) many popular ML frameworks
to automate this process:
Expand Down
4 changes: 2 additions & 2 deletions extension/resources/walkthrough/more-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- Browse all available [`dvc` commands] and [Python API] functions.

- Take our [free course] and become a certified in Iterative.ai tools!
- Take our [free course] and become certified in Iterative.ai tools!

- Play with a ready-to-use [example project].

Expand All @@ -30,7 +30,7 @@
[python api]: https://dvc.org/doc/api-reference
[free course]: https://learn.iterative.ai/
[contribute]: https://dvc.org/doc/contributing/core
[example project]: https://github.com/iterative/example-get-started
[example project]: https://github.com/iterative/example-get-started-experiments
[blog]: https://dvc.org/blog
[community]: https://dvc.org/community
[dvc github repository]: https://github.com/iterative/dvc
Expand Down
7 changes: 4 additions & 3 deletions extension/resources/walkthrough/plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,17 @@ rendered side by side for the selected experiments.
alt="Plots: Custom" />
</p>

**Custom** plots compare a chosen [metric] and param across experiments.
**Custom** plots compare a chosen [metric] and [param] across experiments.

[metric]: https://dvc.org/doc/command-reference/metrics
[param]: https://dvc.org/doc/command-reference/params

<p align="center">
<img src="images/plots-view-icon.png"
alt="Plots View Icon" />
</p>

The **Plots Dashboard** can be configured and accessed from the _Plots_ and
_Experiments_ side panels in the [**DVC View**](command:views.dvc-views).
The **Plots Dashboard** can be configured and accessed from the _Plots_ side
panel in the [**DVC View**](command:views.dvc-views).

> This is equivalent to the [`dvc plots show`] and [`dvc plots diff`] commands.
7 changes: 4 additions & 3 deletions extension/resources/walkthrough/run-experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
You edit your code, edit or add more data, applying a new combination of
hyperparameters- you have a new idea to try 💡!

This extension provides many different ways to run a new experiment or queue one
to be run later in the background or in parallel. This functionality wraps up
the [`dvc exp run`](https://dvc.org/doc/command-reference/exp/run) command.
This extension provides many different ways to run a new experiment. You can
also queue one to be run later in the background or in parallel. This
functionality wraps up the
[`dvc exp run`](https://dvc.org/doc/command-reference/exp/run) command.

The basic one is the set of buttons that are available when the experiments
table or parameters file are open:
Expand Down
7 changes: 4 additions & 3 deletions extension/resources/walkthrough/view-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ project available in the workspace:
> [GitHub](https://github.com/iterative/vscode-dvc/issues). We are happy to
> help.
If DVC and the extension are initialized, side bar will expose multiple views:
If DVC and the extension are initialized, the side bar will expose multiple
views:

<p align="center">
<img src="images/view-container.png"
Expand All @@ -36,6 +37,6 @@ If DVC and the extension are initialized, side bar will expose multiple views:
columns.
- `PLOTS`. Used to fine-tune the plots dashboard, e.g. by toggling plots
visibility.
- `FILTER BY`. Used to view, add, or remove metrics and parameters filters.
- `FILTER BY`. Used to view, add, or remove metrics/parameters filters. These
will hide specific experiments in the table.
- `SORT BY`. Used to display and configure how the experiments table is sorted.
These will hide specific experiments in the table.
14 changes: 13 additions & 1 deletion extension/src/util/stdout.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { trimAndSplit } from './stdout'
import { cleanUpBranchName, trimAndSplit } from './stdout'

describe('trimAndSplit', () => {
it('should return an empty array given an empty string', () => {
Expand All @@ -13,3 +13,15 @@ describe('trimAndSplit', () => {
expect(trimAndSplit('a\nb\nc\n')).toStrictEqual(['a', 'b', 'c'])
})
})

describe('cleanUpBranchName', () => {
it('should clean up a detached head message in English', () => {
const branchName = '(HEAD detached at 786cfcd)'
expect(cleanUpBranchName(branchName)).toStrictEqual('786cfcd')
})

it('should clean up a detached head message in Spanish', () => {
const branchName = '(HEAD desacoplado en 786cfcd)'
expect(cleanUpBranchName(branchName)).toStrictEqual('786cfcd')
})
})
5 changes: 4 additions & 1 deletion extension/src/util/stdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ export const trimAndSplit = (stdout: string): string[] =>
.filter(Boolean)

export const cleanUpBranchName = (branch: string) =>
branch.replace('* ', '').replace('(HEAD detached at ', '').replace(')', '')
branch
.replace('* ', '')
.replace(/\(HEAD\s\w+\s\w+\s/, '')
.replace(')', '')
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
"svgr": "yarn workspace dvc-vscode-webview svgr"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"@typescript-eslint/eslint-plugin": "5.59.11",
"@typescript-eslint/parser": "5.59.11",
"@vscode/codicons": "0.0.33",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"eslint-config-prettier-standard": "4.0.1",
"eslint-config-standard": "17.1.0",
"eslint-plugin-check-file": "2.3.0",
"eslint-plugin-check-file": "2.4.0",
"eslint-plugin-etc": "2.0.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.1",
Expand All @@ -67,17 +67,17 @@
"stylelint": "15.7.0",
"stylelint-config-standard-scss": "9.0.0",
"ts-node": "10.9.1",
"turbo": "1.10.2",
"turbo": "1.10.3",
"typescript": "5.1.3"
},
"resolutions": {
"decode-uri-component": "0.2.2",
"@types/react": "18.2.9",
"@types/react": "18.2.12",
"**/recursive-readdir/minimatch": "6.2.0",
"fastify": "3.29.5",
"json5": "2.2.3",
"loader-utils": "2.0.4",
"terser": "5.17.7",
"terser": "5.18.0",
"trim-newlines": "3.0.1",
"trim": "1.0.1"
},
Expand Down
12 changes: 6 additions & 6 deletions webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@reduxjs/toolkit": "1.9.5",
"@tanstack/react-table": "8.9.1",
"@tanstack/react-table": "8.9.2",
"@tippyjs/react": "4.2.6",
"@vscode/webview-ui-toolkit": "1.2.2",
"classnames": "2.3.2",
Expand Down Expand Up @@ -58,8 +58,8 @@
"@types/jest": "29.5.2",
"@types/jsdom": "21.1.1",
"@types/node": "16.x",
"@types/react": "18.2.9",
"@types/react-dom": "18.2.4",
"@types/react": "18.2.12",
"@types/react-dom": "18.2.5",
"@types/react-measure": "2.0.8",
"@types/react-virtualized": "9.21.22",
"@types/webpack": "5.28.1",
Expand All @@ -74,14 +74,14 @@
"jest-environment-jsdom": "29.5.0",
"lint-staged": "13.2.2",
"raw-loader": "4.0.2",
"sass": "1.63.2",
"sass-loader": "13.3.1",
"sass": "1.63.3",
"sass-loader": "13.3.2",
"storybook": "7.0.20",
"storybook-addon-themes": "6.1.0",
"style-loader": "3.3.3",
"ts-loader": "9.4.3",
"webpack": "5.86.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.0"
"webpack-dev-server": "4.15.1"
}
}
8 changes: 4 additions & 4 deletions webview/src/experiments/components/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ describe('App', () => {

expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()

const radioButton = within(getRow(EXPERIMENT_WORKSPACE_ID)).getByTestId(
const plotIcon = within(getRow(EXPERIMENT_WORKSPACE_ID)).getByTestId(
'row-action-plot'
)
fireEvent.mouseEnter(radioButton)
fireEvent.mouseEnter(plotIcon)

advanceTimersByTime(NORMAL_TOOLTIP_DELAY[0])
const tooltip = screen.queryByRole('tooltip')
Expand All @@ -692,8 +692,8 @@ describe('App', () => {

expect(screen.queryByRole('tooltip')).not.toBeInTheDocument()

const radioButton = within(getRow('main')).getByTestId('row-action-star')
fireEvent.mouseEnter(radioButton)
const starIcon = within(getRow('main')).getByTestId('row-action-star')
fireEvent.mouseEnter(starIcon)

advanceTimersByTime(NORMAL_TOOLTIP_DELAY[0])
const tooltip = screen.queryByRole('tooltip')
Expand Down
8 changes: 8 additions & 0 deletions webview/src/experiments/components/table/body/Cell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { flexRender } from '@tanstack/react-table'
import React, { ReactNode } from 'react'
import { VSCodeProgressRing } from '@vscode/webview-ui-toolkit/react'
import cx from 'classnames'
import { isRunning } from 'dvc/src/experiments/webview/contract'
import { CellRowActionsProps, CellRowActions } from './CellRowActions'
import styles from '../styles.module.scss'
import { CellValue, isValueWithChanges } from '../content/Cell'
Expand Down Expand Up @@ -59,6 +61,12 @@ export const FirstCell: React.FC<
<div className={styles.innerCell} style={{ width: getSize() }}>
<CellRowActions status={status} {...rowActionsProps} />
<RowExpansionButton row={row} />
{isRunning(status) && (
<VSCodeProgressRing
className={cx(styles.running, 'chromatic-ignore')}
/>
)}

{getIsPlaceholder() ? null : (
<ErrorTooltip error={error}>
<div
Expand Down
Loading

0 comments on commit b92216c

Please sign in to comment.