Пример #1
0
def training_days_to_test_days(training_days_path, test_days_path, solution_path, cutoff_times):
    for cutoff_time in cutoff_times:
        training_day_path = utilities.get_day_path(training_days_path, cutoff_time)
        test_day_path = utilities.get_day_path(test_days_path, cutoff_time)
        training_day_to_test_day(training_day_path, test_day_path, solution_path, cutoff_time)

    stitch_files.stitch_test_set(test_days_path)
    stitch_files.stitch_solution(solution_path)
Пример #2
0
def training_days_to_test_days(training_days_path, test_days_path, solution_path, cutoff_times):
    for cutoff_time in cutoff_times:
        training_day_path = utilities.get_day_path(training_days_path, cutoff_time)
        test_day_path = utilities.get_day_path(test_days_path, cutoff_time)
        training_day_to_test_day(training_day_path, test_day_path, solution_path, cutoff_time)

    stitch_files.stitch_test_set(test_days_path)
    stitch_files.stitch_solution(solution_path)
Пример #3
0
    def test_get_day_path(self):
        original_path = os.tempnam()
        os.mkdir(original_path)

        cutoff_time = datetime(2012, 10, 25, 8, 00, tzinfo=tzutc())
        day_path = utilities.get_day_path(original_path, cutoff_time, 0)
        self.assertEqual(os.path.join(original_path, "2012_10_25"), day_path)
        self.assertTrue(os.path.exists(day_path))
        os.rmdir(day_path)
        os.rmdir(original_path)
Пример #4
0
    def test_get_day_path(self):
        original_path = os.tempnam()
        os.mkdir(original_path)

        cutoff_time = datetime(2012, 10, 25, 8, 00, tzinfo = tzutc())
        day_path = utilities.get_day_path(original_path, cutoff_time, 0)
        self.assertEqual(os.path.join(original_path, "2012_10_25"), day_path)
        self.assertTrue(os.path.exists(day_path))
        os.rmdir(day_path)
        os.rmdir(original_path)
def training_days_to_test_days(training_days_path, test_days_path, solution_path, cutoff_times):
    for cutoff_time in cutoff_times:
        training_day_path = utilities.get_day_path(training_days_path, cutoff_time)
        test_day_path = utilities.get_day_path(test_days_path, cutoff_time)
        training_day_to_test_day(training_day_path, test_day_path, solution_path, cutoff_time)