Skip to content

Commit

Permalink
fix: changes following issue 4593
Browse files Browse the repository at this point in the history
- Fixed file path in templates to be relative path

Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
  • Loading branch information
tmihalac committed Oct 14, 2024
1 parent bcde20c commit 4bd0637
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions sdk/python/feast/templates/cassandra/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ def bootstrap():

# example_repo.py
example_py_file = repo_path / "example_repo.py"
replace_str_in_file(
example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path))
)
replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path))

# store config yaml, interact with user and then customize file:
settings = collect_cassandra_store_settings()
Expand Down
4 changes: 1 addition & 3 deletions sdk/python/feast/templates/hazelcast/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ def bootstrap():

# example_repo.py
example_py_file = repo_path / "example_repo.py"
replace_str_in_file(
example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path))
)
replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path))

# store config yaml, interact with user and then customize file:
settings = collect_hazelcast_online_store_settings()
Expand Down
4 changes: 1 addition & 3 deletions sdk/python/feast/templates/hbase/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def bootstrap():
driver_df.to_parquet(path=str(driver_stats_path), allow_truncated_timestamps=True)

example_py_file = repo_path / "example_repo.py"
replace_str_in_file(
example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path))
)
replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path))


if __name__ == "__main__":
Expand Down
8 changes: 2 additions & 6 deletions sdk/python/feast/templates/local/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ def bootstrap():

example_py_file = repo_path / "example_repo.py"
replace_str_in_file(example_py_file, "%PROJECT_NAME%", str(project_name))
replace_str_in_file(
example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path))
)
replace_str_in_file(
example_py_file, "%LOGGING_PATH%", str(data_path.relative_to(repo_path))
)
replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path))
replace_str_in_file(example_py_file, "%LOGGING_PATH%", str(data_path))


if __name__ == "__main__":
Expand Down

0 comments on commit 4bd0637

Please sign in to comment.