From df87dfb227817c2e1d041f589858a53a8a8d6af6 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Tue, 17 Jan 2017 16:12:40 -0500 Subject: [PATCH] ENH: Add sorted to sid list when truncating. For repeatable order of truncates between invocations. --- zipline/data/minute_bars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/data/minute_bars.py b/zipline/data/minute_bars.py index 4afa22e8..6e4f6a5a 100644 --- a/zipline/data/minute_bars.py +++ b/zipline/data/minute_bars.py @@ -856,7 +856,7 @@ class BcolzMinuteBarWriter(object): truncate_slice_end = self.data_len_for_day(date) glob_path = os.path.join(self._rootdir, "*", "*", "*.bcolz") - sid_paths = glob(glob_path) + sid_paths = sorted(glob(glob_path)) for sid_path in sid_paths: file_name = os.path.basename(sid_path)