(self)
| 173 | return None |
| 174 | |
| 175 | def check_data(self): |
| 176 | check_missing_data_result = self.check_missing_data() |
| 177 | check_large_step_changes_result = self.check_large_step_changes() |
| 178 | check_required_columns_result = self.check_required_columns() |
| 179 | check_missing_factor_result = self.check_missing_factor() |
| 180 | if ( |
| 181 | check_large_step_changes_result is not None |
| 182 | or check_large_step_changes_result is not None |
| 183 | or check_required_columns_result is not None |
| 184 | or check_missing_factor_result is not None |
| 185 | ): |
| 186 | print(f"\nSummary of data health check ({len(self.data)} files checked):") |
| 187 | print("-------------------------------------------------") |
| 188 | if isinstance(check_missing_data_result, pd.DataFrame): |
| 189 | logger.warning(f"There is missing data.") |
| 190 | print(check_missing_data_result) |
| 191 | if isinstance(check_large_step_changes_result, pd.DataFrame): |
| 192 | logger.warning(f"The OHLCV column has large step changes.") |
| 193 | print(check_large_step_changes_result) |
| 194 | if isinstance(check_required_columns_result, pd.DataFrame): |
| 195 | logger.warning(f"Columns (OLHCV) are missing.") |
| 196 | print(check_required_columns_result) |
| 197 | if isinstance(check_missing_factor_result, pd.DataFrame): |
| 198 | logger.warning(f"The factor column does not exist or is empty") |
| 199 | print(check_missing_factor_result) |
| 200 | |
| 201 | |
| 202 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected