Exemplo n.º 1
0
    def setUp(self):
        self.analysis_conf_path = \
            etc.set_analysis_config("intake.cleaning.filter_accuracy.enable", True)

        etc.setupRealExample(self, "emission/tests/data/real_examples/shankari_2015-aug-27")
        self.androidUUID = self.testUUID
        eaicf.filter_accuracy(self.androidUUID)

        self.testUUID = uuid.UUID("c76a0487-7e5a-3b17-a449-47be666b36f6")
        self.entries = json.load(open("emission/tests/data/real_examples/iphone_2015-11-06"), object_hook = bju.object_hook)
        etc.setupRealExampleWithEntries(self)
        self.iosUUID = self.testUUID
        eaicf.filter_accuracy(self.iosUUID)
 def setUp(self):
     self.analysis_conf_path = \
         etc.set_analysis_config("analysis.result.section.key", "analysis/cleaned_section")
     etc.setupRealExample(self,
                          "emission/tests/data/real_examples/shankari_2015-aug-21")
     self.testUUID1 = self.testUUID
     etc.setupRealExample(self,
                          "emission/tests/data/real_examples/shankari_2015-aug-27")
     etc.runIntakePipeline(self.testUUID1)
     etc.runIntakePipeline(self.testUUID)
     logging.info(
         "After loading, timeseries db size = %s" % edb.get_timeseries_db().count())
     self.aug_start_ts = 1438387200
     self.aug_end_ts = 1441065600
     self.day_start_dt = esdldq.get_local_date(self.aug_start_ts, "America/Los_Angeles")
     self.day_end_dt = esdldq.get_local_date(self.aug_end_ts, "America/Los_Angeles")
Exemplo n.º 3
0
 def setUp(self):
     self.analysis_conf_path = \
         etc.set_analysis_config("analysis.result.section.key", "analysis/cleaned_section")
     etc.setupRealExample(
         self, "emission/tests/data/real_examples/shankari_2015-aug-21")
     self.testUUID1 = self.testUUID
     etc.setupRealExample(
         self, "emission/tests/data/real_examples/shankari_2015-aug-27")
     etc.runIntakePipeline(self.testUUID1)
     etc.runIntakePipeline(self.testUUID)
     logging.info("After loading, timeseries db size = %s" %
                  edb.get_timeseries_db().estimated_document_count())
     self.aug_start_ts = 1438387200
     self.aug_end_ts = 1441065600
     self.day_start_dt = ecwl.LocalDate.get_local_date(
         self.aug_start_ts, "America/Los_Angeles")
     self.day_end_dt = ecwl.LocalDate.get_local_date(
         self.aug_end_ts, "America/Los_Angeles")
Exemplo n.º 4
0
    def setUp(self):
        # We need to access the database directly sometimes in order to
        # forcibly insert entries for the tests to pass. But we put the import
        # in here to reduce the temptation to use the database directly elsewhere.
        import emission.core.get_database as edb
        import uuid

        self.analysis_conf_path = \
            etc.set_analysis_config("intake.cleaning.filter_accuracy.enable", True)
        self.testUUID = UUID('079e0f1a-c440-3d7c-b0e7-de160f748e35')
        with open(
                "emission/tests/data/smoothing_data/tablet_2015-11-03") as fp:
            self.entries = json.load(fp, object_hook=bju.object_hook)
        tsdb = edb.get_timeseries_db()
        for entry in self.entries:
            entry["user_id"] = self.testUUID
            tsdb.insert_one(entry)
        self.ts = esta.TimeSeries.get_time_series(self.testUUID)
    def setUp(self):
        # We need to access the database directly sometimes in order to
        # forcibly insert entries for the tests to pass. But we put the import
        # in here to reduce the temptation to use the database directly elsewhere.
        import emission.core.get_database as edb
        import uuid

        self.analysis_conf_path = \
            etc.set_analysis_config("intake.cleaning.filter_accuracy.enable", True)
        self.testUUID = UUID('079e0f1a-c440-3d7c-b0e7-de160f748e35')
        with open("emission/tests/data/smoothing_data/tablet_2015-11-03") as fp:
            self.entries = json.load(fp,
                                 object_hook=bju.object_hook)
        tsdb = edb.get_timeseries_db()
        for entry in self.entries:
            entry["user_id"] = self.testUUID
            tsdb.insert_one(entry)
        self.ts = esta.TimeSeries.get_time_series(self.testUUID)
 def setUp(self):
     # Thanks to M&J for the number!
     np.random.seed(61297777)
     self.analysis_conf_path = \
         etc.set_analysis_config("analysis.result.section.key", "analysis/cleaned_section")