# Path: pylink/tagged_attribute.py
# class TaggedAttribute(object):
#     """Simple container object to tag values with attributes.
# 
#     Feel free to initialize any node with a TA instead of its actual
#     value only and it will then have the desired metadata.  For example:
# 
#     from pylink import TaggedAttribute as TA
#     tx_power = TA(2,
#                   part_number='234x',
#                   test_report='http://reports.co/234x')
#     m = DAGModel([pylink.Transmitter(tx_power_at_pa_dbw=tx_power)])
#     """
# 
#     def __init__(self, value, **kwargs):
#         self.meta = kwargs
#         self.value = value


import inspect
import math
import os
import pprint
import re
import sys
import tempfile
import traceback
import pylink.utils as utils
from pylink.tagged_attribute import TaggedAttribute
            names += mod.tribute.keys()
        names.extend(extras.keys())
        self.enum = utils.sequential_enum(*names)

        # associate names to nodes
        (self._names, self._nodes,) = utils.node_associations(self.enum)

        # merge the contributions
        self._calc = {}
        self._values = {}
        self._meta = {}
        tributes = [m.tribute for m in contrib]
        tributes.append(extras)
        for t in tributes:
            self.accept_tribute(t)

        # Record the calculation stack for dependency tracking
        self._stack = []

        self._init_cache()

        # We start with an empty dependency tree and update as able
        self._deps = {}
        self._map_dependencies()

    def accept_tribute(self, t):
        for name, v, in t.items():
            node = self._nodes[name]
            if hasattr(v, '__call__'):
                self._calc[node] = v

# Path: pylink/tagged_attribute.py
# class TaggedAttribute(object):
#     """Simple container object to tag values with attributes.
# 
#     Feel free to initialize any node with a TA instead of its actual
#     value only and it will then have the desired metadata.  For example:
# 
#     from pylink import TaggedAttribute as TA
#     tx_power = TA(2,
#                   part_number='234x',
#                   test_report='http://reports.co/234x')
#     m = DAGModel([pylink.Transmitter(tx_power_at_pa_dbw=tx_power)])
#     """
# 
#     def __init__(self, value, **kwargs):
#         self.meta = kwargs
#         self.value = value


# Path: pylink/model.py
import inspect
import math
import os
import pprint
import re
import sys
import tempfile
import traceback
import pylink.utils as utils
from pylink.tagged_attribute import TaggedAttribute

            names += mod.tribute.keys()
        names.extend(extras.keys())
        self.enum = utils.sequential_enum(*names)

        # associate names to nodes
        (self._names, self._nodes,) = utils.node_associations(self.enum)

        # merge the contributions
        self._calc = {}
        self._values = {}
        self._meta = {}
        tributes = [m.tribute for m in contrib]
        tributes.append(extras)
        for t in tributes:
            self.accept_tribute(t)

        # Record the calculation stack for dependency tracking
        self._stack = []

        self._init_cache()

        # We start with an empty dependency tree and update as able
        self._deps = {}
        self._map_dependencies()

    def accept_tribute(self, t):
        for name, v, in t.items():
            node = self._nodes[name]
            if hasattr(v, '__call__'):
                self._calc[node] = v

            elif isinstance(v, TaggedAttribute):