Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ class RepoConfig(FeastBaseModel):
provider account, as long as they have different project identifier.
"""

project_description: Optional[StrictStr] = None
""" str: Optional description of the project to provide context about the project's purpose and usage.
"""

provider: StrictStr = "local"
""" str: local or gcp or aws """

Expand Down
17 changes: 13 additions & 4 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def parse_repo(repo_root: Path) -> RepoContents:

def plan(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool):
os.chdir(repo_path)
repo = _get_repo_contents(repo_path, repo_config.project)
repo = _get_repo_contents(repo_path, repo_config.project, repo_config)
for project in repo.projects:
repo_config.project = project.name
store, registry = _get_store_and_registry(repo_config)
Expand All @@ -239,7 +239,11 @@ def plan(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool)
click.echo(infra_diff.to_string())


def _get_repo_contents(repo_path, project_name: Optional[str] = None):
def _get_repo_contents(
repo_path,
project_name: Optional[str] = None,
repo_config: Optional[RepoConfig] = None,
):
sys.dont_write_bytecode = True
repo = parse_repo(repo_path)

Expand All @@ -248,7 +252,12 @@ def _get_repo_contents(repo_path, project_name: Optional[str] = None):
print(
f"No project found in the repository. Using project name {project_name} defined in feature_store.yaml"
)
repo.projects.append(Project(name=project_name))
project_description = (
repo_config.project_description if repo_config else None
)
repo.projects.append(
Project(name=project_name, description=project_description or "")
)
else:
print(
"No project found in the repository. Either define Project in repository or define a project in feature_store.yaml"
Expand Down Expand Up @@ -389,7 +398,7 @@ def create_feature_store(

def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool):
os.chdir(repo_path)
repo = _get_repo_contents(repo_path, repo_config.project)
repo = _get_repo_contents(repo_path, repo_config.project, repo_config)
for project in repo.projects:
repo_config.project = project.name
store, registry = _get_store_and_registry(repo_config)
Expand Down
10 changes: 10 additions & 0 deletions ui/src/queries/useLoadRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,18 @@ const useLoadRegistry = (url: string) => {
? objects.project
: "credit_scoring_aws";

let projectDescription = undefined;
if (
objects.projects &&
objects.projects.length > 0 &&
objects.projects[0].spec
) {
projectDescription = objects.projects[0].spec.description;
}

return {
project: projectName,
description: projectDescription,
objects,
mergedFVMap,
mergedFVList,
Expand Down
Loading