21
21
from ads .feature_store .input_feature_detail import FeatureDetail , FeatureType
22
22
from ads .feature_store .service .oci_feature_group import OCIFeatureGroup
23
23
from ads .feature_store .service .oci_feature_store import OCIFeatureStore
24
- from tests .unitary .install_required .feature_store .test_feature_group_job import (
24
+ from tests .unitary .with_extras .feature_store .test_feature_group_job import (
25
25
FEATURE_GROUP_JOB_PAYLOAD ,
26
26
)
27
27
32
32
"entityId" : "ocid1.entity.oc1.iad.xxx" ,
33
33
"description" : "feature group description" ,
34
34
"primaryKeys" : {"items" : []},
35
+ "partitionKeys" : {"items" : []},
36
+ "transformationParameters" : "e30=" ,
35
37
"featureStoreId" : "ocid1.featurestore.oc1.iad.xxx" ,
36
38
"compartmentId" : "ocid1.compartment.oc1.iad.xxx" ,
37
39
"inputFeatureDetails" : [
@@ -133,6 +135,8 @@ def test_with_methods_1(self, mock_load_default_properties):
133
135
.with_entity_id (self .payload ["entityId" ])
134
136
.with_feature_store_id (self .payload ["featureStoreId" ])
135
137
.with_primary_keys ([])
138
+ .with_partition_keys ([])
139
+ .with_transformation_kwargs ({})
136
140
.with_input_feature_details (input_feature_details )
137
141
)
138
142
assert self .prepare_dict (
@@ -154,6 +158,8 @@ def test_with_methods_2(self):
154
158
.with_entity_id (self .payload ["entityId" ])
155
159
.with_feature_store_id (self .payload ["featureStoreId" ])
156
160
.with_primary_keys ([])
161
+ .with_partition_keys ([])
162
+ .with_transformation_kwargs ({})
157
163
.with_input_feature_details (input_feature_details )
158
164
)
159
165
assert self .prepare_dict (
@@ -205,8 +211,8 @@ def test_from_id(self, mock_oci_from_id, mock__update_from_oci_fs_model):
205
211
206
212
@patch .object (OCIFeatureGroup , "create" )
207
213
def test_create_success (
208
- self ,
209
- mock_oci_dsc_model_create ,
214
+ self ,
215
+ mock_oci_dsc_model_create ,
210
216
):
211
217
"""Tests creating datascience feature_group."""
212
218
oci_dsc_model = OCIFeatureGroup (** FEATURE_GROUP_PAYLOAD )
@@ -275,7 +281,7 @@ def test__to_oci_fs_entity(self, mock_load_key_file, mock_config_from_file):
275
281
@patch .object (SparkSessionSingleton , "__init__" , return_value = None )
276
282
@patch .object (SparkSessionSingleton , "get_spark_session" )
277
283
def test_materialise (
278
- self , spark_session , get_spark_session , mocke_update , dataframe_fixture_basic
284
+ self , spark_session , get_spark_session , mocke_update , dataframe_fixture_basic
279
285
):
280
286
with patch .object (FeatureGroupJob , "create" ) as mock_feature_group_job :
281
287
with patch .object (FeatureStore , "from_id" ):
@@ -318,7 +324,7 @@ def test_history(self, feature_store, spark_session, get_spark_session):
318
324
@patch .object (SparkSessionSingleton , "get_spark_session" )
319
325
@patch .object (OCIFeatureStore , "from_id" )
320
326
def test_restore (
321
- self , feature_store , spark_session , get_spark_session , mock_update
327
+ self , feature_store , spark_session , get_spark_session , mock_update
322
328
):
323
329
with patch .object (SparkEngine , "sql" ) as mock_execution_strategy :
324
330
mock_execution_strategy .return_value = None
0 commit comments