Skip to content

Commit b4d54af

Browse files
feat: Ignore paths feast apply (feast-dev#4276)
1 parent 83fad15 commit b4d54af

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sdk/python/feast/repo_operations.py

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ def get_repo_files(repo_root: Path) -> List[Path]:
8383
# Read ignore paths from .feastignore and create a set of all files that match any of these paths
8484
ignore_paths = read_feastignore(repo_root)
8585
ignore_files = get_ignore_files(repo_root, ignore_paths)
86+
ignore_paths += [
87+
".git",
88+
".feastignore",
89+
".venv",
90+
".pytest_cache",
91+
"__pycache__",
92+
".ipynb_checkpoints",
93+
]
8694

8795
# List all Python files in the root directory (recursively)
8896
repo_files = {

sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py

+2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ def feature_repo(feastignore_contents: Optional[str]):
1515
repo_root = Path(tmp_dir)
1616
(repo_root / "foo").mkdir()
1717
(repo_root / "foo1").mkdir()
18+
(repo_root / ".ipynb_checkpoints/").mkdir()
1819
(repo_root / "foo1/bar").mkdir()
1920
(repo_root / "bar").mkdir()
2021
(repo_root / "bar/subdir1").mkdir()
2122
(repo_root / "bar/subdir1/subdir2").mkdir()
2223

2324
(repo_root / "a.py").touch()
25+
(repo_root / ".ipynb_checkpoints/test-checkpoint.ipynb").touch()
2426
(repo_root / "foo/b.py").touch()
2527
(repo_root / "foo1/c.py").touch()
2628
(repo_root / "foo1/bar/d.py").touch()

0 commit comments

Comments
 (0)