MCPcopy Create free account
hub / github.com/feast-dev/feast / get_ignore_files

Function get_ignore_files

sdk/python/feast/repo_operations.py:70–86  ·  view source on GitHub ↗

Get all ignore files that match any of the user-defined ignore paths

(repo_root: Path, ignore_paths: List[str])

Source from the content-addressed store, hash-verified

68
69
70def get_ignore_files(repo_root: Path, ignore_paths: List[str]) -> Set[Path]:
71 """Get all ignore files that match any of the user-defined ignore paths"""
72 ignore_files = set()
73 for ignore_path in set(ignore_paths):
74 # ignore_path may contains matchers (* or **). Use glob() to match user-defined path to actual paths
75 for matched_path in repo_root.glob(ignore_path):
76 if matched_path.is_file():
77 # If the matched path is a file, add that to ignore_files set
78 ignore_files.add(matched_path.resolve())
79 else:
80 # Otherwise, list all Python files in that directory and add all of them to ignore_files set
81 ignore_files |= {
82 sub_path.resolve()
83 for sub_path in matched_path.glob("**/*.py")
84 if sub_path.is_file()
85 }
86 return ignore_files
87
88
89def get_repo_files(repo_root: Path) -> List[Path]:

Callers 5

test_feastignore_no_fileFunction · 0.90
get_repo_filesFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by 4

test_feastignore_no_fileFunction · 0.72