# Path: chirp/library/artists.py
# _LIBRARY_DATA_PREFIX = os.path.join(ROOT_DIR, "library", "data")
# _WHITELIST_FILE = os.path.join(_LIBRARY_DATA_PREFIX, "artist-whitelist")
# _MAPPINGS_FILE = os.path.join(_LIBRARY_DATA_PREFIX, "artist-mappings")
# _MAPPINGS_SEP = u"\xbb\xbb\xbb"
# _BASE_SPLIT_PATTERN = (
#     r"\s*((feat\.?)|(ft\.)|(featuring)|(with)|(w/)|(and)|(&))"
#     r"\s+(?P<feat>.*)")
# _SPLIT_RES = [
#     re.compile(r"%s%s%s" % (a, _BASE_SPLIT_PATTERN, b), re.IGNORECASE)
#     for a, b in ((r"\(", r"\)"), (r"\[", r"\]"), ("", ""))]
#     MAX_DIST = 10
#     MAX_NORM_DIST = 0.25
# def all():
# def sort_key(artist_name):
# def _standardize_simple(artist_name, whitelist, mappings):
# def _standardize(artist_name, whitelist, mappings):
# def standardize(artist_name):
# def is_standardized(artist_name):
# def split(artist_name):
# def split_and_standardize(artist_name):
# def suggest(name):
# def _seq_to_whitelist(seq_of_names):
# def reset_artist_whitelist(seq_of_names):
# def _read_artist_whitelist_from_file(file_obj):
# def _read_artist_mappings_from_file(file_obj):
# def _init():
# def merge_whitelist_and_mappings(whitelist, raw_mappings):


import codecs
import cStringIO
import os
import sys
import unittest
from chirp.library import artists
#!/usr/bin/env python



TEST_WHITELIST = """
# A comment, followed by a blank line

Bob Dylan
The Fall
John Lee Hooker
Tom Petty & the Heartbreakers
"""

TEST_MAPPINGS = """
# A comment, followed by a blank line

John Hooker SEP John Lee Hooker
Tom Petty and his heartbreakers SEP Tom Petty & the Heartbreakers

# Path: chirp/library/artists.py
# _LIBRARY_DATA_PREFIX = os.path.join(ROOT_DIR, "library", "data")
# _WHITELIST_FILE = os.path.join(_LIBRARY_DATA_PREFIX, "artist-whitelist")
# _MAPPINGS_FILE = os.path.join(_LIBRARY_DATA_PREFIX, "artist-mappings")
# _MAPPINGS_SEP = u"\xbb\xbb\xbb"
# _BASE_SPLIT_PATTERN = (
#     r"\s*((feat\.?)|(ft\.)|(featuring)|(with)|(w/)|(and)|(&))"
#     r"\s+(?P<feat>.*)")
# _SPLIT_RES = [
#     re.compile(r"%s%s%s" % (a, _BASE_SPLIT_PATTERN, b), re.IGNORECASE)
#     for a, b in ((r"\(", r"\)"), (r"\[", r"\]"), ("", ""))]
#     MAX_DIST = 10
#     MAX_NORM_DIST = 0.25
# def all():
# def sort_key(artist_name):
# def _standardize_simple(artist_name, whitelist, mappings):
# def _standardize(artist_name, whitelist, mappings):
# def standardize(artist_name):
# def is_standardized(artist_name):
# def split(artist_name):
# def split_and_standardize(artist_name):
# def suggest(name):
# def _seq_to_whitelist(seq_of_names):
# def reset_artist_whitelist(seq_of_names):
# def _read_artist_whitelist_from_file(file_obj):
# def _read_artist_mappings_from_file(file_obj):
# def _init():
# def merge_whitelist_and_mappings(whitelist, raw_mappings):


# Path: chirp/library/artists_test.py
import codecs
import cStringIO
import os
import sys
import unittest
from chirp.library import artists

#!/usr/bin/env python



TEST_WHITELIST = """
# A comment, followed by a blank line

Bob Dylan
The Fall
John Lee Hooker
Tom Petty & the Heartbreakers
"""

TEST_MAPPINGS = """
# A comment, followed by a blank line

John Hooker SEP John Lee Hooker
Tom Petty and his heartbreakers SEP Tom Petty & the Heartbreakers

""".replace("SEP", artists._MAPPINGS_SEP)