FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: The ignore_paths not taking effect duration feast apply by joeyutong · Pull Request #5353 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 3 additions & 4 deletions sdk/python/feast/repo_operations.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def read_feastignore(repo_root: Path) -> List[str]:
def get_ignore_files(repo_root: Path, ignore_paths: List[str]) -> Set[Path]:
"""Get all ignore files that match any of the user-defined ignore paths"""
ignore_files = set()
for ignore_path in ignore_paths:
for ignore_path in set(ignore_paths):
# ignore_path may contains matchers (* or **). Use glob() to match user-defined path to actual paths
for matched_path in repo_root.glob(ignore_path):
if matched_path.is_file():
Expand All @@ -88,16 +88,15 @@ def get_ignore_files(repo_root: Path, ignore_paths: List[str]) -> Set[Path]:
def get_repo_files(repo_root: Path) -> List[Path]:
"""Get the list of all repo files, ignoring undesired files & directories specified in .feastignore"""
# Read ignore paths from .feastignore and create a set of all files that match any of these paths
ignore_paths = read_feastignore(repo_root)
ignore_files = get_ignore_files(repo_root, ignore_paths)
ignore_paths += [
ignore_paths = read_feastignore(repo_root) + [
".git",
".feastignore",
".venv",
".pytest_cache",
"__pycache__",
".ipynb_checkpoints",
]
ignore_files = get_ignore_files(repo_root, ignore_paths)

# List all Python files in the root directory (recursively)
repo_files = {
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def feature_repo(feastignore_contents: Optional[str]):
(repo_root / "bar/subdir1/subdir2").mkdir()

(repo_root / "a.py").touch()
(repo_root / ".ipynb_checkpoints/test-checkpoint.ipynb").touch()
(repo_root / ".ipynb_checkpoints/test-checkpoint.py").touch()
(repo_root / "foo/b.py").touch()
(repo_root / "foo1/c.py").touch()
(repo_root / "foo1/bar/d.py").touch()
Expand Down

Back | FazBrowse Home | New Git URL