def process(self, cpu, selector=None, source=None, fieldmapper=None,
                gzip=None, buffer_size=1000):
        """
        Process each item in a [incr tsdb()] testsuite

        If the testsuite is attached to files on disk, the output
        records will be flushed to disk when the number of new records
        in a table is *buffer_size*. If the testsuite is not attached
        to files or *buffer_size* is set to `None`, records are kept
        in memory and not flushed to disk.

        Args:
            cpu (:class:`~delphin.interfaces.base.Processor`):
                processor interface (e.g.,
                :class:`~delphin.interfaces.ace.AceParser`)
            selector (str): data specifier to select a single table and
                column as processor input (e.g., `"item:i-input"`)
            source (:class:`TestSuite`, :class:`Table`): testsuite or
                table from which inputs are taken; if `None`, use `self`
            fieldmapper (:class:`~delphin.interfaces.base.FieldMapper`):
                object for mapping response fields to [incr tsdb()]
                fields; if `None`, use a default mapper for the
                standard schema
            gzip: compress non-empty tables with gzip
            buffer_size (int): number of output records to hold in
                memory before flushing to disk; ignored if the testsuite
                is all in-memory; if `None`, do not flush to disk
        Examples:
            >>> ts.process(ace_parser)
            >>> ts.process(ace_generator, 'result:mrs', source=ts2)
        """
        if selector is None:
            selector = _default_task_input_selectors.get(cpu.task)
        if source is None:
            source = self
        if fieldmapper is None:
            fieldmapper = FieldMapper()
        if self._path is None:
            buffer_size = None

        tables = set(fieldmapper.affected_tables).intersection(self.relations)
        _prepare_target(self, tables, buffer_size)
        source, cols = _prepare_source(selector, source)
        key_cols = cols[:-1]

        for item in select_rows(cols, source, mode='list'):
            datum = item.pop()
            keys = dict(zip(key_cols, item))
            response = cpu.process_item(datum, keys=keys)
            logging.info(
                'Processed item {:>16}  {:>8} results'
                .format(encode_row(item), len(response['results']))
            )
            for tablename, data in fieldmapper.map(response):
                _add_record(self[tablename], data, buffer_size)

        for tablename, data in fieldmapper.cleanup():
            _add_record(self[tablename], data, buffer_size)

        # finalize data if writing to disk
        for tablename in tables:
            table = self[tablename]
            if buffer_size is not None:
                table.write(gzip=gzip)
def process ( self , cpu , selector = None , source = None , fieldmapper = None , gzip = None , buffer_size = 1000 ) : if selector is None : selector = _default_task_input_selectors . get ( cpu . task ) if source is None : source = self if fieldmapper is None : fieldmapper = FieldMapper ( ) if self . _path is None : buffer_size = None tables = set ( fieldmapper . affected_tables ) . intersection ( self . relations ) _prepare_target ( self , tables , buffer_size ) source , cols = _prepare_source ( selector , source ) key_cols = cols [ : - 1 ] for item in select_rows ( cols , source , mode = 'list' ) : datum = item . pop ( ) keys = dict ( zip ( key_cols , item ) ) response = cpu . process_item ( datum , keys = keys ) logging . info ( 'Processed item {:>16}  {:>8} results' . format ( encode_row ( item ) , len ( response [ 'results' ] ) ) ) for tablename , data in fieldmapper . map ( response ) : _add_record ( self [ tablename ] , data , buffer_size ) for tablename , data in fieldmapper . cleanup ( ) : _add_record ( self [ tablename ] , data , buffer_size ) for tablename in tables : table = self [ tablename ] if buffer_size is not None : table . write ( gzip = gzip )
Process each item in a [incr tsdb()] testsuite

        If the testsuite is attached to files on disk, the output
        records will be flushed to disk when the number of new records
        in a table is *buffer_size*. If the testsuite is not attached
        to files or *buffer_size* is set to `None`, records are kept
        in memory and not flushed to disk.

        Args:
            cpu (:class:`~delphin.interfaces.base.Processor`):
                processor interface (e.g.,
                :class:`~delphin.interfaces.ace.AceParser`)
            selector (str): data specifier to select a single table and
                column as processor input (e.g., `"item:i-input"`)
            source (:class:`TestSuite`, :class:`Table`): testsuite or
                table from which inputs are taken; if `None`, use `self`
            fieldmapper (:class:`~delphin.interfaces.base.FieldMapper`):
                object for mapping response fields to [incr tsdb()]
                fields; if `None`, use a default mapper for the
                standard schema
            gzip: compress non-empty tables with gzip
            buffer_size (int): number of output records to hold in
                memory before flushing to disk; ignored if the testsuite
                is all in-memory; if `None`, do not flush to disk
        Examples:
            >>> ts.process(ace_parser)
            >>> ts.process(ace_generator, 'result:mrs', source=ts2)