def create_SR(self, cmd, dconf, cmd_params=None): srcmd = mock.Mock() srcmd.dconf = dconf srcmd.params = {'command': cmd} if cmd_params: srcmd.params.update(cmd_params) return SR.SR(srcmd, "some SR UUID")
setOfConfigFiles = fm.SetUpConfigFile("FLConfigFile.txt") DefaultPath+" = setOfConfigFiles[0] inputPath=setOfConfigFiles[1] DefaultPath = DefaultPath+"+"\\FL"+day+month+"\\" #DefaultPath = "C:\\Users\\prerna.prakash\\Desktop\\Input\\FL"+day+month+"\\" #inputPath = "C:\\Users\\prerna.prakash\\Desktop\\FL\\Input" UIF = UF.UnifyInputFiles(inputPath,DefaultPath) endtime = time.time() cols = ['Order Number','Revision','Status','Submit date','Status date','Order Type','FL prod id','FL_service_no','FL_Line_item_status','FL fullfilment status','Fl Commited Date','BB Prod Id','BB_service_no','BB_Line_item_status','BB fullfilment status','BB Commited Date','a','b','c','d','e'] print("Time taken to unzip files and process files",endtime-strtime) dfEDGE = ed.EDGE() dfSI = si.SI() #dfCONSUMER = cm.CONSUMER() dfSR = sr.SR() df = pd.read_excel(DefaultPath+"Siebel Report.xlsx") df.columns = cols dfEDGE = pd.read_excel(DefaultPath+"FormattedEdge.xlsx") dfSI= pd.read_excel(DefaultPath+"FormattedSI.xlsx") #dfCONSUMER= pd.read_excel(DefaultPath+"FormattedConsumer.xlsx") dfSR= pd.read_excel(DefaultPath+"SRFormatted.xlsx") df = df.merge(dfEDGE,how='left', on='Order Number') df = df.merge(dfSI,how='left', on='Order Number') #df = df.merge(dfCONSUMER,how='left', on='Order Number') df = df.merge(dfSR,how='left', on='Order Number') py.saveExcel(DefaultPath+"FormattedFLBBDasboard.xlsx",'Sheet1',df) endtime = time.time() print("FLBB Dashboard created with SI,EDGE and SR DATA",strtime-endtime) templist = fm.CategoryforSiebelReport(df)
day = str(DateToday.day) setOfConfigFiles = fm.SetUpConfigFile("FLConfigFile.txt") DefaultPath = fm.getDefaultPath() InputPath = setOfConfigFiles[1] UIF = UF.UnifyInputFiles(InputPath, DefaultPath) endtime = time.time() logger.debug('files unzipped') dfEDGE = ed.EDGE() dfSI = si.SI() dfCarisma = Carisma.Carisma() #dfCONSUMER = cm.CONSUMER() dfCONSUMER = sr.SR() if os.path.exists(DefaultPath + "FLBBDashboard.csv"): df = pd.read_csv(DefaultPath + "FLBBDashboard.csv", low_memory=False, error_bad_lines=False) elif os.path.exists(DefaultPath + "FLBBDashboard.xlsx"): df = pd.read_excel(DefaultPath + "FLBBDashboard.xlsx") print("No of Rows are 54 ", len(df)) df = fm.removeDuplicates(df) print("No of Rows are 56 ", len(df)) dfEDGE = pd.read_excel(DefaultPath + "FormattedEdge.xlsx") dfSI = pd.read_excel(DefaultPath + "FormattedSI.xlsx") #dfCONSUMER= pd.read_excel(DefaultPath+"FormattedConsumer.xlsx") dfSR = pd.read_excel(DefaultPath + "SRFormatted.xlsx") dfCarisma = pd.read_excel(DefaultPath + "CarismaFormatted.xlsx")