src/pybel/manager/cache_manager.py
def _iter_from_annotations_dict(
        graph: BELGraph,
        annotations_dict: AnnotationsDict,
    ) -> Iterable[Tuple[str, Set[Entity]]]:
        """Iterate over the key/value pairs in this edge data dictionary normalized to their source URLs."""
        for key, entities in annotations_dict.items():
            if key in graph.annotation_url:
                url = graph.annotation_url[key]
            elif key in graph.annotation_list:
                continue  # skip those
            elif key in graph.annotation_pattern:
                logger.debug('pattern annotation in database not implemented yet not implemented')  # FIXME
                continue
            else:
                raise ValueError('Graph resources does not contain keyword: {}'.format(key))

            yield url, set(entities)
Iterate over the key/value pairs in this edge data dictionary normalized to their source URLs.
Iterate over the key/value pairs in this edge data dictionary normalized to their source URLs.
Iterate over the key / value pairs in this edge data dictionary normalized to their source URLs .
def _iter_from_annotations_dict(
        graph: BELGraph,
        annotations_dict: AnnotationsDict,
    ) -> Iterable[Tuple[str, Set[Entity]]]:
        for key, entities in annotations_dict.items():
            if key in graph.annotation_url:
                url = graph.annotation_url[key]
            elif key in graph.annotation_list:
                continue  
            elif key in graph.annotation_pattern:
                logger.debug('pattern annotation in database not implemented yet not implemented')  
                continue
            else:
                raise ValueError('Graph resources does not contain keyword: {}'.format(key))
            yield url, set(entities)
def _iter_from_annotations_dict ( graph : BELGraph , annotations_dict : AnnotationsDict , ) -> Iterable [ Tuple [ str , Set [ Entity ] ] ] : for key , entities in annotations_dict . items ( ) : if key in graph . annotation_url : url = graph . annotation_url [ key ] elif key in graph . annotation_list : continue elif key in graph . annotation_pattern : logger . debug ( 'pattern annotation in database not implemented yet not implemented' ) continue else : raise ValueError ( 'Graph resources does not contain keyword: {}' . format ( key ) ) yield url , set ( entities )
Iterate over the key/value pairs in this edge data dictionary normalized to their source URLs.
Iterate over the key / value pairs in this edge data dictionary normalized to their source URLs .
"""Iterate over the key/value pairs in this edge data dictionary normalized to their source URLs.""" # skip those # FIXME
graph
BELGraph
annotations_dict
AnnotationsDict