@@ -64,13 +64,9 @@ def setUp(self):
6464 start_date = end_date - timedelta (days = 15 )
6565
6666 driver_entities = [1001 , 1002 , 1003 , 1004 , 1005 ]
67- driver_df = create_driver_hourly_stats_df (
68- driver_entities , start_date , end_date
69- )
67+ driver_df = create_driver_hourly_stats_df (driver_entities , start_date , end_date )
7068 driver_stats_path = os .path .join (data_dir , "driver_stats.parquet" )
71- driver_df .to_parquet (
72- path = driver_stats_path , allow_truncated_timestamps = True
73- )
69+ driver_df .to_parquet (path = driver_stats_path , allow_truncated_timestamps = True )
7470
7571 driver = Entity (
7672 name = "driver" , join_keys = ["driver_id" ], value_type = ValueType .INT64
@@ -123,9 +119,7 @@ def setUp(self):
123119 )
124120 def pandas_view (inputs : pd .DataFrame ) -> pd .DataFrame :
125121 df = pd .DataFrame ()
126- df ["conv_rate_plus_acc_pandas" ] = (
127- inputs ["conv_rate" ] + inputs ["acc_rate" ]
128- )
122+ df ["conv_rate_plus_acc_pandas" ] = inputs ["conv_rate" ] + inputs ["acc_rate" ]
129123 return df
130124
131125 @on_demand_feature_view (
@@ -136,9 +130,7 @@ def pandas_view(inputs: pd.DataFrame) -> pd.DataFrame:
136130 def python_view (inputs : dict [str , Any ]) -> dict [str , Any ]:
137131 output : dict [str , Any ] = {
138132 "conv_rate_plus_acc_python" : conv_rate + acc_rate
139- for conv_rate , acc_rate in zip (
140- inputs ["conv_rate" ], inputs ["acc_rate" ]
141- )
133+ for conv_rate , acc_rate in zip (inputs ["conv_rate" ], inputs ["acc_rate" ])
142134 }
143135 return output
144136
@@ -245,7 +237,8 @@ def python_stored_writes_feature_view(
245237
246238 def tearDown (self ):
247239 import shutil
248- if hasattr (self , 'data_dir' ):
240+
241+ if hasattr (self , "data_dir" ):
249242 shutil .rmtree (self .data_dir , ignore_errors = True )
250243
251244 def test_setup (self ):
0 commit comments