# Path: datapackage_pipelines/specs/errors.py
# class SpecError(NamedTuple):
#     short_msg: str
#     long_msg: str
# 
#     def __str__(self):
#         return '{}: {}'.format(self.short_msg, self.long_msg)


import logging
import os
import hashlib
import sys
from importlib.util import find_spec
from importlib import import_module
from .errors import SpecError
        if path not in sys.path:
            sys.path.append(path)
        m = import_module(flow)
        flow_py_file = m.__file__
        parameters['__flow_hash'] = hashlib.md5(open(flow_py_file, 'rb').read()).hexdigest()

    executor = step['run']
    back_up, parts = convert_dot_notation(executor)
    resolvers = [find_file_in_path([path])]
    if not back_up:
        if len(parts) > 1:
            module_name = parts[0]
            module = load_module(module_name)
            if module is not None:
                module = list(module.__path__)[0]
                resolvers.append(find_file_in_path([module, 'processors'], 1))

        resolvers.extend([
            find_file_in_path([path_])
            for path_ in processor_path()
        ])
        resolvers.append(find_file_in_path([os.path.dirname(__file__),
                                            '..', 'lib']))

    for resolver in resolvers:
        location = resolver(parts)
        if location is not None:
            return location

    message = "Couldn't resolve {0} at {1}".format(executor, path)

# Path: datapackage_pipelines/specs/errors.py
# class SpecError(NamedTuple):
#     short_msg: str
#     long_msg: str
# 
#     def __str__(self):
#         return '{}: {}'.format(self.short_msg, self.long_msg)


# Path: datapackage_pipelines/specs/resolver.py
import logging
import os
import hashlib
import sys
from importlib.util import find_spec
from importlib import import_module
from .errors import SpecError

        if path not in sys.path:
            sys.path.append(path)
        m = import_module(flow)
        flow_py_file = m.__file__
        parameters['__flow_hash'] = hashlib.md5(open(flow_py_file, 'rb').read()).hexdigest()

    executor = step['run']
    back_up, parts = convert_dot_notation(executor)
    resolvers = [find_file_in_path([path])]
    if not back_up:
        if len(parts) > 1:
            module_name = parts[0]
            module = load_module(module_name)
            if module is not None:
                module = list(module.__path__)[0]
                resolvers.append(find_file_in_path([module, 'processors'], 1))

        resolvers.extend([
            find_file_in_path([path_])
            for path_ in processor_path()
        ])
        resolvers.append(find_file_in_path([os.path.dirname(__file__),
                                            '..', 'lib']))

    for resolver in resolvers:
        location = resolver(parts)
        if location is not None:
            return location

    message = "Couldn't resolve {0} at {1}".format(executor, path)

    errors.append(SpecError('Unresolved processor', message))