# 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)
#!/usr/bin/env python
#
# Run me as follows:
# cd tests/
# nosetests

# For plotting and testing
from __future__ import print_function
matplotlib.use('Agg')
matplotlib.rcParams.update(matplotlib.rcParamsDefault)
matplotlib.style.use('seaborn-ticks')



# Msaf imports


# Global vars
audio_file = os.path.join("fixtures", "chirp.mp3")
long_audio_file = os.path.join("fixtures", "Sargon_test", "audio",
                               "Mindless_cut.mp3")
fake_module_name = "fake_name_module"


def test_get_boundaries_module():
    # Check that it returns modules for all the existing MSAF boundaries algos

# 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)

#!/usr/bin/env python
#
# Run me as follows:
# cd tests/
# nosetests

# For plotting and testing
from __future__ import print_function
matplotlib.use('Agg')
matplotlib.rcParams.update(matplotlib.rcParamsDefault)
matplotlib.style.use('seaborn-ticks')



# Msaf imports


# Global vars
audio_file = os.path.join("fixtures", "chirp.mp3")
long_audio_file = os.path.join("fixtures", "Sargon_test", "audio",
                               "Mindless_cut.mp3")
fake_module_name = "fake_name_module"


def test_get_boundaries_module():
    # Check that it returns modules for all the existing MSAF boundaries algos

    bound_ids = msaf.io.get_all_boundary_algorithms()