# Path: sumatra/core.py
# def component(cls):
#     """Class decorator to define Sumatra components.
# 
#     Use this decorator to declare a class as a Sumatra component. It can then be used
#     by Sumatra.
#     """
#     _Registry().register(cls)
#     return cls
# 
# def component_type(cls):
#     """Class decorator to define base types for components.
# 
#     Use this decorator to register a base type of a Sumatra component. Concrete components
#     should subclass from this component type to then be registered as a Sumatra component.
# 
#     Not to be used when writing Sumatra plug-ins! For that, please use the `component`
#     decorator.
# 
#     Example:
#     @component_type
#     class MyComponentBase(object):
#         pass
# 
#     @component
#     class MyConcreteComponent(MyComponentBase):
#         pass
#     """
#     for base_type in _Registry().components:
#         if issubclass(cls, base_type):
#             msg = "{cls} is a subclass of already registered component type {base} and " \
#                   "hence could not be registered as component type." \
#                   .format(**{'cls': cls, 'base': base_type})
#             raise TypeError(msg)
#     _Registry().add_component_type(cls)
#     return cls
# 
# def get_registered_components(base_type):
#     """Returns all registered components for the given component base type."""
#     return _Registry().components[base_type]
# 
# def conditional_component(condition):
#     """Class decorator to define Sumatra components based on a condition.
# 
#     Similar to `component`, this decorator can be used to declare a class as a Sumatra
#     component. In addition to the former, a condition defines whether that component
#     will be used by Sumatra or not.
# 
#     Example:
#     try:
#         import NumPy
#     except ImportError:
#         have_numpy = False
#     else:
#         have_numpy = True
# 
#     @conditional_component(condition=have_numpy)
#     class MyNumPyComponent(MyNumPyComponentBase):
#         pass
#     """
#     if condition is True:
#         return component
#     else:
#         return lambda cls: cls  # identity function, do nothing


from future import standard_library
from builtins import str
from builtins import object
from itertools import filterfalse
from pathlib import Path
    from StringIO import StringIO # this is necessary because Python2-ConfigParser can't handle unicode
    from io import StringIO
from future.utils import with_metaclass
from configparser import SafeConfigParser, MissingSectionHeaderError, NoOptionError
from .core import component, component_type, get_registered_components, conditional_component
import os.path
import shutil
import abc
import re
import json
    import yaml
import parameters
            for name, value in E:
                _update(name, value)
        for name, value in F.items():
            _update(name, value)
    update.__doc__ = dict.update.__doc__

    def pop(self, name, d=POP_NONE):
        if "." in name:
            section, option = name.split(".")
            try:
                value = self.get(section, option)
                self.remove_option(section, option)
            except NoOptionError:
                if d is not POP_NONE:
                    value = d
                else:
                    raise KeyError('name')
            return value
        elif self.has_option("sumatra", name):
            value = self.get("sumatra", name)
            self.remove_option("sumatra", name)
        # should we allow popping an entire section?
        else:
            value = d
        return value

    def _new_param_check(self, name, value):
        raise ValueError("Config file: parameter name checking not implemented!")



# Path: sumatra/core.py
# def component(cls):
#     """Class decorator to define Sumatra components.
# 
#     Use this decorator to declare a class as a Sumatra component. It can then be used
#     by Sumatra.
#     """
#     _Registry().register(cls)
#     return cls
# 
# def component_type(cls):
#     """Class decorator to define base types for components.
# 
#     Use this decorator to register a base type of a Sumatra component. Concrete components
#     should subclass from this component type to then be registered as a Sumatra component.
# 
#     Not to be used when writing Sumatra plug-ins! For that, please use the `component`
#     decorator.
# 
#     Example:
#     @component_type
#     class MyComponentBase(object):
#         pass
# 
#     @component
#     class MyConcreteComponent(MyComponentBase):
#         pass
#     """
#     for base_type in _Registry().components:
#         if issubclass(cls, base_type):
#             msg = "{cls} is a subclass of already registered component type {base} and " \
#                   "hence could not be registered as component type." \
#                   .format(**{'cls': cls, 'base': base_type})
#             raise TypeError(msg)
#     _Registry().add_component_type(cls)
#     return cls
# 
# def get_registered_components(base_type):
#     """Returns all registered components for the given component base type."""
#     return _Registry().components[base_type]
# 
# def conditional_component(condition):
#     """Class decorator to define Sumatra components based on a condition.
# 
#     Similar to `component`, this decorator can be used to declare a class as a Sumatra
#     component. In addition to the former, a condition defines whether that component
#     will be used by Sumatra or not.
# 
#     Example:
#     try:
#         import NumPy
#     except ImportError:
#         have_numpy = False
#     else:
#         have_numpy = True
# 
#     @conditional_component(condition=have_numpy)
#     class MyNumPyComponent(MyNumPyComponentBase):
#         pass
#     """
#     if condition is True:
#         return component
#     else:
#         return lambda cls: cls  # identity function, do nothing


# Path: sumatra/parameters.py
from future import standard_library
from builtins import str
from builtins import object
from itertools import filterfalse
from pathlib import Path
    from StringIO import StringIO # this is necessary because Python2-ConfigParser can't handle unicode
    from io import StringIO
from future.utils import with_metaclass
from configparser import SafeConfigParser, MissingSectionHeaderError, NoOptionError
from .core import component, component_type, get_registered_components, conditional_component
import os.path
import shutil
import abc
import re
import json
    import yaml
import parameters

            for name, value in E:
                _update(name, value)
        for name, value in F.items():
            _update(name, value)
    update.__doc__ = dict.update.__doc__

    def pop(self, name, d=POP_NONE):
        if "." in name:
            section, option = name.split(".")
            try:
                value = self.get(section, option)
                self.remove_option(section, option)
            except NoOptionError:
                if d is not POP_NONE:
                    value = d
                else:
                    raise KeyError('name')
            return value
        elif self.has_option("sumatra", name):
            value = self.get("sumatra", name)
            self.remove_option("sumatra", name)
        # should we allow popping an entire section?
        else:
            value = d
        return value

    def _new_param_check(self, name, value):
        raise ValueError("Config file: parameter name checking not implemented!")



@component