FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Updating the documentation and adding tests for project length by lokeshrangineni · Pull Request #4628 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions sdk/python/feast/repo_config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ class RepoConfig(FeastBaseModel):
"""Repo config. Typically loaded from `feature_store.yaml`"""

project: StrictStr
""" str: Feast project id. This can be any alphanumeric string up to 16 characters.
""" str: This acts as a Feast unique project identifier. This can be any alphanumeric string and can have '_' but can not start with '_'.
You can have multiple independent feature repositories deployed to the same cloud
provider account, as long as they have different project ids.
provider account, as long as they have different project identifier.
"""

provider: StrictStr = "local"
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from sdk.python.feast.repo_operations import is_valid_name


def test_is_valid_name():
test_cases = [
# Valid project name cases
("valid_name1", True),
("username_1234", True),
("valid123", True),
("1234567890123456", True),
("invalid_name_", True),
("12345678901234567", True),
("too_long_name_123", True),
# Invalid project name cases
("_invalidName", False),
("invalid-Name", False),
("invalid name", False),
("invalid@name", False),
("invalid$name", False),
("__", False),
]

for name, expected in test_cases:
assert (
is_valid_name(name) == expected
), f"Failed for project invalid name: {name}"

Back | FazBrowse Home | New Git URL