common_set_of_daal_errors = {
    '.*test_non_meta_estimators:check_fit2d_predict1d\(RANSACRegressor\)',
    '.*test_non_meta_estimators:check_estimators_pickle\(LinearRegression\)',
    '.*test_non_meta_estimators:check_estimators_pickle\(Ridge\)',
    '.*test_non_meta_estimators:check_estimators_pickle\(SVC\)',
    '.*test_non_meta_estimators:check_fit2d_predict1d\(LinearRegression\)',
    '.*test_non_meta_estimators:check_estimators_pickle\(RANSACRegressor\)',
    '.*test_non_meta_estimators:check_supervised_y_2d\(RANSACRegressor\)',
    '.*sklearn\.utils\.tests\.test_estimator_checks\.test_check_estimator_clones',
}

daal_2018_u2_failures = {
    '.*sklearn\.linear_model\.tests\.test_omp\.test_unreachable_accuracy',  # sklearn issue
    '.*sklearn\.tests\.test_cross_validation\.test_cross_val_predict_sparse_prediction', # SAT-1591
    '.*sklearn\.tests\.test_multiclass\.test_pairwise_cross_val_score', # SAT-1591
    '.*sklearn\.svm\.tests\.test_sparse\.test_sparse_realdata', # SAT-1591
    '.*sklearn\.model_selection\.tests\.test_validation\.test_cross_val_predict_sparse_prediction',  # SAT-1591
    '.*sklearn\.mixture\.tests\.test_dpgmm\.test_class_weights',            # tests deprecated functionality, affectted by labels difference
    '.*sklearn\.cluster\.tests\.test_bicluster\.test_project_and_cluster',  # checks for exact match of labels, which is not expected for this implementation
    '.*sklearn\.manifold\.tests\.test_spectral_embedding\.test_pipeline_spectral_clustering',  # same as above
    '.*sklearn\.svm\.tests\.test_svm\.test_tweak_params', # SAT-1591, changing dual coefs does not affect daal model
    '.*sklearn\.svm\.tests\.test_sparse\.test_svc_iris', # SAT-1591, rbf optimization fall-out
    '.*sklearn\.model_selection\.tests\.test_search\.test_search_cv_results_rank_tie_breaking', #SAT-1591, rbf
    '.*sklearn\.ensemble\.tests\.test_bagging\.test_sparse_classification', # SAT-1591, rbf
    '.*sklearn\.ensemble\.tests\.test_bagging\.test_sparse_classification', # SAT-1591, rbf
    '.*sklearn\.tests\.test_cross_validation\.*test_kfold_can_detect_dependent_samples_on_digits', # SAT-1591, rbf
    '.*sklearn\.model_selection\.tests.test_split\.test_kfold_can_detect_dependent_samples_on_digits', # SAT-1591, rbf

}

earier_failures = {
    '.*sklearn\.tests\.test_cross_validation\.test_cross_val_score_with_score_func_regression',
    '.*test_non_meta_estimators:check_estimators_nan_inf\(RANSACRegressor\)',
    '.*sklearn\.linear_model\.tests\.test_ridge\.test_dense_sparse\(\<function _test_ridge_loo at .*,\)',
    '.*sklearn\.model_selection\.tests\.test_validation\.test_cross_val_score_with_score_func_regression',
    '.*test_non_meta_estimators:check_estimators_nan_inf\(LinearRegression\)',
    '.*sklearn\.decomposition\.tests\.test_fastica\.test_fastica_simple',
}

common_set_of_daal_failures = daal_2018_u2_failures # | earier_failures

mac_failures = common_set_of_daal_failures.copy()
mac_failures.update({'.*sklearn\.preprocessing\.tests\.test_data\.test_standard_scaler_numerical_stability'})

CONFIG = {
    'framework' : 'other',
    'arg' : 'PYCMD -c "import nose; nose.main()" -v sklearn',
    'env' : None,
    'expect_except' : None,
    'need_sources' : False,
    'location' : None,
    'use_re' : True,
    'errors' : {
        '2.7' : {
            'Win' : set(), 
            'Lin' : common_set_of_daal_errors,
            'Mac' : common_set_of_daal_errors
        },
        '3.5' : {
            'Win' : common_set_of_daal_errors,
            'Lin' : common_set_of_daal_errors,
            'Mac' : common_set_of_daal_errors
        },
    },
    'failures' : {
        '2.7' : {
            'Win' : {'.*sklearn\.linear_model\.tests\.test_omp\.test_unreachable_accuracy',
                     '.*sklearn\.manifold\.tests\.test_tsne\.test_tsne_with_different_distance_metrics', # SAT-1570
                     'Make sure that TSNE works for different distance metrics', # SAT-1570
                    },
            'Lin' : common_set_of_daal_failures, 
            'Mac' : mac_failures
        },
        '3.5' : {
            'Win' : common_set_of_daal_failures, 
            'Lin' : common_set_of_daal_failures, 
            'Mac' : common_set_of_daal_failures 
        },
        '3.6' : {
            'Win' : common_set_of_daal_failures, 
            'Lin' : common_set_of_daal_failures, 
            'Mac' : mac_failures
        },
    }
}

def fetch_config(pyver):
    return CONFIG
