<commit_before>#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task running log'''
import xml.etree.ElementTree as xmlMod
from usefullFunctions import XML


class TaskLog:
	'''class to manage task running log'''
	
	
	def __init__(self, xml = None, pref = None, task = None):
		'''initialize task log object'''
		if xml is None:
			self.defaultInit(pref, task)
		else:
			self.fromXml(xml)
	
	
	
	
	
	def defaultInit(self, preferences, task):
		'''initialize Task log object by generating from the task settings'''
		self.backup = 0
		
		
		###CODE NEEDED
		
		
		self.status = 'ready'
	
	
	
	
	
	def fromXml(self, xml):
		'''initialize Task log object with saved log'''
		
		
		
		###CODE NEEDED
		
		
		
	
	
	
	
	
	def toXml(self):
		'''export task log into xml syntaxed string'''
		xml = '<log ></log>'
		
		
		###CODE NEEDED
		
		
		
		return xml
	
	
	
	
	
	def menu(self, log, index):
#		'''a method to display and browse into task rendering log'''
#		log.menuIn('Rendering Log')
#		while True:
#			log.print()
#			print('\n\n        Rendering Log of task n°'+str(index)+' :\n')
#			self.print(True)
#			
#			choice = input('\n\ntype the index of a group to see more or q to quit :').strip().lower()
#			
#			if choice in ['0', 'q', 'quit', 'cancel']:
#				log.menuOut()
#				return
#			
#			try:
#				choice = int(choice)-1
#			except:
#				log.error('Integer value expected!', False)
#				continue
#			
#			if choice >= 0 and choice < len(self.groups):
#				self.groups[choice].menu(log, self.getMainPath())
#			else:
#				log.error('There is no group with this index!', False)
#			
	
	
	
	
	
#	def print(self, index = False):
#		'''A method to print task log'''
#		print('The task have '+str(len(self.groups))+' group(s):')
#		ended, total = 0, 0
#		for i, group in enumerate(self.groups):
#			if index:
#				group.runMenuPrint(i+1)
#			else:
#				group.runMenuPrint()
#			
#			total += (group.end - group.start + 1)
#			ended += len(group.frames)
#		print('\n\n                  '+str(ended)+'/'+str(total)\
#							+'('+str(total-ended)+' remaining)')
	
	
	
	
	
#	def getMainPath(self):
#		'''return the task main path'''
#		if self.backup == 0:
#			return self.path
#		else:
#			return self.path+'previous rendering '+str(self.backup)+'/'
	
	
	
	
	
#	def isComplete(self):
#		'''check if there is still frame waiting to be rendered'''
#		for group in self.groups:
#			if group.remaining()>0:
#				return False
#		return True
	
	
	
	
	
#	def checkFrames(self):
#		'''check for each frame that have been claimed as rendered if there is really a file corresponding to it'''
#		path = self.getMainPath()
#		for group in self.groups:
#			group.checkFrames(path)
#		
#		return self.isComplete()
	
	
	
	<commit_msg>commenting<commit_after>#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task running log'''
import xml.etree.ElementTree as xmlMod
from usefullFunctions import XML


class TaskLog:
	'''class to manage task running log'''
	
	
	def __init__(self, xml = None, pref = None, task = None):
		'''initialize task log object'''
		if xml is None:
			self.defaultInit(pref, task)
		else:
			self.fromXml(xml)
	
	
	
	
	
	def defaultInit(self, preferences, task):
		'''initialize Task log object by generating from the task settings'''
		self.backup = 0
		
		
		###CODE NEEDED
		
		
		self.status = 'ready'
	
	
	
	
	
	def fromXml(self, xml):
		'''initialize Task log object with saved log'''
		
		
		
		###CODE NEEDED
		
		
		
	
	
	
	
	
	def toXml(self):
		'''export task log into xml syntaxed string'''
		xml = '<log ></log>'
		
		
		###CODE NEEDED
		
		
		
		return xml
	
	
	
	
	
#	def menu(self, log, index):
#		'''a method to display and browse into task rendering log'''
#		log.menuIn('Rendering Log')
#		while True:
#			log.print()
#			print('\n\n        Rendering Log of task n°'+str(index)+' :\n')
#			self.print(True)
#			
#			choice = input('\n\ntype the index of a group to see more or q to quit :').strip().lower()
#			
#			if choice in ['0', 'q', 'quit', 'cancel']:
#				log.menuOut()
#				return
#			
#			try:
#				choice = int(choice)-1
#			except:
#				log.error('Integer value expected!', False)
#				continue
#			
#			if choice >= 0 and choice < len(self.groups):
#				self.groups[choice].menu(log, self.getMainPath())
#			else:
#				log.error('There is no group with this index!', False)
#			
	
	
	
	
	
#	def print(self, index = False):
#		'''A method to print task log'''
#		print('The task have '+str(len(self.groups))+' group(s):')
#		ended, total = 0, 0
#		for i, group in enumerate(self.groups):
#			if index:
#				group.runMenuPrint(i+1)
#			else:
#				group.runMenuPrint()
#			
#			total += (group.end - group.start + 1)
#			ended += len(group.frames)
#		print('\n\n                  '+str(ended)+'/'+str(total)\
#							+'('+str(total-ended)+' remaining)')
	
	
	
	
	
#	def getMainPath(self):
#		'''return the task main path'''
#		if self.backup == 0:
#			return self.path
#		else:
#			return self.path+'previous rendering '+str(self.backup)+'/'
	
	
	
	
	
#	def isComplete(self):
#		'''check if there is still frame waiting to be rendered'''
#		for group in self.groups:
#			if group.remaining()>0:
#				return False
#		return True
	
	
	
	
	
#	def checkFrames(self):
#		'''check for each frame that have been claimed as rendered if there is really a file corresponding to it'''
#		path = self.getMainPath()
#		for group in self.groups:
#			group.checkFrames(path)
#		
#		return self.isComplete()
	
	
	
	

{'fraction_non_alphanumeric': 0.1550430166575142, 'fraction_numerical': 0.004759289767527, 'mean_word_length': 2.7944444444444443, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '634968', 'n_tokens_mistral': 2296, 'n_tokens_neox': 1955, 'n_words': 554}