forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Updating the documentation and adding tests for project length (f…
…east-dev#4628) Updated the documentation to make it clear after spending some time. Addressing the issue - feast-dev#4626 Signed-off-by: lrangine <[email protected]>
- Loading branch information
1 parent
043eff1
commit 945b0fa
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
26 changes: 26 additions & 0 deletions
26
sdk/python/tests/unit/sdk/python/feast/test_repo_operations_validate_feast_project_name.py
This file contains 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}" |