File tree Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Expand file tree Collapse file tree 3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ Options:
19
19
20
20
Commands:
21
21
apply Create or update a feature store deployment
22
+ configuration Display Feast configuration
22
23
entities Access entities
23
24
feature-views Access feature views
24
25
init Create a new Feast repository
@@ -61,6 +62,28 @@ feast apply
61
62
` feast apply ` \( when configured to use cloud provider like ` gcp ` or ` aws ` \) will create cloud infrastructure. This may incur costs.
62
63
{% endhint %}
63
64
65
+ ## Configuration
66
+
67
+ Display the actual configuration being used by Feast, including both user-provided configurations and default configurations applied by Feast.
68
+
69
+ ``` bash
70
+ feast configuration
71
+ ```
72
+
73
+ ``` yaml
74
+ project : foo
75
+ registry : data/registry.db
76
+ provider : local
77
+ online_store :
78
+ type : sqlite
79
+ path : data/online_store.db
80
+ offline_store :
81
+ type : dask
82
+ entity_key_serialization_version : 2
83
+ auth :
84
+ type : no_auth
85
+ ` ` `
86
+
64
87
## Entities
65
88
66
89
List all registered entities
Original file line number Diff line number Diff line change @@ -137,6 +137,24 @@ def version():
137
137
print (f'Feast SDK Version: "{ importlib_version ("feast" )} "' )
138
138
139
139
140
+ @cli .command ()
141
+ @click .pass_context
142
+ def configuration (ctx : click .Context ):
143
+ """
144
+ Display Feast configuration
145
+ """
146
+ repo = ctx .obj ["CHDIR" ]
147
+ fs_yaml_file = ctx .obj ["FS_YAML_FILE" ]
148
+ cli_check_repo (repo , fs_yaml_file )
149
+ repo_config = load_repo_config (repo , fs_yaml_file )
150
+ if repo_config :
151
+ config_dict = repo_config .model_dump (by_alias = True , exclude_unset = True )
152
+ config_dict .pop ("repo_path" , None )
153
+ print (yaml .dump (config_dict , default_flow_style = False , sort_keys = False ))
154
+ else :
155
+ print ("No configuration found." )
156
+
157
+
140
158
@cli .command ()
141
159
@click .option (
142
160
"--host" ,
Original file line number Diff line number Diff line change @@ -170,3 +170,23 @@ def setup_third_party_registry_store_repo(
170
170
)
171
171
172
172
yield repo_path
173
+
174
+
175
+ def test_cli_configuration ():
176
+ """
177
+ Unit test for the 'feast configuration' command
178
+ """
179
+ runner = CliRunner ()
180
+
181
+ with setup_third_party_provider_repo ("local" ) as repo_path :
182
+ # Run the 'feast configuration' command
183
+ return_code , output = runner .run_with_output (["configuration" ], cwd = repo_path )
184
+
185
+ # Assertions
186
+ assertpy .assert_that (return_code ).is_equal_to (0 )
187
+ assertpy .assert_that (output ).contains (b"project: foo" )
188
+ assertpy .assert_that (output ).contains (b"provider: local" )
189
+ assertpy .assert_that (output ).contains (b"type: sqlite" )
190
+ assertpy .assert_that (output ).contains (b"path: data/online_store.db" )
191
+ assertpy .assert_that (output ).contains (b"type: file" )
192
+ assertpy .assert_that (output ).contains (b"entity_key_serialization_version: 2" )
You can’t perform that action at this time.
0 commit comments