diggit-developers_activity 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f85e1a7d1ec600d5204923bd5cd5eeb81832308d
4
- data.tar.gz: ec8e3b59112b7d3772d2be4d0340237959eb0e69
3
+ metadata.gz: d5a276bad8c991f0a2296ff59380d152d3a9a176
4
+ data.tar.gz: b610d639d3edb91434c3c964f83199ffd4dfae32
5
5
  SHA512:
6
- metadata.gz: e32ba1864deb2a497fae1e075a414758bf30b331dac565bf8521138de55165d9aaef4541a5d0d07dc70f580a90c5ef66816f5c93aa8830d2caf47907112cd7b9
7
- data.tar.gz: 563c18803b17388f0e95249593ae93aa572070d4defbcfe810a34286f733d8c9cae7fa5e7ae639fac6d59edda511fc22a81605124715d94a694eb9c777940d4a
6
+ metadata.gz: 086c3bd747ba337b6fbb992029aa375ce7b9e2f1cb6ddbb8e5d50f81d9d8c78b0ae1ede5e08686fbc68aa052faa3d84c9eeed40820676276e932a5a95c24adcc
7
+ data.tar.gz: 04945a8968a16f95b86b3173f4fc1bd9129d1583a6c5a7bedec32da15dec538e28ad23e8341bccd036d400a3b7d712ae29a8404c1f57605fc5a2f8810da26265
@@ -35,8 +35,6 @@ module Diggit
35
35
  end
36
36
  end
37
37
 
38
- puts "num commits #{num_commits}"
39
-
40
38
  fist_commit_date = commits[0].author[:time]
41
39
 
42
40
  # compute metrics and write to result
@@ -17,17 +17,20 @@ module Diggit
17
17
  puts('Running R sript...')
18
18
 
19
19
  @addons[:R].eval <<-EOS
20
+ options(warn=-1)
20
21
  if (require(developerTurnover) == FALSE) {
21
22
  if (require(devtools) == FALSE) {
22
- install.packages("devtools")
23
+ install.packages("devtools", repos = "http://cran.rstudio.com")
23
24
  library(devtools)
24
25
  }
25
26
  install_github("matthieu-foucault/RdeveloperTurnover")
26
27
  library(devtools)
28
+ library(developerTurnover)
27
29
  }
28
30
 
29
31
  developer_turnover(database_host, working_dir, web_working_dir)
30
32
  print("R script finished")
33
+ options(warn=0)
31
34
  EOS
32
35
  end
33
36
 
@@ -13,6 +13,7 @@ module Diggit
13
13
  MODULES_METRICS_COL ||= "modules_metrics"
14
14
 
15
15
  def run
16
+ puts('Extracting LoC and #BugFixes')
16
17
  metrics = ModuleMetricsExtractor.extract_module_metrics(@source, source_options, @addons[:db], @repo)
17
18
  @addons[:db].db[MODULES_METRICS_COL].insert(metrics)
18
19
  end
@@ -32,6 +32,8 @@ module Diggit
32
32
  end
33
33
 
34
34
  def extract_months_before
35
+ print("Extracting monthly activity (before S_0)")
36
+ STDOUT.flush
35
37
  Renames.clear
36
38
  r_0 = @repo.lookup(source_options["cloc-commit-id"])
37
39
  t_first = @repo.lookup(source_options["R_first"]).author[:time]
@@ -50,7 +52,8 @@ module Diggit
50
52
  Renames.extract_commit_renames(commit, true)
51
53
  commits << commit if commit.parents.size == 1
52
54
  if t < t_previous_month || t < t_first
53
- puts "Month #{month_num}, #{commits.size} commits"
55
+ print('.')
56
+ STDOUT.flush
54
57
  m = extract_developers_activity(@source, commits, month_num)
55
58
  @addons[:db].db[MONTHS_BEFORE_COL].insert(m) unless m.empty?
56
59
  month_num += 1
@@ -59,9 +62,13 @@ module Diggit
59
62
  end
60
63
  break if t < t_first || month_num > @num_months_to_extract
61
64
  end
65
+ print("\n")
66
+ STDOUT.flush
62
67
  end
63
68
 
64
69
  def extract_months_after
70
+ print("Extracting monthly activity (after S_0) ")
71
+ STDOUT.flush
65
72
  Renames.clear
66
73
  r_0 = @repo.lookup(source_options["cloc-commit-id"])
67
74
  r_last = @repo.lookup(source_options["R_last"])
@@ -79,7 +86,8 @@ module Diggit
79
86
  Renames.extract_commit_renames(commit, false)
80
87
  commits << commit if commit.parents.size == 1
81
88
  if t > t_next_month
82
- puts "Month #{month_num}, #{commits.size} commits"
89
+ print('.')
90
+ STDOUT.flush
83
91
  m = ActivityExtractor.extract_developers_activity(@source, commits, month_num)
84
92
  @addons[:db].db[MONTHS_AFTER_COL].insert(m) unless m.empty?
85
93
  month_num += 1
@@ -88,6 +96,8 @@ module Diggit
88
96
  end
89
97
  break if month_num > @num_months_to_extract
90
98
  end
99
+ print("\n")
100
+ STDOUT.flush
91
101
  end
92
102
  end
93
103
  end
@@ -11,6 +11,7 @@ module Diggit
11
11
  class ProjectDevelopersAnalysis < ActivityAnalysis
12
12
  COL ||= "devs_commit_dates"
13
13
  def run
14
+ puts('Extracting project-level activity')
14
15
  r_last = @repo.lookup(source_options["R_last"])
15
16
  r_first_time = @repo.lookup(source_options["R_first"]).author[:time]
16
17
 
@@ -27,6 +27,7 @@ module Diggit
27
27
  end
28
28
 
29
29
  def run
30
+ puts('Extract releases activity')
30
31
  releases = source_options["releases"]
31
32
  (0..(releases.length - 2)).each do |i|
32
33
  release_commits = commits_between(releases[i], releases[i + 1])
@@ -1,5 +1,5 @@
1
1
  module Diggit
2
2
  module DevelopersActivity
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diggit-developers_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Foucault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-06 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler