<commit_before>import logging
import pandas as pd
import pymongo
import itertools

import emission.core.get_database as edb
import emission.storage.timeseries.abstract_timeseries as esta

import emission.core.wrapper.entry as ecwe

class BuiltinTimeSeries(esta.TimeSeries):
    def __init__(self, user_id):
        super(BuiltinTimeSeries, self).__init__(user_id)
        self.key_query = lambda(key): {"metadata.key": key}
        self.type_query = lambda(entry_type): {"metadata.type": entry_type}
        self.user_query = {"user_id": self.user_id} # UUID is mandatory for this version
        self.timeseries_db = edb.get_timeseries_db()
        self.analysis_timeseries_db = edb.get_analysis_timeseries_db()
        self.ts_map = {
                "background/location": self.timeseries_db,
                "background/filtered_location": self.timeseries_db,
                "background/motion_activity": self.timeseries_db,
                "background/battery": self.timeseries_db,
                "statemachine/transition": self.timeseries_db,
                "config/sensor_config": self.timeseries_db,
                "segmentation/raw_trip": self.analysis_timeseries_db,
                "segmentation/raw_place": self.analysis_timeseries_db,
                "segmentation/raw_section": self.analysis_timeseries_db,
                "segmentation/raw_stop": self.analysis_timeseries_db,
                "analysis/smoothing": self.analysis_timeseries_db,
                "analysis/cleaned_trip": self.analysis_timeseries_db,
                "analysis/cleaned_place": self.analysis_timeseries_db,
                "analysis/cleaned_section": self.analysis_timeseries_db,
                "analysis/cleaned_stop": self.analysis_timeseries_db,
                "analysis/recreated_location": self.analysis_timeseries_db,
            }


    @staticmethod
    def get_uuid_list():
        return edb.get_timeseries_db().distinct("user_id")
<commit_msg>One more place to add the new key<commit_after>import logging
import pandas as pd
import pymongo
import itertools

import emission.core.get_database as edb
import emission.storage.timeseries.abstract_timeseries as esta

import emission.core.wrapper.entry as ecwe

class BuiltinTimeSeries(esta.TimeSeries):
    def __init__(self, user_id):
        super(BuiltinTimeSeries, self).__init__(user_id)
        self.key_query = lambda(key): {"metadata.key": key}
        self.type_query = lambda(entry_type): {"metadata.type": entry_type}
        self.user_query = {"user_id": self.user_id} # UUID is mandatory for this version
        self.timeseries_db = edb.get_timeseries_db()
        self.analysis_timeseries_db = edb.get_analysis_timeseries_db()
        self.ts_map = {
                "background/location": self.timeseries_db,
                "background/filtered_location": self.timeseries_db,
                "background/motion_activity": self.timeseries_db,
                "background/battery": self.timeseries_db,
                "statemachine/transition": self.timeseries_db,
                "config/sensor_config": self.timeseries_db,
                "config/sync_config": self.timeseries_db,
                "segmentation/raw_trip": self.analysis_timeseries_db,
                "segmentation/raw_place": self.analysis_timeseries_db,
                "segmentation/raw_section": self.analysis_timeseries_db,
                "segmentation/raw_stop": self.analysis_timeseries_db,
                "analysis/smoothing": self.analysis_timeseries_db,
                "analysis/cleaned_trip": self.analysis_timeseries_db,
                "analysis/cleaned_place": self.analysis_timeseries_db,
                "analysis/cleaned_section": self.analysis_timeseries_db,
                "analysis/cleaned_stop": self.analysis_timeseries_db,
                "analysis/recreated_location": self.analysis_timeseries_db,
            }


    @staticmethod
    def get_uuid_list():
        return edb.get_timeseries_db().distinct("user_id")

{'fraction_non_alphanumeric': 0.09090909090909091, 'fraction_numerical': 0.0, 'mean_word_length': 2.866990291262136, 'pattern_counts': {'":': 39, '<': 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': '3131789', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1119, 'n_words': 185}