Пример #1
0
 def setUpClass(cls):
     token = environ.get('KB_AUTH_TOKEN', None)
     cls.ctx = {'token': token}
     config_file = environ.get('KB_DEPLOYMENT_CONFIG', None)
     cls.cfg = {}
     config = ConfigParser()
     config.read(config_file)
     for nameval in config.items('kb_cummerbund'):
         cls.cfg[nameval[0]] = nameval[1]
     cls.wsURL = cls.cfg['ws_url']
     cls.wsClient = workspaceService(cls.wsURL, token=token)
     cls.serviceImpl = kb_cummerbund(cls.cfg)
 def setUpClass(cls):
     token = environ.get('KB_AUTH_TOKEN', None)
     cls.ctx = {'token': token}
     config_file = environ.get('KB_DEPLOYMENT_CONFIG', None)
     cls.cfg = {}
     config = ConfigParser()
     config.read(config_file)
     for nameval in config.items('kb_cummerbund'):
         cls.cfg[nameval[0]] = nameval[1]
     cls.wsURL = cls.cfg['ws_url']
     cls.wsClient = workspaceService(cls.wsURL, token=token)
     cls.serviceImpl = kb_cummerbund(cls.cfg)
Пример #3
0
 def setUpClass(cls):
     token = environ.get('KB_AUTH_TOKEN', None)
     cls.callback_url = os.environ['SDK_CALLBACK_URL']
     cls.ctx = {'token': token}
     config_file = environ.get('KB_DEPLOYMENT_CONFIG', None)
     cls.cfg = {}
     config = ConfigParser()
     config.read(config_file)
     for nameval in config.items('kb_cummerbund'):
         cls.cfg[nameval[0]] = nameval[1]
     cls.scratch = cls.cfg['scratch']
     cls.wsURL = cls.cfg['ws_url']
     cls.gfu = GenomeFileUtil(cls.callback_url)
     cls.ru = ReadsUtils(cls.callback_url)
     cls.rau = ReadsAlignmentUtils(cls.callback_url, service_ver='dev')
     cls.eu = ExpressionUtils(cls.callback_url, service_ver='dev')
     cls.wsClient = workspaceService(cls.wsURL, token=token)
     cls.dfu = DataFileUtil(cls.callback_url, token=token)
     cls.serviceImpl = kb_cummerbund(cls.cfg)
     cls.prepare_data()

def get_config():
    if not get_config_file():
        return None
    retconfig = {}
    config = ConfigParser()
    config.read(get_config_file())
    for nameval in config.items(get_service_name() or 'kb_cummerbund'):
        retconfig[nameval[0]] = nameval[1]
    return retconfig

config = get_config()

from kb_cummerbund.kb_cummerbundImpl import kb_cummerbund  # @IgnorePep8
impl_kb_cummerbund = kb_cummerbund(config)


class JSONObjectEncoder(json.JSONEncoder):

    def default(self, obj):
        if isinstance(obj, set):
            return list(obj)
        if isinstance(obj, frozenset):
            return list(obj)
        if hasattr(obj, 'toJSONable'):
            return obj.toJSONable()
        return json.JSONEncoder.default(self, obj)


class JSONRPCServiceCustom(JSONRPCService):

def get_config():
    if not get_config_file():
        return None
    retconfig = {}
    config = ConfigParser()
    config.read(get_config_file())
    for nameval in config.items(get_service_name() or 'kb_cummerbund'):
        retconfig[nameval[0]] = nameval[1]
    return retconfig

config = get_config()

from kb_cummerbund.kb_cummerbundImpl import kb_cummerbund  # noqa @IgnorePep8
impl_kb_cummerbund = kb_cummerbund(config)


class JSONObjectEncoder(json.JSONEncoder):

    def default(self, obj):
        if isinstance(obj, set):
            return list(obj)
        if isinstance(obj, frozenset):
            return list(obj)
        if hasattr(obj, 'toJSONable'):
            return obj.toJSONable()
        return json.JSONEncoder.default(self, obj)


class JSONRPCServiceCustom(JSONRPCService):