Skip to content

Commit 4829229

Browse files
committed
Refactor: put a new on the complex behavior for organizing commits into sliding windows
1 parent 946e5be commit 4829229

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/code_maat/app/time_based_grouper.clj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@
9898
remove-empty-windows
9999
combine-commits-to-logical-changesets))
100100

101+
(defn- partition-commits-into-sliding-periods-of
102+
[time-period padded-cs]
103+
(->> padded-cs
104+
(sort-by first)
105+
drop-date-key
106+
(partition time-period 1)))
107+
101108
(defn- commits->sliding-window-seq
102109
[time-period cs]
103110
(->> cs
104111
pad-commits-to-complete-time-series
105-
(sort-by first)
106-
drop-date-key
107-
(partition time-period 1)
112+
(partition-commits-into-sliding-periods-of time-period)
108113
combine-sliding-commits))
109114

110115
(defn- validated-time-period-from

0 commit comments

Comments
 (0)