File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from importlib .metadata import PackageNotFoundError
22from importlib .metadata import version as _version
33
4+ from feast .demos import copy_demo_notebooks
45from feast .infra .offline_stores .bigquery_source import BigQuerySource
56from feast .infra .offline_stores .contrib .athena_offline_store .athena_source import (
67 AthenaSource ,
4142__all__ = [
4243 "Aggregation" ,
4344 "BatchFeatureView" ,
45+ "copy_demo_notebooks" ,
4446 "DataFrameEngine" ,
4547 "Entity" ,
4648 "KafkaSource" ,
Original file line number Diff line number Diff line change @@ -598,6 +598,39 @@ def validate(
598598 exit (1 )
599599
600600
601+ @cli .command ("demo-notebooks" )
602+ @click .option (
603+ "--output-dir" ,
604+ "-o" ,
605+ default = "./feast-demo-notebooks" ,
606+ show_default = True ,
607+ help = "Directory where the demo notebooks are written." ,
608+ )
609+ @click .option (
610+ "--overwrite" ,
611+ is_flag = True ,
612+ default = False ,
613+ help = "Overwrite existing notebooks if the output directory already exists." ,
614+ )
615+ @click .pass_context
616+ def demo_notebooks_command (ctx : click .Context , output_dir : str , overwrite : bool ):
617+ """
618+ Generate demo Jupyter notebooks tailored to the feature store configuration.
619+
620+ Searches the current directory and feast-config/ subdirectory for
621+ feature_store.yaml files. For each project found, a sub-directory is created
622+ under OUTPUT_DIR.
623+ """
624+ from feast .demos import copy_demo_notebooks
625+
626+ repo = ctx .obj ["CHDIR" ]
627+ copy_demo_notebooks (
628+ output_dir = output_dir ,
629+ repo_path = str (repo ),
630+ overwrite = overwrite ,
631+ )
632+
633+
601634cli .add_command (data_sources_cmd )
602635cli .add_command (entities_cmd )
603636cli .add_command (feature_services_cmd )
You can’t perform that action at this time.
0 commit comments