From 7c94454552c515c2bf648e96eda82c97d690bd42 Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Wed, 12 Jun 2024 23:19:51 -0400 Subject: [PATCH 1/4] feat: Ignoring sensible default files for repo operations Signed-off-by: Francisco Javier Arceo --- sdk/python/feast/repo_operations.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index 274a0af02b..42fdaf8f2d 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -83,6 +83,7 @@ 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__"] # List all Python files in the root directory (recursively) repo_files = { From f34477ffa3cf9071bded5c2330a3c6f6b18eb44b Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Wed, 12 Jun 2024 23:20:24 -0400 Subject: [PATCH 2/4] updated Signed-off-by: Francisco Javier Arceo --- sdk/python/feast/repo_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index 42fdaf8f2d..d54aa54f6c 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -83,7 +83,7 @@ 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__"] + ignore_paths += [".git", ".feastignore", ".venv", ".pytest_cache", "__pycache__", ".ipynb_checkpoints"] # List all Python files in the root directory (recursively) repo_files = { From 966a0bf6e528e850e929d9f4ef00e37651c06db2 Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Wed, 12 Jun 2024 23:29:31 -0400 Subject: [PATCH 3/4] linted Signed-off-by: Francisco Javier Arceo --- sdk/python/feast/repo_operations.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index d54aa54f6c..05a7d05e23 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -83,7 +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"] + ignore_paths += [ + ".git", + ".feastignore", + ".venv", + ".pytest_cache", + "__pycache__", + ".ipynb_checkpoints", + ] # List all Python files in the root directory (recursively) repo_files = { From e93c61aaeadc0625fb7e9ba9f8170ff8d127863a Mon Sep 17 00:00:00 2001 From: Francisco Javier Arceo Date: Fri, 14 Jun 2024 13:57:05 -0400 Subject: [PATCH 4/4] updated test Signed-off-by: Francisco Javier Arceo --- sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py b/sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py index 70c8b05c2e..aa4ff1c40f 100644 --- a/sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py +++ b/sdk/python/tests/unit/infra/scaffolding/test_repo_operations.py @@ -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()