src/pybel/parser/parse_metadata.py
def ensure_resources(self):
        """Load all namespaces/annotations that have been encountered so far during parsing."""
        if self.skip_validation:
            return

        if self.namespace_url_dict:
            keywords, urls = zip(*self.namespace_url_dict.items())
            namespaces = self.manager._ensure_namespace_urls(urls)
            for keyword, namespace in zip(keywords, namespaces):
                self.namespace_to_term_to_encoding[keyword] = namespace.get_term_to_encodings()

        if self.annotation_url_dict:
            keywords, urls = zip(*self.annotation_url_dict.items())
            namespaces = self.manager._ensure_namespace_urls(urls, is_annotation=True)
            for keyword, namespace in zip(keywords, namespaces):
                self.annotation_to_term[keyword] = {entry.name for entry in namespace.entries}
Load all namespaces/annotations that have been encountered so far during parsing.
Load all namespaces/annotations that have been encountered so far during parsing.
Load all namespaces / annotations that have been encountered so far during parsing .
def ensure_resources(self):
        if self.skip_validation:
            return
        if self.namespace_url_dict:
            keywords, urls = zip(*self.namespace_url_dict.items())
            namespaces = self.manager._ensure_namespace_urls(urls)
            for keyword, namespace in zip(keywords, namespaces):
                self.namespace_to_term_to_encoding[keyword] = namespace.get_term_to_encodings()
        if self.annotation_url_dict:
            keywords, urls = zip(*self.annotation_url_dict.items())
            namespaces = self.manager._ensure_namespace_urls(urls, is_annotation=True)
            for keyword, namespace in zip(keywords, namespaces):
                self.annotation_to_term[keyword] = {entry.name for entry in namespace.entries}
def ensure_resources ( self ) : if self . skip_validation : return if self . namespace_url_dict : keywords , urls = zip ( * self . namespace_url_dict . items ( ) ) namespaces = self . manager . _ensure_namespace_urls ( urls ) for keyword , namespace in zip ( keywords , namespaces ) : self . namespace_to_term_to_encoding [ keyword ] = namespace . get_term_to_encodings ( ) if self . annotation_url_dict : keywords , urls = zip ( * self . annotation_url_dict . items ( ) ) namespaces = self . manager . _ensure_namespace_urls ( urls , is_annotation = True ) for keyword , namespace in zip ( keywords , namespaces ) : self . annotation_to_term [ keyword ] = { entry . name for entry in namespace . entries }
Load all namespaces/annotations that have been encountered so far during parsing.
Load all namespaces / annotations that have been encountered so far during parsing .
"""Load all namespaces/annotations that have been encountered so far during parsing."""
self