# Path: preimage/datasets/loader.py
# class StructuredOutputDataset:
# class StandardDataset:
#     def __init__(self, X, Y):
#     def __init__(self, X, y):
# def load_ocr_letters(fold_id=0):
# def __load_gz_pickle_file(file_name):
# def load_camps_dataset():
# def load_bpps_dataset():
# def __load_peptide_dataset(file_name):
# def __load_pickle_file(file_name):
# def load_amino_acids_and_descriptors(file_name=AminoAcidFile.blosum62_natural):
#     X = numpy.array(data['X'], dtype=numpy.str)


import numpy
import unittest2
from preimage.datasets import loader
__author__ = 'amelie'




# This is just to ensure the pickle files were made correctly
# (not real unit testing since we use the real .pickle files)
class TestLoader(unittest2.TestCase):
    def setUp(self):
        self.ocr_n_examples_in_fold = [626, 704, 684, 698, 693, 651, 739, 717, 690, 675]
        self.ocr_n_examples_not_in_fold = [6251, 6173, 6193, 6179, 6184, 6226, 6138, 6160, 6187, 6202]
        self.camps_n_examples = 101
        self.bpps_n_examples = 31
        self.amino_acids = ['A', 'B', 'C']
        self.amino_acid_descriptors = [[4, -1, -2], [-1,  5,  0], [-2,  0,  6]]
        self.amino_acid_file = 'AA.example.dat'

    def test_load_ocr_letters_has_correct_number_of_x_in_fold(self):
        for fold_id in range(10):
            with self.subTest(fold_id=fold_id):

# Path: preimage/datasets/loader.py
# class StructuredOutputDataset:
# class StandardDataset:
#     def __init__(self, X, Y):
#     def __init__(self, X, y):
# def load_ocr_letters(fold_id=0):
# def __load_gz_pickle_file(file_name):
# def load_camps_dataset():
# def load_bpps_dataset():
# def __load_peptide_dataset(file_name):
# def __load_pickle_file(file_name):
# def load_amino_acids_and_descriptors(file_name=AminoAcidFile.blosum62_natural):
#     X = numpy.array(data['X'], dtype=numpy.str)


# Path: preimage/tests/datasets/test_loader.py
import numpy
import unittest2
from preimage.datasets import loader

__author__ = 'amelie'




# This is just to ensure the pickle files were made correctly
# (not real unit testing since we use the real .pickle files)
class TestLoader(unittest2.TestCase):
    def setUp(self):
        self.ocr_n_examples_in_fold = [626, 704, 684, 698, 693, 651, 739, 717, 690, 675]
        self.ocr_n_examples_not_in_fold = [6251, 6173, 6193, 6179, 6184, 6226, 6138, 6160, 6187, 6202]
        self.camps_n_examples = 101
        self.bpps_n_examples = 31
        self.amino_acids = ['A', 'B', 'C']
        self.amino_acid_descriptors = [[4, -1, -2], [-1,  5,  0], [-2,  0,  6]]
        self.amino_acid_file = 'AA.example.dat'

    def test_load_ocr_letters_has_correct_number_of_x_in_fold(self):
        for fold_id in range(10):
            with self.subTest(fold_id=fold_id):

                train_dataset, test_dataset = loader.load_ocr_letters(fold_id)