# Path: recordlinkage/config.py
# class OptionError(AttributeError, KeyError):
# class DictWrapper(object):
# class CallableDynamicDoc(object):
# class option_context(object):
#     def lmap(*args, **kwargs):
#     def u(s):
#     def u(s):
# def _get_single_key(pat, silent):
# def _get_option(pat, silent=False):
# def _set_option(*args, **kwargs):
# def _describe_option(pat='', _print_desc=True):
# def _reset_option(pat, silent=False):
# def get_default_val(pat):
#     def __init__(self, d, prefix=""):
#     def __setattr__(self, key, val):
#     def __getattr__(self, key):
#     def __dir__(self):
#     def __init__(self, func, doc_tmpl):
#     def __call__(self, *args, **kwds):
#     def __doc__(self):
#     def __init__(self, *args):
#     def __enter__(self):
#     def __exit__(self, *args):
# def register_option(key, defval, doc='', validator=None, cb=None):
# def deprecate_option(key, msg=None, rkey=None, removal_ver=None):
# def _select_options(pat):
# def _get_root(key):
# def _is_deprecated(key):
# def _get_deprecated_option(key):
# def _get_registered_option(key):
# def _translate_key(key):
# def _warn_if_deprecated(key):
# def _build_option_description(k):
# def pp_options_list(keys, width=80, _print=False):
#     def pp(name, ks):
# def config_prefix(prefix):
#     def wrap(func):
#         def inner(key, *args, **kwds):
# def is_type_factory(_type):
#     def inner(x):
# def is_instance_factory(_type):
#     def inner(x):
# def is_one_of_factory(legal_values):
#     def inner(x):
# def is_callable(obj):


import recordlinkage.config as cf
from recordlinkage.config import (get_default_val, is_bool, is_callable,
                                  is_instance_factory, is_int,
                                  is_one_of_factory, is_text
                                  )
: str
    Specify the format how record pairs are stored. By default, record
    pairs generated by the toolkit are returned in a
    pandas.MultiIndex object ('multiindex' option).

    Valid values: 'multiindex'
"""

classification_return_type_doc = """
: str
    The format of the classification result. The value 'index' returns the
    classification result as a pandas.MultiIndex. The MultiIndex contains
    the predicted matching record pairs. The value 'series' returns a
    pandas.Series with zeros (distinct) and ones (matches). The argument
    value 'array' will return a numpy.ndarray with zeros and ones.

"""

with cf.config_prefix('indexing'):
    cf.register_option(
        'pairs',
        'multiindex',
        pairs_type_doc,
        validator=is_one_of_factory(['multiindex']))

with cf.config_prefix('classification'):
    cf.register_option(
        'return_type',
        'index',
        classification_return_type_doc,

# Path: recordlinkage/config.py
# class OptionError(AttributeError, KeyError):
# class DictWrapper(object):
# class CallableDynamicDoc(object):
# class option_context(object):
#     def lmap(*args, **kwargs):
#     def u(s):
#     def u(s):
# def _get_single_key(pat, silent):
# def _get_option(pat, silent=False):
# def _set_option(*args, **kwargs):
# def _describe_option(pat='', _print_desc=True):
# def _reset_option(pat, silent=False):
# def get_default_val(pat):
#     def __init__(self, d, prefix=""):
#     def __setattr__(self, key, val):
#     def __getattr__(self, key):
#     def __dir__(self):
#     def __init__(self, func, doc_tmpl):
#     def __call__(self, *args, **kwds):
#     def __doc__(self):
#     def __init__(self, *args):
#     def __enter__(self):
#     def __exit__(self, *args):
# def register_option(key, defval, doc='', validator=None, cb=None):
# def deprecate_option(key, msg=None, rkey=None, removal_ver=None):
# def _select_options(pat):
# def _get_root(key):
# def _is_deprecated(key):
# def _get_deprecated_option(key):
# def _get_registered_option(key):
# def _translate_key(key):
# def _warn_if_deprecated(key):
# def _build_option_description(k):
# def pp_options_list(keys, width=80, _print=False):
#     def pp(name, ks):
# def config_prefix(prefix):
#     def wrap(func):
#         def inner(key, *args, **kwds):
# def is_type_factory(_type):
#     def inner(x):
# def is_instance_factory(_type):
#     def inner(x):
# def is_one_of_factory(legal_values):
#     def inner(x):
# def is_callable(obj):


# Path: recordlinkage/config_init.py
import recordlinkage.config as cf
from recordlinkage.config import (get_default_val, is_bool, is_callable,
                                  is_instance_factory, is_int,
                                  is_one_of_factory, is_text
                                  )

: str
    Specify the format how record pairs are stored. By default, record
    pairs generated by the toolkit are returned in a
    pandas.MultiIndex object ('multiindex' option).

    Valid values: 'multiindex'
"""

classification_return_type_doc = """
: str
    The format of the classification result. The value 'index' returns the
    classification result as a pandas.MultiIndex. The MultiIndex contains
    the predicted matching record pairs. The value 'series' returns a
    pandas.Series with zeros (distinct) and ones (matches). The argument
    value 'array' will return a numpy.ndarray with zeros and ones.

"""

with cf.config_prefix('indexing'):
    cf.register_option(
        'pairs',
        'multiindex',
        pairs_type_doc,
        validator=is_one_of_factory(['multiindex']))

with cf.config_prefix('classification'):
    cf.register_option(
        'return_type',
        'index',
        classification_return_type_doc,

        validator=is_one_of_factory(['index', 'series', 'array']))