pybel / pybel-tools

A PyBEL extension for analyzing BEL graphs
http://pybel-tools.readthedocs.io/
MIT License
5 stars 5 forks source link

Framework for description annotations #85

Closed cthoyt closed 7 years ago

cthoyt commented 7 years ago

have a function that takes a namespace and a class to

def add_descriptions(namespace, annotator_cls):
   pass

and an abstract class to be the parent of all annotator_cls instances.

For example, this class might take care of caching as well.

class BelDescriptionAnnotator(object)
   @abc.abstractmethod
   def get_description(self, name):
      pass

keep in mind the difference between python2 and python3 abstract base classes