def check_dvc_filename(path): if not is_valid_filename(path): raise StageFileBadNameError( "bad DVC-file name '{}'. DVC-files should be named " "'Dvcfile' or have a '.dvc' suffix (e.g. '{}.dvc').".format( relpath(path), os.path.basename(path) ) )
def check_dvcfile_path(repo, path): if not is_valid_filename(path): raise StageFileBadNameError( "bad DVC file name '{}'. DVC files should be named " "'{}' or have a '.dvc' suffix (e.g. '{}.dvc').".format( relpath(path), PIPELINE_FILE, os.path.basename(path))) if is_git_ignored(repo, path): raise FileIsGitIgnored(relpath(path), True)