MCPcopy Index your code
hub / github.com/feast-dev/feast / is_valid

Method is_valid

sdk/python/feast/project.py:105–121  ·  view source on GitHub ↗

Validates the state of this project locally. Raises: ValueError: The project does not have a name or does not have a type.

(self)

Source from the content-addressed store, hash-verified

103 return self.name < other.name
104
105 def is_valid(self):
106 """
107 Validates the state of this project locally.
108
109 Raises:
110 ValueError: The project does not have a name or does not have a type.
111 """
112 if not self.name:
113 raise ValueError("The project does not have a name.")
114
115 from feast.repo_operations import is_valid_name
116
117 if not is_valid_name(self.name):
118 raise ValueError(
119 f"Project name, {self.name}, should only have "
120 f"alphanumerical values, underscores, and hyphens but not start with an underscore or hyphen."
121 )
122
123 @classmethod
124 def from_proto(cls, project_proto: ProjectProto):

Callers 1

test_is_validMethod · 0.95

Calls 1

is_valid_nameFunction · 0.90

Tested by 1

test_is_validMethod · 0.76