diff --git a/wc_kb_gen/core.py b/wc_kb_gen/core.py index 1f8bfd3..00b3ae2 100644 --- a/wc_kb_gen/core.py +++ b/wc_kb_gen/core.py @@ -12,12 +12,18 @@ class KbGenerator(object): """ Generator for knowledge bases of experimental data for whole-cell models + Options: + + * id + * name + * component + Attributes: component_generators (:obj:`list` of :obj:`KbComponentGenerator`): component generators of the knowledge base options (:obj:`dict`, optional): dictionary of options whose keys are the names of component generator classes and whose values are dictionaries of options - for the component generator classes + for the component generator classes """ DEFAULT_COMPONENT_GENERATORS = () @@ -43,6 +49,8 @@ def run(self): :obj:`wc_kb.KnowledgeBase`: knowledge base """ + self.clean_and_validate_options() + kb = wc_kb.KnowledgeBase() kb.id = self.options.get('id', None) kb.version = self.options.get('version', None) @@ -56,6 +64,10 @@ def run(self): return kb + def clean_and_validate_options(self): + """ Apply default options and validate options """ + pass # pragma: no cover + class KbComponentGenerator(object): """ Base class for knowledge base component generators