Beispiel #1
0
    def __init__(self, logfile, pathfolder, precomputers=None, num_cores=None):
        self._initialization()
        self._initialization_spec()
        self.pathfolder = pathfolder
        self.pathdata = os.path.join(pathfolder, 'Cleaned/Results')

        if num_cores is None:
            self.num_cores = multiprocessing.cpu_count()
        elif num_cores == 0:
            self.num_cores = 1
        else:
            self.num_cores = num_cores

        self.logfile = Logger(logfile) if type(logfile) == str else logfile
        if precomputers is not None:
            self.precomputers = precomputers
        else:
            self.precomputers = PrecomputerCollection(logfile,
                                                      pathfolder,
                                                      old_computed=True)
"""
Script to test cleanning task
"""

from Mscthesis.Cleanning import CleanProcess
from pythonUtils.Logger import Logger

inpath = '/home/tono/mscthesis/code/Data/pruebas_raw/raw1'
outpath = '/home/tono/mscthesis/code/Data/pruebas_clean2'
logfile = '/home/tono/mscthesis/code/Data/Outputs/Logs/log_clean.log'

logger = Logger(logfile)
cleaner = CleanProcess(logger)
cleaner.clean(inpath, outpath)
 def __init__(self, logfile, pathdata):
     self._initialization()
     self.logfile = Logger(logfile) if type(logfile) == str else logfile
     self.pathdata = pathdata
Beispiel #4
0
 def __init__(self, logfile, bool_inform=False):
     "Instantiation of the class remembering it is a subclass of Processer."
     self._initialization()
     self.logfile = Logger(logfile) if type(logfile) == str else logfile