Skip to content

Commit

Permalink
feat: Ignore paths feast apply (feast-dev#4276)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscojavierarceo authored Jun 18, 2024
1 parent 83fad15 commit b4d54af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def get_repo_files(repo_root: Path) -> List[Path]:
# 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 += [
".git",
".feastignore",
".venv",
".pytest_cache",
"__pycache__",
".ipynb_checkpoints",
]

# List all Python files in the root directory (recursively)
repo_files = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ def feature_repo(feastignore_contents: Optional[str]):
repo_root = Path(tmp_dir)
(repo_root / "foo").mkdir()
(repo_root / "foo1").mkdir()
(repo_root / ".ipynb_checkpoints/").mkdir()
(repo_root / "foo1/bar").mkdir()
(repo_root / "bar").mkdir()
(repo_root / "bar/subdir1").mkdir()
(repo_root / "bar/subdir1/subdir2").mkdir()

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

0 comments on commit b4d54af

Please sign in to comment.