Validates the state of this project locally. Raises: ValueError: The project does not have a name or does not have a type.
(self)
| 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): |