# Path: sacred/utils.py
# def iter_prefixes(path):
#     """
#     Iterate through all (non-empty) prefixes of a dotted path.
# 
#     Example
#     -------
#     >>> list(iter_prefixes('foo.bar.baz'))
#     ['foo', 'foo.bar', 'foo.bar.baz']
#     """
#     split_path = path.split(".")
#     for i in range(1, len(split_path) + 1):
#         yield join_paths(*split_path[:i])
# 
# def join_paths(*parts):
#     """Join different parts together to a valid dotted path."""
#     return ".".join(str(p).strip(".") for p in parts if p)


from sacred.utils import iter_prefixes, join_paths
#!/usr/bin/env python
# coding=utf-8



class ConfigSummary(dict):
    def __init__(
        self, added=(), modified=(), typechanged=(), ignored_fallbacks=(), docs=()
    ):
        super().__init__()
        self.added = set(added)
        self.modified = set(modified)  # TODO: test for this member
        self.typechanged = dict(typechanged)
        self.ignored_fallbacks = set(ignored_fallbacks)  # TODO: test
        self.docs = dict(docs)
        self.ensure_coherence()

    def update_from(self, config_mod, path=""):
        added = config_mod.added
        updated = config_mod.modified
        typechanged = config_mod.typechanged
        self.added &= {join_paths(path, a) for a in added}
        self.modified |= {join_paths(path, u) for u in updated}
        self.typechanged.update(

# Path: sacred/utils.py
# def iter_prefixes(path):
#     """
#     Iterate through all (non-empty) prefixes of a dotted path.
# 
#     Example
#     -------
#     >>> list(iter_prefixes('foo.bar.baz'))
#     ['foo', 'foo.bar', 'foo.bar.baz']
#     """
#     split_path = path.split(".")
#     for i in range(1, len(split_path) + 1):
#         yield join_paths(*split_path[:i])
# 
# def join_paths(*parts):
#     """Join different parts together to a valid dotted path."""
#     return ".".join(str(p).strip(".") for p in parts if p)


# Path: sacred/config/config_summary.py
from sacred.utils import iter_prefixes, join_paths

#!/usr/bin/env python
# coding=utf-8



class ConfigSummary(dict):
    def __init__(
        self, added=(), modified=(), typechanged=(), ignored_fallbacks=(), docs=()
    ):
        super().__init__()
        self.added = set(added)
        self.modified = set(modified)  # TODO: test for this member
        self.typechanged = dict(typechanged)
        self.ignored_fallbacks = set(ignored_fallbacks)  # TODO: test
        self.docs = dict(docs)
        self.ensure_coherence()

    def update_from(self, config_mod, path=""):
        added = config_mod.added
        updated = config_mod.modified
        typechanged = config_mod.typechanged
        self.added &= {join_paths(path, a) for a in added}
        self.modified |= {join_paths(path, u) for u in updated}
        self.typechanged.update(

            {join_paths(path, k): v for k, v in typechanged.items()}