Example #1
0
 def __init__(self, dascore):
     if not dascore:
         raise Exception("dascore needed")
     self.kws = KeywordSearch(dascore)
     config = das_readconfig()
     self.colored_scorebar = \
         config['keyword_search'].get('colored_scorebar', False)
Example #2
0
    def __init__(cls, name, bases, d):
        type.__init__(cls, name, bases, d)

        # set up only once
        if hasattr(cls, 'global_dbs_inst') and cls.global_dbs_inst:
            return

        print('setUp in metaclass: getting dbs manager ' \
              '(and fetching datasets if needed)')
        cls.global_dbs_mngr = initialize_global_dbs_mngr(update_required=False)
        cls.global_dbs_inst = get_global_dbs_inst()
        cls.kws = KeywordSearch(dascore=DASCore(multitask=False))
        dasconfig = das_readconfig()
        cls.timeout = dasconfig['keyword_search']['timeout']