Пример #1
0
 def getTimeout():
     temp = configPraser.cacheDict.get((configPraser.STR_NETWORK, configPraser.STR_TIMEOUT), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = int(cp.get(configPraser.STR_NETWORK, configPraser.STR_TIMEOUT))
         configPraser.cacheDict[(configPraser.STR_NETWORK, configPraser.STR_TIMEOUT)] = res
         return res
     else:
         return temp
Пример #2
0
 def getPrintMode():
     temp = configPraser.cacheDict.get((configPraser.STR_DEBUG, configPraser.STR_PRINT), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = cp.get(configPraser.STR_DEBUG, configPraser.STR_PRINT) == configPraser.STR_TRUE
         configPraser.cacheDict[(configPraser.STR_DEBUG, configPraser.STR_PRINT)] = res
         return res
     else:
         return temp
Пример #3
0
 def getProxy():
     temp = configPraser.cacheDict.get((configPraser.STR_NETWORK, configPraser.STR_PROXY), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = cp.get(configPraser.STR_NETWORK, configPraser.STR_PROXY) == configPraser.STR_TRUE
         configPraser.cacheDict[(configPraser.STR_NETWORK, configPraser.STR_PROXY)] = res
         return res
     else:
         return temp
Пример #4
0
 def getJVMPath():
     temp = configPraser.cacheDict.get((configPraser.STR_RECOMMEND, configPraser.STR_JVM_PATH), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = cp.get(configPraser.STR_RECOMMEND, configPraser.STR_JVM_PATH)
         configPraser.cacheDict[(configPraser.STR_RECOMMEND, configPraser.STR_JVM_PATH)] = res
         return res
     else:
         return temp
Пример #5
0
 def getAuthorizationToken():
     temp = configPraser.cacheDict.get((configPraser.STR_AUTHORIZATION, configPraser.STR_TOKEN), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         tokenList = cp.get(configPraser.STR_AUTHORIZATION, configPraser.STR_TOKEN).split(',')
         configPraser.cacheDict[(configPraser.STR_AUTHORIZATION, configPraser.STR_TOKEN)] = tokenList
         return tokenList[random.randint(0, tokenList.__len__() - 1)]
     else:
         return temp[random.randint(0, temp.__len__() - 1)]
Пример #6
0
 def getIsChangeTriggerByLine():
     temp = configPraser.cacheDict.get((configPraser.STR_RECOMMEND, configPraser.STR_CHANGE_TRIGGER_BY_LINE), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = cp.get(configPraser.STR_RECOMMEND, configPraser.STR_CHANGE_TRIGGER_BY_LINE)
         configPraser.cacheDict[(configPraser.STR_RECOMMEND, configPraser.STR_CHANGE_TRIGGER_BY_LINE)] = res
         return res
     else:
         return temp
Пример #7
0
 def getApiVersion():
     temp = configPraser.cacheDict.get((configPraser.STR_NETWORK, configPraser.STR_API), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = int(cp.get(configPraser.STR_NETWORK, configPraser.STR_API))
         configPraser.cacheDict[(configPraser.STR_NETWORK, configPraser.STR_API)] = res
         return res
     else:
         return temp
Пример #8
0
 def getSemaphore():
     temp = configPraser.cacheDict.get((configPraser.STR_NETWORK, configPraser.STR_SEMAPHORE), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = int(cp.get(configPraser.STR_NETWORK, configPraser.STR_SEMAPHORE))
         configPraser.cacheDict[(configPraser.STR_NETWORK, configPraser.STR_SEMAPHORE)] = res
         return res
     else:
         return temp
Пример #9
0
 def getStanfordModelPath():
     temp = configPraser.cacheDict.get((configPraser.STR_NLP, configPraser.STR_STANFORD_MODEL_PATH), None)
     if temp is None:
         cp = configparser.ConfigParser()
         cp.read(projectConfig.getConfigPath())
         res = cp.get(configPraser.STR_NLP, configPraser.STR_STANFORD_MODEL_PATH)
         configPraser.cacheDict[(configPraser.STR_NLP, configPraser.STR_STANFORD_MODEL_PATH)] = res
         return res
     else:
         return temp
Пример #10
0
 def getReviewerNumber():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(
         cp.get(configPraser.STR_RECOMMEND,
                configPraser.STR_REVIEWER_NUMBER))
Пример #11
0
 def getTestNumber():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(
         cp.get(configPraser.STR_RECOMMEND, configPraser.STR_TEST_NUMBER))
Пример #12
0
 def getTopK():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(cp.get(configPraser.STR_RECOMMEND, configPraser.STR_TOPK))
Пример #13
0
 def getStart():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(cp.get(configPraser.STR_PROJECT, configPraser.STR_START))
Пример #14
0
 def getDataBasePassword():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_DATABASE, configPraser.STR_PASSWORD)
Пример #15
0
 def getCommitFetchLoop():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(
         cp.get(configPraser.STR_PROJECT,
                configPraser.STR_COMMIT_FETCH_LOOP))
Пример #16
0
 def getFPSRemoveAuthor():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(
         configPraser.STR_RECOMMEND,
         configPraser.STR_FPS_REMOVE_AUTHOR) == configPraser.STR_TRUE
Пример #17
0
 def getFPSCtypes():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_RECOMMEND,
                   configPraser.STR_FPS_CTYPES) == configPraser.STR_TRUE
Пример #18
0
 def getOwner():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_PROJECT, configPraser.STR_OWNER)
Пример #19
0
 def getDataBaseUserName():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_DATABASE, configPraser.STR_USERNAME)
Пример #20
0
 def getRepo():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_PROJECT, configPraser.STR_REPO)
Пример #21
0
 def getDataBasePort():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return cp.get(configPraser.STR_DATABASE, configPraser.STR_PORT)
Пример #22
0
 def getLimit():
     cp = configparser.ConfigParser()
     cp.read(projectConfig.getConfigPath())
     return int(cp.get(configPraser.STR_PROJECT, configPraser.STR_LIMIT))