<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from functools import partial
from .column import Column
from .configurators import simple_dict_factory, list_of_dicts_to_list_of_tuples,\
                    aggregate_filter, dbus_forwardable, set_default_drawer
from .table import Table
from .mappers import alias, exclude, dict_row, single_value, values_list
from .reducers import mean
from .aggregate import Accumulate
from .event_dispatcher import Dispatcher
from .dumper import prefix_dumper, csv_dumper, stdout_dumper

mappers = [\
    ('test',
        exclude(
            alias(
                dict_row('query_quality', ('query_id',)),
                {'success': ['success_1h', 'success_1d']}
            ),
            ['success']
        )
    ),
    ('pyqp_cell_value', single_value),\
    ('pyqp_cell_list', values_list)
]

tables = [<commit_msg>Fixed pyqp.test to work with refactored mappers and event_handler<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from functools import partial
from .column import Column
from .configurators import simple_dict_factory, list_of_dicts_to_list_of_tuples,\
                    aggregate_filter, dbus_forwardable, set_default_drawer
from .table import Table
from .mappers import alias, exclude, dict_row, single_value, values_list, Keys
from .reducers import mean
from .aggregate import Accumulate
from .event_dispatcher import Dispatcher
from .dumper import prefix_dumper, csv_dumper, stdout_dumper

mappers = [\
    ('test',
        exclude(
            exclude(
                alias(
                    alias(
                        dict_row(('query_id',)),
                        {'success': ['success_1h', 'success_1d']}
                    ),
                    {'test': ['query_quality']},
                    Keys.TABLE_NAME
                ),
                ['success']
            ),
            ['test'],
            Keys.TABLE_NAME
        )
    ),
    ('pyqp_cell_value', single_value),\
    ('pyqp_cell_list', values_list)
]

tables = [
{'fraction_non_alphanumeric': 0.10117878192534381, 'fraction_numerical': 0.0029469548133595285, 'mean_word_length': 2.3338788870703766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '573285', 'n_tokens_mistral': 609, 'n_tokens_neox': 584, 'n_words': 145}