From 2807dfaf46d3d9e79f84b0ff22dbaeede377c89b Mon Sep 17 00:00:00 2001 From: Matt Green Date: Wed, 23 Oct 2024 10:11:16 -0700 Subject: [PATCH] fix: Fix gitignore issue (#4674) fix: gitignore issue Signed-off-by: Matt Green --- sdk/python/feast/repo_operations.py | 4 ++++ sdk/python/feast/templates/athena/{.gitignore => gitignore} | 0 sdk/python/feast/templates/aws/{.gitignore => gitignore} | 0 .../feast/templates/cassandra/{.gitignore => gitignore} | 0 sdk/python/feast/templates/gcp/{.gitignore => gitignore} | 0 .../feast/templates/hazelcast/{.gitignore => gitignore} | 0 sdk/python/feast/templates/hbase/{.gitignore => gitignore} | 0 sdk/python/feast/templates/minimal/{.gitignore => gitignore} | 0 sdk/python/feast/templates/postgres/{.gitignore => gitignore} | 0 .../feast/templates/snowflake/{.gitignore => gitignore} | 0 sdk/python/feast/templates/spark/{.gitignore => gitignore} | 0 11 files changed, 4 insertions(+) rename sdk/python/feast/templates/athena/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/aws/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/cassandra/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/gcp/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/hazelcast/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/hbase/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/minimal/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/postgres/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/snowflake/{.gitignore => gitignore} (100%) rename sdk/python/feast/templates/spark/{.gitignore => gitignore} (100%) diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index 6629768375..4db0bbc6fd 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -468,6 +468,10 @@ def init_repo(repo_name: str, template: str): raise IOError(f"Could not find template {template}") copytree(template_path, str(repo_path), dirs_exist_ok=True) + # Rename gitignore files back to .gitignore + for gitignore_path in repo_path.rglob("gitignore"): + gitignore_path.rename(gitignore_path.with_name(".gitignore")) + # Seed the repository bootstrap_path = repo_path / "bootstrap.py" if os.path.exists(bootstrap_path): diff --git a/sdk/python/feast/templates/athena/.gitignore b/sdk/python/feast/templates/athena/gitignore similarity index 100% rename from sdk/python/feast/templates/athena/.gitignore rename to sdk/python/feast/templates/athena/gitignore diff --git a/sdk/python/feast/templates/aws/.gitignore b/sdk/python/feast/templates/aws/gitignore similarity index 100% rename from sdk/python/feast/templates/aws/.gitignore rename to sdk/python/feast/templates/aws/gitignore diff --git a/sdk/python/feast/templates/cassandra/.gitignore b/sdk/python/feast/templates/cassandra/gitignore similarity index 100% rename from sdk/python/feast/templates/cassandra/.gitignore rename to sdk/python/feast/templates/cassandra/gitignore diff --git a/sdk/python/feast/templates/gcp/.gitignore b/sdk/python/feast/templates/gcp/gitignore similarity index 100% rename from sdk/python/feast/templates/gcp/.gitignore rename to sdk/python/feast/templates/gcp/gitignore diff --git a/sdk/python/feast/templates/hazelcast/.gitignore b/sdk/python/feast/templates/hazelcast/gitignore similarity index 100% rename from sdk/python/feast/templates/hazelcast/.gitignore rename to sdk/python/feast/templates/hazelcast/gitignore diff --git a/sdk/python/feast/templates/hbase/.gitignore b/sdk/python/feast/templates/hbase/gitignore similarity index 100% rename from sdk/python/feast/templates/hbase/.gitignore rename to sdk/python/feast/templates/hbase/gitignore diff --git a/sdk/python/feast/templates/minimal/.gitignore b/sdk/python/feast/templates/minimal/gitignore similarity index 100% rename from sdk/python/feast/templates/minimal/.gitignore rename to sdk/python/feast/templates/minimal/gitignore diff --git a/sdk/python/feast/templates/postgres/.gitignore b/sdk/python/feast/templates/postgres/gitignore similarity index 100% rename from sdk/python/feast/templates/postgres/.gitignore rename to sdk/python/feast/templates/postgres/gitignore diff --git a/sdk/python/feast/templates/snowflake/.gitignore b/sdk/python/feast/templates/snowflake/gitignore similarity index 100% rename from sdk/python/feast/templates/snowflake/.gitignore rename to sdk/python/feast/templates/snowflake/gitignore diff --git a/sdk/python/feast/templates/spark/.gitignore b/sdk/python/feast/templates/spark/gitignore similarity index 100% rename from sdk/python/feast/templates/spark/.gitignore rename to sdk/python/feast/templates/spark/gitignore