mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 07:18:31 +01:00
plots/metrics/params/experiments show: stop throwing exceptions (#5984)
* params/metrics/plots/exp show: introduce onerror * fixup * plots/metrics/params: removing errors * removing more errors * removing errors * some more removing * new plots ux * new ux for metrics * new ux for params * fixing tests * fixups * minor test fixes * minor test fixes * commands: plots/params: fix ui imports * working on error handlng decorator, stopped at show checkpoints * error_handler, further dvelopment * plots just before moving loading to collect * appending errors to results: initial passing * fixup * onerror: remove onerror fixture * fixups * plots/metrics/params/experiments: temporarily remove error warnings * plots: extract parsing out of class method * metrics/experiments: provide exception serializer for show-json * params/plots/metrics: signal errors * rebase fixups * fix TODOs * fixup * skshetry's review refactor
This commit is contained in:
@@ -75,8 +75,8 @@ def test_experiments_show(dvc, scm, mocker):
|
||||
assert cli_args.func == CmdExperimentsShow
|
||||
|
||||
cmd = cli_args.func(cli_args)
|
||||
m = mocker.patch("dvc.repo.experiments.show.show", return_value={})
|
||||
|
||||
m = mocker.patch("dvc.repo.experiments.show.show", return_value={})
|
||||
assert cmd.run() == 0
|
||||
|
||||
m.assert_called_once_with(
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_live_diff(dvc, mocker):
|
||||
cmd = cli_args.func(cli_args)
|
||||
m = mocker.patch("dvc.repo.live.Live.show", return_value=({}, {}))
|
||||
|
||||
assert cmd.run() == 0
|
||||
assert cmd.run() == 1
|
||||
|
||||
m.assert_called_once_with(target="target", revs=["HEAD", "rev1"])
|
||||
|
||||
@@ -35,6 +35,6 @@ def test_live_show(dvc, mocker):
|
||||
|
||||
m = mocker.patch("dvc.repo.live.Live.show", return_value=({}, {}))
|
||||
|
||||
assert cmd.run() == 0
|
||||
assert cmd.run() == 1
|
||||
|
||||
m.assert_called_once_with(target="datafile", revs=None)
|
||||
|
||||
@@ -48,7 +48,12 @@ def test_params_diff_from_cli(dvc, mocker):
|
||||
assert cmd.run() == 0
|
||||
|
||||
params_diff.assert_called_once_with(
|
||||
cmd.repo, a_rev=None, b_rev=None, all=False, targets=None, deps=False
|
||||
cmd.repo,
|
||||
a_rev=None,
|
||||
b_rev=None,
|
||||
all=False,
|
||||
targets=None,
|
||||
deps=False,
|
||||
)
|
||||
show_diff_mock.assert_called_once_with(
|
||||
{}, title="Param", markdown=False, no_path=False, show_changes=False
|
||||
|
||||
@@ -86,7 +86,8 @@ def test_plots_show_vega(dvc, mocker):
|
||||
assert cmd.run() == 0
|
||||
|
||||
m.assert_called_once_with(
|
||||
targets=["datafile"], props={"template": "template", "header": False}
|
||||
targets=["datafile"],
|
||||
props={"template": "template", "header": False},
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user