@@ -254,6 +254,79 @@ def data_source_list(ctx: click.Context, tags: list[str]):
254
254
print (tabulate (table , headers = ["NAME" , "CLASS" ], tablefmt = "plain" ))
255
255
256
256
257
+ @cli .group (name = "projects" )
258
+ def projects_cmd ():
259
+ """
260
+ Access projects
261
+ """
262
+ pass
263
+
264
+
265
+ @projects_cmd .command ("describe" )
266
+ @click .argument ("name" , type = click .STRING )
267
+ @click .pass_context
268
+ def project_describe (ctx : click .Context , name : str ):
269
+ """
270
+ Describe a project
271
+ """
272
+ store = create_feature_store (ctx )
273
+
274
+ try :
275
+ project = store .get_project (name )
276
+ except FeastObjectNotFoundException as e :
277
+ print (e )
278
+ exit (1 )
279
+
280
+ print (
281
+ yaml .dump (
282
+ yaml .safe_load (str (project )), default_flow_style = False , sort_keys = False
283
+ )
284
+ )
285
+
286
+
287
+ @projects_cmd .command ("current_project" )
288
+ @click .pass_context
289
+ def project_current (ctx : click .Context ):
290
+ """
291
+ Returns the current project configured with FeatureStore object
292
+ """
293
+ store = create_feature_store (ctx )
294
+
295
+ try :
296
+ project = store .get_project (name = None )
297
+ except FeastObjectNotFoundException as e :
298
+ print (e )
299
+ exit (1 )
300
+
301
+ print (
302
+ yaml .dump (
303
+ yaml .safe_load (str (project )), default_flow_style = False , sort_keys = False
304
+ )
305
+ )
306
+
307
+
308
+ @projects_cmd .command (name = "list" )
309
+ @tagsOption
310
+ @click .pass_context
311
+ def project_list (ctx : click .Context , tags : list [str ]):
312
+ """
313
+ List all projects
314
+ """
315
+ store = create_feature_store (ctx )
316
+ table = []
317
+ tags_filter = utils .tags_list_to_dict (tags )
318
+ for project in store .list_projects (tags = tags_filter ):
319
+ table .append ([project .name , project .description , project .tags , project .owner ])
320
+
321
+ from tabulate import tabulate
322
+
323
+ print (
324
+ tabulate (
325
+ table , headers = ["NAME" , "DESCRIPTION" , "TAGS" , "OWNER" ], tablefmt = "plain"
326
+ )
327
+ )
328
+
329
+
257
330
@cli .group (name = "entities" )
258
331
def entities_cmd ():
259
332
"""
0 commit comments