本文整理匯總了Python中MOSES.getCFMGSEOBetweenDates方法的典型用法代碼示例。如果您正苦於以下問題:Python MOSES.getCFMGSEOBetweenDates方法的具體用法?Python MOSES.getCFMGSEOBetweenDates怎麽用?Python MOSES.getCFMGSEOBetweenDates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MOSES
的用法示例。
在下文中一共展示了MOSES.getCFMGSEOBetweenDates方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: fetchWriterSummary
# 需要導入模塊: import MOSES [as 別名]
# 或者: from MOSES import getCFMGSEOBetweenDates [as 別名]
def fetchWriterSummary(self, writer_name):
"""
This method checks the mode.
"""
keys_list = getReportTypes()
writer_id = str(list(self.writers_data_frame[self.writers_data_frame["Name"] == writer_name]["Employee ID"])[0])
writer_email = str(list(self.writers_data_frame[self.writers_data_frame["Name"] == writer_name]["Email ID"])[0])
writer_summary = dict((key,"-") for key in keys_list)
writer_summary["Report Date"] = self.start_date
writer_summary["Writer ID"] = writer_id
writer_summary["Writer Name"] = writer_name
writer_summary["Writer Email ID"] = writer_email
writer_summary["Reporting Manager"] = MOSES.getReportingManager(self.user_id, self.password, query_user=writer_id, query_date=self.end_date)
if "Daily Article Count" in self.mode:
writer_summary["Daily Article Count"] = MOSES.getArticleCount(self.user_id, self.password, self.start_date, writer_id)
if ("Daily Efficiency" in self.mode) or ("Daily Stack Rank Index" in self.mode) or ("Daily Efficiency KRA"):
writer_summary["Daily Efficiency"] = MOSES.getEfficiencyFor(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
if (type(writer_summary["Daily Efficiency"]) != str) and (not math.isnan(writer_summary["Daily Efficiency"])):
try:
writer_summary["Daily Efficiency KRA"] = self.getEffKRA(writer_summary["Daily Efficiency"])
except:
print writer_summary["Daily Efficiency"]
if ("Daily Audit Count" in self.mode) or ("Daily CFM" in self.mode) or ("Daily GSEO" in self.mode) or ("Daily Stack Rank Index" in self.mode) or ("Daily CFM KRA") or ("Daily GSEO KRA"):
writer_summary["Daily Audit Count"] = MOSES.getAuditCount(self.user_id, self.password, self.start_date, writer_id)
if writer_summary["Daily Audit Count"] > 0:
if ("Daily CFM" in self.mode) or ("Daily Stack Rank Index" in self.mode) or ("Daily CFM KRA") or ("Daily GSEO" in self.mode) or ("Daily Stack Rank Index" in self.mode) or ("Daily GSEO KRA"):
writer_summary["Daily CFM"], writer_summary["Daily GSEO"], fatals = MOSES.getCFMGSEOFor(self.user_id, self.password, self.start_date, writer_id)
if type(writer_summary["Daily CFM"]) != str:
writer_summary["Daily CFM KRA"] = self.getQKRA(writer_summary["Daily CFM"])
if type(writer_summary["Daily GSEO"])!= str:
writer_summary["Daily GSEO KRA"] = self.getQKRA(writer_summary["Daily GSEO"])
if "Daily Stack Rank Index" in self.mode:
writer_summary["Daily Stack Rank Index"] = self.getStackRankIndex(writer_summary["Daily Efficiency"], writer_summary["Daily CFM"], writer_summary["Daily GSEO"])
if "Average Article Count" in self.mode:
writer_summary["Average Article Count"] = MOSES.getArticleCountBetween(self.user_id, self.password, self.start_date, self.end_date, writer_id)
if ("Average Efficiency" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average Efficiency KRA" in self.mode):
writer_summary["Average Efficiency"] = MOSES.getEfficiencyForDateRange(self.user_id, self.password, self.start_date, self.end_date, writer_id, self.category_tree)
if (type(writer_summary["Average Efficiency"]) != str) and (not math.isnan(writer_summary["Average Efficiency"])):
try:
writer_summary["Average Efficiency KRA"] = self.getEffKRA(writer_summary["Average Efficiency"])
except:
print writer_summary["Average Efficiency"]
if ("Average Audit Count" in self.mode) or ("Average CFM" in self.mode) or ("Average GSEO" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average CFM KRA" in self.mode) or ("Average GSEO KRA" in self.mode):
writer_summary["Average Audit Count"] = MOSES.getAuditCountBetween(self.user_id, self.password, self.start_date, self.end_date, writer_id)
if writer_summary["Average Audit Count"] > 0:
if ("Average CFM" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average CFM KRA" in self.mode) or ("Average GSEO" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average GSEO KRA" in self.mode):
writer_summary["Average CFM"], writer_summary["Average GSEO"], fatals = MOSES.getCFMGSEOBetweenDates(self.user_id, self.password, self.start_date, self.end_date, writer_id)
if type(writer_summary["Average CFM"])!= str:
writer_summary["Average CFM KRA"] = MOSES.getQKRA(writer_summary["Average CFM"])
if type(writer_summary["Average GSEO"])!= str:
writer_summary["Average GSEO KRA"] = MOSES.getQKRA(writer_summary["Average GSEO"])
if ("Average Stack Rank Index" in self.mode):
writer_summary["Average Stack Rank Index"] = self.getStackRankIndex(writer_summary["Average Efficiency"], writer_summary["Average CFM"], writer_summary["Average GSEO"])
if "Weekly Article Count" in self.mode:
writer_summary["Weekly Article Count"] = MOSES.getArticleCountForWeek(self.user_id, self.password, self.start_date, writer_id)
if ("Weekly Efficiency" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly Efficiency KRA" in self.mode):
writer_summary["Weekly Efficiency"] = MOSES.getEfficiencyForWeek(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
if (type(writer_summary["Weekly Efficiency"]) != str) and (not math.isnan(writer_summary["Weekly Efficiency"])):
try:
writer_summary["Weekly Efficiency KRA"] = self.getEffKRA(writer_summary["Weekly Efficiency"])
except:
print writer_summary["Weekly Efficiency"]
if ("Weekly Audit Count" in self.mode) or ("Weekly CFM" in self.mode) or ("Weekly GSEO" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly CFM KRA" in self.mode) or ("Weekly GSEO KRA" in self.mode):
writer_summary["Weekly Audit Count"] = MOSES.getAuditCountForWeek(self.user_id, self.password, self.start_date, writer_id)
if writer_summary["Weekly Audit Count"] > 0:
if ("Weekly CFM" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly CFM KRA" in self.mode) or ("Weekly GSEO" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly GSEO KRA" in self.mode):
writer_summary["Weekly CFM"], writer_summary["Weekly GSEO"], fatals = MOSES.getCFMGSEOForWeek(self.user_id, self.password, self.start_date, writer_id)
if type(writer_summary["Weekly CFM"])!= str:
writer_summary["Weekly CFM KRA"] = self.getQKRA(writer_summary["Weekly CFM"])
if type(writer_summary["Weekly GSEO"])!= str:
writer_summary["Weekly GSEO KRA"] = self.getQKRA(writer_summary["Weekly GSEO"])
if ("Weekly Stack Rank Index" in self.mode):
writer_summary["Weekly Stack Rank Index"] = self.getStackRankIndex(writer_summary["Weekly Efficiency"], writer_summary["Weekly CFM"], writer_summary["Weekly GSEO"])
if "Monthly Article Count" in self.mode:
writer_summary["Monthly Article Count"] = MOSES.getArticleCountForMonth(self.user_id, self.password, self.start_date, writer_id)
if ("Monthly Efficiency" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly Efficiency KRA" in self.mode):
writer_summary["Monthly Efficiency"] = MOSES.getEfficiencyForMonth(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
if (type(writer_summary["Monthly Efficiency"]) != str) and (not math.isnan(writer_summary["Monthly Efficiency"])):
try:
writer_summary["Monthly Efficiency KRA"] = self.getEffKRA(writer_summary["Monthly Efficiency"])
except:
print writer_summary["Monthly Efficiency"]
if ("Monthly Audit Count" in self.mode) or ("Monthly CFM" in self.mode) or ("Monthly GSEO" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode) or ("Monthly GSEO KRA" in self.mode):
writer_summary["Monthly Audit Count"] = MOSES.getAuditCountForMonth(self.user_id, self.password, self.start_date, writer_id)
if writer_summary["Monthly Audit Count"] > 0:
if ("Monthly CFM" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode) or ("Monthly GSEO" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode):
writer_summary["Monthly CFM"], writer_summary["Monthly GSEO"], fatals = MOSES.getCFMGSEOForMonth(self.user_id, self.password, self.start_date, writer_id)
if type(writer_summary["Monthly CFM"])!= str:
writer_summary["Monthly CFM KRA"] = self.getQKRA(writer_summary["Monthly CFM"])
if type(writer_summary["Monthly GSEO"])!= str:
writer_summary["Monthly GSEO KRA"] = self.getQKRA(writer_summary["Monthly GSEO"])
#.........這裏部分代碼省略.........