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

Replace vary with modify in variable names #2227

Merged
merged 1 commit into from
Aug 22, 2022
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: 3 additions & 3 deletions extension/src/experiments/webview/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ export class WebviewMessages {
RegisteredCliCommands.EXPERIMENT_VIEW_BRANCH,
{ dvcRoot: this.dvcRoot, id: message.payload }
)
case MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_QUEUE:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] VARY is left over from a previous naming convention

case MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_QUEUE:
return commands.executeCommand(
RegisteredCliCommands.EXPERIMENT_VIEW_QUEUE,
{ dvcRoot: this.dvcRoot, id: message.payload }
)
case MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN:
case MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_RUN:
return commands.executeCommand(
RegisteredCliCommands.EXPERIMENT_VIEW_RUN,
{ dvcRoot: this.dvcRoot, id: message.payload }
)
case MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_RESET_AND_RUN:
case MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_RESET_AND_RUN:
return commands.executeCommand(
RegisteredCliCommands.EXPERIMENT_VIEW_RESET_AND_RUN,
{ dvcRoot: this.dvcRoot, id: message.payload }
Expand Down
6 changes: 3 additions & 3 deletions extension/src/test/suite/experiments/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ suite('Experiments Test Suite', () => {

mockMessageReceived.fire({
payload: mockExperimentId,
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_QUEUE
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_QUEUE
})

await tableChangePromise
Expand Down Expand Up @@ -606,7 +606,7 @@ suite('Experiments Test Suite', () => {

mockMessageReceived.fire({
payload: mockExperimentId,
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_RUN
})

await tableChangePromise
Expand Down Expand Up @@ -648,7 +648,7 @@ suite('Experiments Test Suite', () => {

mockMessageReceived.fire({
payload: mockExperimentId,
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_RESET_AND_RUN
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_RESET_AND_RUN
})

await tableChangePromise
Expand Down
12 changes: 6 additions & 6 deletions extension/src/webview/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export enum MessageFromWebviewType {
SHARE_EXPERIMENT_AS_BRANCH = 'share-experiment-as-branch',
TOGGLE_METRIC = 'toggle-metric',
TOGGLE_PLOTS_SECTION = 'toggle-plots-section',
VARY_EXPERIMENT_PARAMS_AND_QUEUE = 'vary-experiment-params-and-queue',
VARY_EXPERIMENT_PARAMS_AND_RUN = 'vary-experiment-params-and-run',
VARY_EXPERIMENT_PARAMS_RESET_AND_RUN = 'vary-experiment-params-reset-and-run'
MODIFY_EXPERIMENT_PARAMS_AND_QUEUE = 'modify-experiment-params-and-queue',
MODIFY_EXPERIMENT_PARAMS_AND_RUN = 'modify-experiment-params-and-run',
MODIFY_EXPERIMENT_PARAMS_RESET_AND_RUN = 'modify-experiment-params-reset-and-run'
}

export type ColumnResizePayload = {
Expand Down Expand Up @@ -91,15 +91,15 @@ export type MessageFromWebview =
payload: string
}
| {
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_QUEUE
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_QUEUE
payload: string
}
| {
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_RUN
payload: string
}
| {
type: MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_RESET_AND_RUN
type: MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_RESET_AND_RUN
payload: string
}
| {
Expand Down
6 changes: 3 additions & 3 deletions webview/src/experiments/components/table/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,19 @@ const getRunResumeOptions = (
return [
withId(
'Modify, Reset and Run',
MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_RESET_AND_RUN,
MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_RESET_AND_RUN,
isCheckpoint || !projectHasCheckpoints,
resetNeedsSeparator
),
withId(
projectHasCheckpoints ? 'Modify and Resume' : 'Modify and Run',
MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN,
MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_RUN,
isCheckpoint,
runNeedsSeparator
),
withId(
'Modify and Queue',
MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_QUEUE,
MessageFromWebviewType.MODIFY_EXPERIMENT_PARAMS_AND_QUEUE,
isCheckpoint
)
]
Expand Down