Visitar URL original
feat(cli): Add `feast projects delete` command (closes #5095) by mailtoboggavarapu-coder · Pull Request #6318 · feast-dev/feast · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cli): align project_list and project_current with master implemen…
…tation

Addresses Devin Review findings:
- Fix project_list: use utils.tags_list_to_dict() instead of manual tag.split(), and print tabulated output matching master
- Fix project_current: call store.get_project(name=None) with error handling instead of store.project

Both functions now match master branch exactly. Only project_delete is new code from this PR.

Signed-off-by: Venkateswarlu Boggavarapu <mailtoboggavarapu@gmail.com>
  • Loading branch information
mailtoboggavarapu-coder authored and ntkathole committed May 6, 2026
commit d113a3a21254b41540b992c582bef4467fc51889
39 changes: 28 additions & 11 deletions sdk/python/feast/cli/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
@click.group(name="projects")
def projects_cmd():
"""
Access and manage projects
Access projects
"""
pass


@projects_cmd.command("describe")
Expand All @@ -26,8 +27,8 @@ def project_describe(ctx: click.Context, name: str):
try:
project = store.get_project(name)
except FeastObjectNotFoundException as e:
print(str(e))
raise SystemExit(1)
print(e)
exit(1)

print(
yaml.dump(
Expand All @@ -40,27 +41,43 @@ def project_describe(ctx: click.Context, name: str):
@click.pass_context
def project_current(ctx: click.Context):
"""
Returns the current project configured with FeatureStore
Returns the current project configured with FeatureStore object
"""
store = create_feature_store(ctx)
print(store.project)

try:
project = store.get_project(name=None)
except FeastObjectNotFoundException as e:
print(e)
exit(1)

@projects_cmd.command("list")
print(
yaml.dump(
yaml.safe_load(str(project)), default_flow_style=False, sort_keys=False
)
)


@projects_cmd.command(name="list")
@tagsOption
@click.pass_context
def project_list(ctx: click.Context, tags: list[str]):
"""
List all projects
"""
store = create_feature_store(ctx)
table = []
tags_filter = utils.tags_list_to_dict(tags)
for project in store.list_projects(tags=tags_filter):
table.append([project.name, project.description, project.tags, project.owner])

projects = store.list_projects(
tags=dict(tag.split(":", 1) for tag in tags),
)
from tabulate import tabulate

for project in projects:
print(utils.py_object_to_proto(project).name)
print(
tabulate(
table, headers=["NAME", "DESCRIPTION", "TAGS", "OWNER"], tablefmt="plain"
)
)


@projects_cmd.command("delete")
Expand Down