mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
merge plot ids across dvc.yaml files
This commit is contained in:
committed by
Dave Berenbaum
parent
d81a1bbf56
commit
7e7d0e1dd8
@@ -426,5 +426,5 @@ def test_show_plots_defined_with_native_os_path(tmp_dir, dvc, scm, capsys):
|
||||
assert "errors" not in json_out
|
||||
|
||||
json_data = json_out["data"]
|
||||
assert json_data[f"dvc.yaml::{top_level_plot}"]
|
||||
assert json_data[f"{top_level_plot}"]
|
||||
assert json_data[stage_plot]
|
||||
|
||||
@@ -440,8 +440,8 @@ def test_repo_with_config_plots(tmp_dir, capsys, repo_with_config_plots):
|
||||
html_result = extract_vega_specs(
|
||||
html_path,
|
||||
[
|
||||
"dvc.yaml::linear_train_vs_test",
|
||||
"dvc.yaml::confusion_train_vs_test",
|
||||
"linear_train_vs_test",
|
||||
"confusion_train_vs_test",
|
||||
],
|
||||
)
|
||||
ble = _update_datapoints(
|
||||
@@ -456,5 +456,5 @@ def test_repo_with_config_plots(tmp_dir, capsys, repo_with_config_plots):
|
||||
},
|
||||
)
|
||||
|
||||
assert html_result["dvc.yaml::linear_train_vs_test"]["data"]["values"] == ble
|
||||
assert html_result["linear_train_vs_test"]["data"]["values"] == ble
|
||||
# TODO check json results once vscode is able to handle flexible plots
|
||||
|
||||
@@ -29,9 +29,9 @@ def test_group_definitions():
|
||||
grouped = PlotsData(data).group_definitions()
|
||||
|
||||
assert grouped == {
|
||||
"config_file_1::plot_id_1": [("v1", "plot_id_1", {})],
|
||||
"config_file_1::plot_id_2": [("v1", "plot_id_2", {})],
|
||||
"config_file_2::plot_id_3": [
|
||||
"plot_id_1": [("v1", "plot_id_1", {})],
|
||||
"plot_id_2": [("v1", "plot_id_2", {})],
|
||||
"plot_id_3": [
|
||||
("v1", "plot_id_3", {}),
|
||||
("v2", "plot_id_3", {}),
|
||||
],
|
||||
@@ -103,7 +103,7 @@ def test_match_renderers(M):
|
||||
},
|
||||
]
|
||||
assert renderer.properties == {
|
||||
"title": "config_file_1::plot_id_1",
|
||||
"title": "plot_id_1",
|
||||
"x": "x",
|
||||
"y": "y",
|
||||
"x_label": "x",
|
||||
|
||||
Reference in New Issue
Block a user