|
9 | 9 | EntityNotFoundException, |
10 | 10 | FeatureServiceNotFoundException, |
11 | 11 | FeatureViewNotFoundException, |
12 | | - OnDemandFeatureViewNotFoundException, |
13 | 12 | SavedDatasetNotFound, |
14 | 13 | ValidationReferenceNotFound, |
15 | 14 | ) |
@@ -98,7 +97,7 @@ def get_on_demand_feature_view( |
98 | 97 | and on_demand_feature_view.spec.name == name |
99 | 98 | ): |
100 | 99 | return OnDemandFeatureView.from_proto(on_demand_feature_view) |
101 | | - raise OnDemandFeatureViewNotFoundException(name, project=project) |
| 100 | + raise FeatureViewNotFoundException(name, project=project) |
102 | 101 |
|
103 | 102 |
|
104 | 103 | def get_data_source( |
@@ -138,10 +137,6 @@ def get_validation_reference( |
138 | 137 | raise ValidationReferenceNotFound(name, project=project) |
139 | 138 |
|
140 | 139 |
|
141 | | -def list_validation_references(registry_proto: RegistryProto): |
142 | | - return registry_proto.validation_references |
143 | | - |
144 | | - |
145 | 140 | def list_feature_services( |
146 | 141 | registry_proto: RegistryProto, project: str, allow_cache: bool = False |
147 | 142 | ) -> List[FeatureService]: |
@@ -215,13 +210,25 @@ def list_data_sources(registry_proto: RegistryProto, project: str) -> List[DataS |
215 | 210 |
|
216 | 211 |
|
217 | 212 | def list_saved_datasets( |
218 | | - registry_proto: RegistryProto, project: str, allow_cache: bool = False |
| 213 | + registry_proto: RegistryProto, project: str |
219 | 214 | ) -> List[SavedDataset]: |
220 | | - return [ |
221 | | - SavedDataset.from_proto(saved_dataset) |
222 | | - for saved_dataset in registry_proto.saved_datasets |
223 | | - if saved_dataset.spec.project == project |
224 | | - ] |
| 215 | + saved_datasets = [] |
| 216 | + for saved_dataset in registry_proto.saved_datasets: |
| 217 | + if saved_dataset.project == project: |
| 218 | + saved_datasets.append(SavedDataset.from_proto(saved_dataset)) |
| 219 | + return saved_datasets |
| 220 | + |
| 221 | + |
| 222 | +def list_validation_references( |
| 223 | + registry_proto: RegistryProto, project: str |
| 224 | +) -> List[ValidationReference]: |
| 225 | + validation_references = [] |
| 226 | + for validation_reference in registry_proto.validation_references: |
| 227 | + if validation_reference.project == project: |
| 228 | + validation_references.append( |
| 229 | + ValidationReference.from_proto(validation_reference) |
| 230 | + ) |
| 231 | + return validation_references |
225 | 232 |
|
226 | 233 |
|
227 | 234 | def list_project_metadata( |
|
0 commit comments