(self, fpath)
return status, toc - tic
Loads denial constraints from line-separated TXT file
        
        :param fpath: filepath to TXT file containing denial constraints
Loads denial constraints from line-separated TXT file
        
        :param fpath: filepath to TXT file containing denial constraints
Loads denial constraints from line - separated TXT file : param fpath : filepath to TXT file containing denial constraints
def load_denial_constraints(self, fpath):
        """
        Loads denial constraints from line-separated TXT file
        
        :param fpath: filepath to TXT file containing denial constraints
        """
        tic = time.clock()
        if not self.ds.raw_data:
            status = 'No dataset specified'
            toc = time.clock()
            return status, toc - tic
        attrs = self.ds.raw_data.get_attributes()
        try:
            dc_file = open(fpath, 'r')
            status = "OPENED constraints file successfully"
            logging.debug(status)
            for line in dc_file:
                line = line.rstrip()
                # Skip empty and comment lines.
                if not line or line.startswith('#'):
                    continue
                self.dc_strings.append(line)
                self.dcs.append(DenialConstraint(line,attrs))
            status = 'DONE Loading DCs from {fname}'.format(fname=os.path.basename(fpath))
        except Exception:
            logging.error('FAILED to load constraints from file %s', os.path.basename(fpath))
            raise
        toc = time.clock()
        return status, toc - tic
def load_denial_constraints ( self , fpath ) : tic = time . clock ( ) if not self . ds . raw_data : status = 'No dataset specified' toc = time . clock ( ) return status , toc - tic attrs = self . ds . raw_data . get_attributes ( ) try : dc_file = open ( fpath , 'r' ) status = "OPENED constraints file successfully" logging . debug ( status ) for line in dc_file : line = line . rstrip ( ) # Skip empty and comment lines. if not line or line . startswith ( '#' ) : continue self . dc_strings . append ( line ) self . dcs . append ( DenialConstraint ( line , attrs ) ) status = 'DONE Loading DCs from {fname}' . format ( fname = os . path . basename ( fpath ) ) except Exception : logging . error ( 'FAILED to load constraints from file %s' , os . path . basename ( fpath ) ) raise toc = time . clock ( ) return status , toc - tic