MCPcopy
hub / github.com/treeverse/dvc / check_dvcfile_path

Function check_dvcfile_path

dvc/dvcfile.py:68–77  ·  view source on GitHub ↗
(repo, path)

Source from the content-addressed store, hash-verified

66
67
68def check_dvcfile_path(repo, path):
69 if not is_valid_filename(path):
70 raise StageFileBadNameError(
71 f"bad DVC file name '{relpath(path)}'. DVC files should be named "
72 f"'{PROJECT_FILE}' or have a '.dvc' suffix "
73 f"(e.g. '{os.path.basename(path)}.dvc')."
74 )
75
76 if is_git_ignored(repo, path):
77 raise FileIsGitIgnored(relpath(path), True)
78
79
80class FileMixin:

Callers 4

create_stageFunction · 0.90
_verify_filenameMethod · 0.85
dumpMethod · 0.85
dump_stagesMethod · 0.85

Calls 5

relpathFunction · 0.90
is_valid_filenameFunction · 0.85
is_git_ignoredFunction · 0.85
FileIsGitIgnoredClass · 0.85

Tested by

no test coverage detected