Get / set internal object description.
435187
def description(self, *args):
        '''
        
        '''
        if len(args):
            self._str_desc = args[0]
        else:
            return self._str_desc
1228330
def set_object_info(self):
        
        self.attrs.pandas_type = str(self.pandas_kind)
        self.attrs.pandas_version = str(_version)
        self.set_version()
340003
async def detail(self, **kwargs):
        '''
        
        '''
        try:
            pk = self.pk_type(kwargs.get('pk'))
            obj = await self._meta.object_class.find_one(self.db, {self.pk: pk})
            if obj:
                return await obj.serialize()
            raise NotFound('Object matching the given {} with value {} was not found'.format(self.pk, str(pk)))
        except InvalidId:
            raise NotFound('Invalid ID')
218458
def record_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)
131693
def _get_object(data, position, obj_end, opts, dummy):
    """"""
    obj_size, end = _get_object_size(data, position, obj_end)
    if _raw_document_class(opts.document_class):
        return (opts.document_class(data[position:end + 1], opts),
                position + obj_size)

    obj = _elements_to_dict(data, position + 4, end, opts)

    position += obj_size
    if "$ref" in obj:
        return (DBRef(obj.pop("$ref"), obj.pop("$id", None),
                      obj.pop("$db", None), obj), position)
    return obj, position
336030
def named_object(name):
    """"""
    name_parts = name.split('.')
    module = named_module('.'.join(name_parts[:-1]))
    return getattr(module, name_parts[-1])
854995
def inspect_object(obj, refresh=True):
    
    if hasattr(obj, "inspect"):
        return obj.inspect(refresh=refresh)
    return obj.get_metadata(refresh=refresh)
1071089
def objref(obj):
    """"""
    ref = _objrefs.get(obj)
    if ref is None:
        clsname = obj.__class__.__name__.split('.')[-1]
        seqno = _lastids.setdefault(clsname, 1)
        ref = '{}-{}'.format(clsname, seqno)
        _objrefs[obj] = ref
        _lastids[clsname] += 1
    return ref
1038160
def _get_description(prev_description):
    """"""
    current_desc_file = os.path.join(utils.get_project_root(),
                                     prev_description['data-source'],
                                     "info.yml")
    if not os.path.isfile(current_desc_file):
        logging.error("You are probably not in the folder of a model, because "
                      "%s is not a file.", current_desc_file)
        sys.exit(-1)
    with open(current_desc_file, 'r') as ymlfile:
        current_description = yaml.load(ymlfile)
    return current_description
640474
def get_description(self):
        '''
        
        '''
        return '%(description)s listening on %(host)s:%(port)s' % {
            'description': super(WebInterface, self).get_description(),
            'host': self._host,
            'port': self._port
        }
1266738
def file_set_details(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/setDetails' % object_id, input_params, always_retry=always_retry, **kwargs)
563703
def get_value(cls, object_version, key):
        """"""
        obj = cls.get(object_version, key)
        return obj.value if obj else None
559447
def container_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)
859659
def objects_to_record(self):
        """"""

        o = self.get_object()

        o.about = self._bundle.metadata.about
        o.identity = self._dataset.identity.ident_dict
        o.names = self._dataset.identity.names_dict
        o.contacts = self._bundle.metadata.contacts

        self.set_object(o)
111149
def _structure_set(self, obj, cl):
        """"""
        if is_bare(cl) or cl.__args__[0] is Any:
            return set(obj)
        else:
            elem_type = cl.__args__[0]
            return {
                self._structure_func.dispatch(elem_type)(e, elem_type)
                for e in obj
            }
762047
def _description(self):
        """"""

        inst = self.timemachine.presently

        if self.action_type == "dl":
            return "Deleted %s" % inst.content_type.name
        elif self.action_type == "cr":
            return "Created %s" % inst._object_type_html()
        else:
            return "Modified %s" % inst._object_type_html()
1034984
def details_dict(obj, existing, ignore_missing, opt):
    """"""
    existing = dict_unicodeize(existing)
    obj = dict_unicodeize(obj)
    for ex_k, ex_v in iteritems(existing):
        new_value = normalize_val(obj.get(ex_k))
        og_value = normalize_val(ex_v)
        if ex_k in obj and og_value != new_value:
            print(maybe_colored("-- %s: %s" % (ex_k, og_value),
                                'red', opt))
            print(maybe_colored("++ %s: %s" % (ex_k, new_value),
                                'green', opt))

        if (not ignore_missing) and (ex_k not in obj):
            print(maybe_colored("-- %s: %s" % (ex_k, og_value),
                                'red', opt))

    for ob_k, ob_v in iteritems(obj):
        val = normalize_val(ob_v)
        if ob_k not in existing:
            print(maybe_colored("++ %s: %s" % (ob_k, val),
                                'green', opt))

    return