mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
add index._plot_sources
This commit is contained in:
committed by
skshetry
parent
dc3d9c9677
commit
0467f6a036
@@ -89,6 +89,21 @@ class Index:
|
||||
self._collect()
|
||||
return self._plots
|
||||
|
||||
@cached_property
|
||||
def _plot_sources(self):
|
||||
from dvc.repo.plots import _collect_pipeline_files
|
||||
|
||||
sources = []
|
||||
for data in _collect_pipeline_files(self.repo, [], {}).values():
|
||||
for plot_id, props in data.get("data", {}).items():
|
||||
if isinstance(props.get("y"), dict):
|
||||
sources.extend(props["y"])
|
||||
if isinstance(props.get("x"), dict):
|
||||
sources.extend(props["x"])
|
||||
else:
|
||||
sources.append(plot_id)
|
||||
return sources
|
||||
|
||||
@cached_property
|
||||
def _top_params(self):
|
||||
self._collect()
|
||||
|
||||
Reference in New Issue
Block a user