diff --git a/src/clj/gitomic/reports.clj b/src/clj/gitomic/reports.clj index 573a153..ee4db02 100644 --- a/src/clj/gitomic/reports.clj +++ b/src/clj/gitomic/reports.clj @@ -84,4 +84,15 @@ (defn coupling->csv [db repo fname & opts] (let [tc (temporal-coupling db repo opts) pairs (i/$order [:churn :f1 :percentage] :desc tc)] - (i/save pairs fname))) \ No newline at end of file + (i/save pairs fname))) + +(defn main-dev [ds] + (i/add-derived-column :ownership [:change/added :change/added-total] + (fn [x y] (Math/round (if (pos? y) + (* 100 (float (/ x y))) + -1.0))) + (i/$join [:file/path :file/path] + (i/$rollup :sum :change/added [:person/name :file/path] ds) + (i/rename-cols {:change/added :change/added-total} + (i/$rollup :sum :change/added :file/path ds)))) + ) \ No newline at end of file