-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add plots show command (with stub) #995
Conversation
extension/src/cli/reader.test.ts
Outdated
@@ -8,6 +8,7 @@ import { createProcess } from '../processExecution' | |||
import { getFailingMockedProcess, getMockedProcess } from '../test/util/jest' | |||
import { getProcessEnv } from '../env' | |||
import complexExperimentsOutput from '../test/fixtures/complex-output-example' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be renamed
|
||
const plots = await cliReader.plotsShow(cwd) | ||
expect(plots).toEqual(complexStaticPlots) | ||
expect(mockedCreateProcess).not.toBeCalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This second expect will fail when we remove the stub, we can then replace it with whats below
@@ -172,6 +182,11 @@ export class CliReader extends Cli { | |||
formatter: typeof trimAndSplit | typeof JSON.parse, | |||
...args: Args | |||
): Promise<T> { | |||
// Stubbed until DVC ready | |||
if (isEqual(args, ['plots', 'show', '--show-json'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This is a guess at what the command will actually be
2df8d38
to
6b4b10b
Compare
@@ -173,7 +175,7 @@ const data = { | |||
] | |||
} | |||
] | |||
}, | |||
} as VisualizationSpec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] Have to cast otherwise we get type errors
@@ -986,6 +986,7 @@ | |||
"@types/lodash.omit": "^4.5.6", | |||
"@types/mocha": "^8.2.0", | |||
"@types/node": "^14.14.22", | |||
"@types/react-vega": "^7.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] We need this for the contract
62010d6
to
f3392c0
Compare
6b4b10b
to
20a17eb
Compare
Code Climate has analyzed commit 625ff96 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.3% (0.0% change). View more on Code Climate. |
2/5
master
<- #1001 <- this <- #996 <- #998 <- #999This PR adds a stub for
plots show --show-json
which I use in the subsequent PRs to wire up the first iteration of displaying static plots in the new plots webview.In the final PR the stub is changed from the test fixture to
{}
so that we do not display any of the stubbed data to any users.There will no doubt be conflicts with
master
in #999 because of the work coming in from #1000. Happy to fix them after the fact 👍🏻 .