def collectData (tournamentDir): ''' Processes data from data files in the specified directory. ''' for dataFile in di.datafileIter(tournamentDir, logtoolClass, dataPrefix): # note that dataFile is a Path, not a string processFile(str(dataFile))
def collectData (tournamentDir): ''' Processes data from data files in the specified directory. ''' for dataFile in di.datafileIter(tournamentDir, logtoolClass, dataPrefix, options, logtype, force, logtoolDir = logtoolDir): # note that dataFile is a Path, not a string #f.write(str(dataFile[0]) + ',') processFile(str(dataFile[1]))
def collectData(tournamentDir): ''' Processes data from data files in the specified directory. ''' for dataFile in di.datafileIter(tournamentDir, logtoolClass, dataPrefix, options, logtype, force, logtoolDir=logtoolDir): # note that dataFile is a Path, not a string #f.write(str(dataFile[0]) + ',') processFile(str(dataFile[1]))
def collectData (self, logType='sim', force=False): ''' Processes data from sim data files in the specified directory. Use force=True to force re-analysis of the data. Otherwise the logtool code won't be run if its output is already in place. ''' actualPrefix = self.dataPrefix[self.dataType] if actualPrefix == '': print('Bad dataType: {}'.format(self.dataType)) return if logType != 'sim': actualPrefix = '{}{}-'.format(self.dataPrefix[self.dataType], logType) for [gameId, dataFile] in di.datafileIter(self.tournament, self.logtoolClass[self.dataType], actualPrefix, logtype=logType, force = force): # note that dataFile is a Path, not a string if logType == 'sim': self.processFile(gameId, str(dataFile)) else: self.processBootFile(gameId, str(dataFile))