# Path: msaf/features.py
# class CQT(Features):
# class MFCC(Features):
# class PCP(Features):
# class Tonnetz(Features):
# class Tempogram(Features):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.cqt.bins,
#                  norm=config.cqt.norm, filter_scale=config.cqt.filter_scale,
#                  ref_power=config.cqt.ref_power):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_fft=config.n_fft,
#                  n_mels=config.mfcc.n_mels, n_mfcc=config.mfcc.n_mfcc,
#                  ref_power=config.mfcc.ref_power):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.pcp.bins,
#                  norm=config.pcp.norm, f_min=config.pcp.f_min,
#                  n_octaves=config.pcp.n_octaves):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.tonnetz.bins,
#                  norm=config.tonnetz.norm, f_min=config.tonnetz.f_min,
#                  n_octaves=config.tonnetz.n_octaves):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size,
#                  win_length=config.tempogram.win_length):
#     def get_id(self):
#     def compute_features(self):
#         S = librosa.feature.melspectrogram(self._audio,
#                                            sr=self.sr,
#                                            n_fft=self.n_fft,
#                                            hop_length=self.hop_length,
#                                            n_mels=self.n_mels)
# 
# Path: msaf/exceptions.py
# class NoHierBoundaryError(MSAFError):
#     '''Exception class for missing hierarchical boundary algorithm'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


import matplotlib
import matplotlib.style
import numpy.testing as npt
import os
import msaf
from mpl_ic import image_comparison
from nose.tools import assert_raises
from nose.tools import raises
from types import ModuleType
from msaf.features import Features
from msaf.exceptions import (NoHierBoundaryError, FeaturesNotFound,
                             NoAudioFileError)
    # Combining boundaries with labels
    for bound_id in bound_ids:
        if bound_id == "gt":
            continue
        for label_id in label_ids:
            yield (_test_run_msaf, bound_id, label_id, False)

    # Test the hierarchical algorithms
    hier_ids = ["olda", "scluster"]
    for hier_bounds_id in hier_ids:
        for hier_labels_id in hier_ids:
            if hier_labels_id == "olda":
                hier_labels_id = "fmc2d"
            yield (_test_run_msaf, hier_bounds_id, hier_labels_id, True)


@raises(NoHierBoundaryError)
def test_no_bound_hierarchical():
    msaf.run.run_hierarchical(None, None, None, None, None)


def test_no_gt_flat_bounds():
    """Make sure the results are empty if there is not ground truth found."""
    feature = "pcp"
    annot_beats = False
    framesync = False
    file_struct = msaf.io.FileStruct(audio_file)
    file_struct.features_file = msaf.config.features_tmp_file

    config = {}

# Path: msaf/features.py
# class CQT(Features):
# class MFCC(Features):
# class PCP(Features):
# class Tonnetz(Features):
# class Tempogram(Features):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.cqt.bins,
#                  norm=config.cqt.norm, filter_scale=config.cqt.filter_scale,
#                  ref_power=config.cqt.ref_power):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_fft=config.n_fft,
#                  n_mels=config.mfcc.n_mels, n_mfcc=config.mfcc.n_mfcc,
#                  ref_power=config.mfcc.ref_power):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.pcp.bins,
#                  norm=config.pcp.norm, f_min=config.pcp.f_min,
#                  n_octaves=config.pcp.n_octaves):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size, n_bins=config.tonnetz.bins,
#                  norm=config.tonnetz.norm, f_min=config.tonnetz.f_min,
#                  n_octaves=config.tonnetz.n_octaves):
#     def get_id(self):
#     def compute_features(self):
#     def __init__(self, file_struct, feat_type, sr=config.sample_rate,
#                  hop_length=config.hop_size,
#                  win_length=config.tempogram.win_length):
#     def get_id(self):
#     def compute_features(self):
#         S = librosa.feature.melspectrogram(self._audio,
#                                            sr=self.sr,
#                                            n_fft=self.n_fft,
#                                            hop_length=self.hop_length,
#                                            n_mels=self.n_mels)
# 
# Path: msaf/exceptions.py
# class NoHierBoundaryError(MSAFError):
#     '''Exception class for missing hierarchical boundary algorithm'''
#     pass
# 
# class FeaturesNotFound(MSAFError):
#     '''Exception class for missing specific features in a file'''
#     pass
# 
# class NoAudioFileError(MSAFError):
#     '''Exception class for audio file not found'''
#     pass


# Path: tests/test_run.py
import matplotlib
import matplotlib.style
import numpy.testing as npt
import os
import msaf
from mpl_ic import image_comparison
from nose.tools import assert_raises
from nose.tools import raises
from types import ModuleType
from msaf.features import Features
from msaf.exceptions import (NoHierBoundaryError, FeaturesNotFound,
                             NoAudioFileError)

    # Combining boundaries with labels
    for bound_id in bound_ids:
        if bound_id == "gt":
            continue
        for label_id in label_ids:
            yield (_test_run_msaf, bound_id, label_id, False)

    # Test the hierarchical algorithms
    hier_ids = ["olda", "scluster"]
    for hier_bounds_id in hier_ids:
        for hier_labels_id in hier_ids:
            if hier_labels_id == "olda":
                hier_labels_id = "fmc2d"
            yield (_test_run_msaf, hier_bounds_id, hier_labels_id, True)


@raises(NoHierBoundaryError)
def test_no_bound_hierarchical():
    msaf.run.run_hierarchical(None, None, None, None, None)


def test_no_gt_flat_bounds():
    """Make sure the results are empty if there is not ground truth found."""
    feature = "pcp"
    annot_beats = False
    framesync = False
    file_struct = msaf.io.FileStruct(audio_file)
    file_struct.features_file = msaf.config.features_tmp_file

    config = {}

    config["features"] = Features.select_features(