def run(self): test_inspections_extractor = TestInspectionsExtractor() self.test_result = test_inspections_extractor.test_extaction_is_not_empty(self.year, self.month, self.day) if self.test_result['status'] == 'failed': print_test_failed(self.test_result['test'], self.test_result['note']) sys.exit() else: print_test_passed(self.test_result['test']) super().run()
def run(self): test_inspections_extractor = TestInspectionsExtractor() self.test_result = test_inspections_extractor.test_inspection_date_should_match_params_date( self.year, self.month, self.day) if self.test_result['status'] == 'failed': print_test_failed(self.test_result['test'], self.test_result['note']) sys.exit() else: print_test_passed(self.test_result['test']) super().run()
def run(self): test_feature_engineering = TestFeatureEngineering() self.test_result = test_feature_engineering.test_columns_one_hot_encoding( self.year, self.month, self.day) if self.test_result['status'] == 'failed': print_test_failed(self.test_result['test'], self.test_result['note']) sys.exit() else: print_test_passed(self.test_result['test']) #if self.test_result['status'] == 'failed': super().run()
def run(self): ses = boto3.session.Session(profile_name='default', region_name='us-east-1') latest_model = self.get_lastest_model(ses) s3_resource = ses.resource('s3') with BytesIO() as data: s3_resource.Bucket(self.bucket).download_fileobj(latest_model, data) data.seek(0) model = pickle.load(data) test_preds = TestPredictions() self.test_result = test_preds.test_at_least_one_center(model, self.year, self.month, self.day, self.matrix_uuid) if self.test_result['status'] == 'failed': print_test_failed(self.test_result['test'], self.test_result['note']) sys.exit() else: print_test_passed(self.test_result['test']) super().run()