1414
1515import click
1616from click .exceptions import BadParameter
17- from pyfiglet import Figlet
18- from rich .console import Console
1917
2018from feast import PushSource
2119from feast .batch_feature_view import BatchFeatureView
@@ -249,23 +247,23 @@ def _get_repo_contents(repo_path, project_name: Optional[str] = None):
249247
250248 if len (repo .projects ) < 1 :
251249 if project_name :
252- console . print (
250+ print (
253251 f"No project found in the repository. Using project name { project_name } defined in feature_store.yaml"
254252 )
255253 repo .projects .append (Project (name = project_name ))
256254 else :
257- console . print (
255+ print (
258256 "No project found in the repository. Either define Project in repository or define a project in feature_store.yaml"
259257 )
260258 sys .exit (1 )
261259 elif len (repo .projects ) == 1 :
262260 if repo .projects [0 ].name != project_name :
263- console . print (
261+ print (
264262 "Project object name should match with the project name defined in feature_store.yaml"
265263 )
266264 sys .exit (1 )
267265 else :
268- console . print (
266+ print (
269267 "Multiple projects found in the repository. Currently no support for multiple projects"
270268 )
271269 sys .exit (1 )
@@ -378,7 +376,7 @@ def create_feature_store(
378376 # If we received a base64 encoded version of feature_store.yaml, use that
379377 config_base64 = os .getenv (FEATURE_STORE_YAML_ENV_NAME )
380378 if config_base64 :
381- console . print ("Received base64 encoded feature_store.yaml" )
379+ print ("Received base64 encoded feature_store.yaml" )
382380 config_bytes = base64 .b64decode (config_base64 )
383381 # Create a new unique directory for writing feature_store.yaml
384382 repo_path = Path (tempfile .mkdtemp ())
@@ -398,13 +396,13 @@ def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation
398396 repo_config .project = project .name
399397 store , registry = _get_store_and_registry (repo_config )
400398 if not is_valid_name (project .name ):
401- console . print (
399+ print (
402400 f"{ project .name } is not valid. Project name should only have "
403401 f"alphanumerical values and underscores but not start with an underscore."
404402 )
405403 sys .exit (1 )
406404 # TODO: When we support multiple projects in a single repo, we should filter repo contents by project. Currently there is no way to associate Feast objects to project.
407- console . print (f"Applying changes for project { project .name } " )
405+ print (f"Applying changes for project { project .name } " )
408406 apply_total_with_repo_instance (
409407 store , project .name , registry , repo , skip_source_validation
410408 )
@@ -433,7 +431,7 @@ def registry_dump(repo_config: RepoConfig, repo_path: Path) -> str:
433431def cli_check_repo (repo_path : Path , fs_yaml_file : Path ):
434432 sys .path .append (str (repo_path ))
435433 if not fs_yaml_file .exists ():
436- console . print (
434+ print (
437435 f"Can't find feature repo configuration file at { fs_yaml_file } . "
438436 "Make sure you're running feast from an initialized feast repository."
439437 )
@@ -459,11 +457,11 @@ def init_repo(repo_name: str, template: str):
459457 if repo_config_path .exists ():
460458 new_directory = os .path .relpath (repo_path , os .getcwd ())
461459
462- console . print (
460+ print (
463461 f"The directory { Style .BRIGHT + Fore .GREEN } { new_directory } { Style .RESET_ALL } contains an existing feature "
464462 f"store repository that may cause a conflict"
465463 )
466- console . print ()
464+ print ()
467465 sys .exit (1 )
468466
469467 # Copy template directory
0 commit comments