# Path: databuild/operator.py
# class Operator(object):
#     def __init__(self, workbook, settings=None):
#     def build_languages(self):
#     def apply_operations(self, build_files, *args, **kwargs):
#     def apply_operation(self, operation, build_file, context=None, echo=False):
#     def parse_expression(self, expression, build_file=None, context=None):


from databuild.operator import runtime_operations, runtime_tasks
from __future__ import absolute_import


def define_operation(context, name, operation, description=None, defaults=None):
    if defaults is None:
        defaults = {}
    runtime_operations[name] = (operation, description, defaults)


def define_task(context, name, operations, description=None, defaults=None):
    if defaults is None:
        defaults = {}
    runtime_tasks[name] = (operations, description, defaults)


def call_task(context, name, description=None, overrides=None):
    workbook = context['workbook']
    buildfile = context['buildfile']
    if overrides is None:
        overrides = {}


# Path: databuild/operator.py
# class Operator(object):
#     def __init__(self, workbook, settings=None):
#     def build_languages(self):
#     def apply_operations(self, build_files, *args, **kwargs):
#     def apply_operation(self, operation, build_file, context=None, echo=False):
#     def parse_expression(self, expression, build_file=None, context=None):


# Path: databuild/operations/operations.py
from databuild.operator import runtime_operations, runtime_tasks

from __future__ import absolute_import


def define_operation(context, name, operation, description=None, defaults=None):
    if defaults is None:
        defaults = {}
    runtime_operations[name] = (operation, description, defaults)


def define_task(context, name, operations, description=None, defaults=None):
    if defaults is None:
        defaults = {}
    runtime_tasks[name] = (operations, description, defaults)


def call_task(context, name, description=None, overrides=None):
    workbook = context['workbook']
    buildfile = context['buildfile']
    if overrides is None:
        overrides = {}


    operations, description, defaults = runtime_tasks[name]