Exemple #1
0
def _to_path_infos(metrics: List[BaseOutput]) -> List[PathInfo]:
    result = []
    for out in metrics:
        if out.metric:
            result.append(out.path_info)
        elif out.live:
            path_info = summary_path_info(out)
            if path_info:
                result.append(path_info)
    return result
Exemple #2
0
def _track_stage(stage):
    stage.repo.scm.track_file(stage.dvcfile.relpath)
    for dep in stage.deps:
        if not dep.use_scm_ignore and dep.is_in_repo:
            stage.repo.scm.track_file(relpath(dep.path_info))
    for out in stage.outs:
        if not out.use_scm_ignore and out.is_in_repo:
            stage.repo.scm.track_file(relpath(out.path_info))
            if out.live:
                from dvc.repo.live import summary_path_info

                summary = summary_path_info(out)
                if summary:
                    stage.repo.scm.track_file(relpath(summary))
    stage.repo.scm.track_changed_files()