-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from se-sic/dev
Version 3.7 Merged-by: Thomas Bock <[email protected]>
- Loading branch information
Showing
24 changed files
with
2,161 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
## | ||
## Copyright 2017-2018,2020 by Claus Hunsen <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## All Rights Reserved. | ||
|
||
# TravisCI container | ||
|
@@ -26,6 +27,7 @@ r: | |
- 3.4 | ||
- 3.5 | ||
- 3.6 | ||
- 4.0 | ||
cache: packages | ||
repos: | ||
CRAN: https://cloud.r-project.org | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
## Copyright 2015 by Wolfgang Mauerer <[email protected]> | ||
## Copyright 2015-2017 by Claus Hunsen <[email protected]> | ||
## Copyright 2017 by Thomas Bock <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## Copyright 2019 by Anselm Fehnker <[email protected]> | ||
## All Rights Reserved. | ||
## | ||
|
@@ -32,12 +33,15 @@ packages = c( | |
"logging", | ||
"sqldf", | ||
"testthat", | ||
"patrick", | ||
"ggplot2", | ||
"ggraph", | ||
"markovchain", | ||
"lubridate", | ||
"viridis", | ||
"jsonlite" | ||
"jsonlite", | ||
"rTensor", | ||
"Matrix" | ||
) | ||
|
||
|
||
|
@@ -53,5 +57,7 @@ filter.installed.packages = function(packageList) { | |
p = filter.installed.packages(packages) | ||
if (length(p) > 0) { | ||
print(sprintf("Installing package '%s'.", p)) | ||
install.packages(p, dependencies = TRUE, verbose = FALSE, quiet = FALSE) | ||
|
||
## set dependencies to 'NA' to install only necessary dependencies (i.e., "Depends", "Imports", "LinkingTo") | ||
install.packages(p, dependencies = NA, verbose = TRUE, quiet = TRUE) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,15 @@ | |
## with this program; if not, write to the Free Software Foundation, Inc., | ||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
## | ||
## Copyright 2016-2018 by Claus Hunsen <[email protected]> | ||
## Copyright 2016-2018, 2020 by Claus Hunsen <[email protected]> | ||
## Copyright 2017 by Raphael Nömmer <[email protected]> | ||
## Copyright 2017 by Christian Hechtl <[email protected]> | ||
## Copyright 2017 by Felix Prasse <[email protected]> | ||
## Copyright 2017-2018 by Thomas Bock <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## Copyright 2018 by Jakob Kronawitter <[email protected]> | ||
## Copyright 2019 by Klara Schlueter <[email protected]> | ||
## Copyright 2020 by Anselm Fehnker <[email protected]> | ||
## All Rights Reserved. | ||
|
||
|
||
|
@@ -122,6 +124,17 @@ x = NetworkBuilder$new(project.data = x.data, network.conf = net.conf) | |
# net = x$get.author.network() | ||
# save(net, file = sprintf("busybox_%s.network", x$get.network.conf.variable(var.name = "author.relation"))) | ||
|
||
## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / | ||
## Calculate EDCPTD centrality --------------------------------------------- | ||
|
||
## get author networks for each relation | ||
author.networks = get.author.networks.for.multiple.relations(x, c("cochange", "mail", "issue")) | ||
|
||
## create fourth-order tensor | ||
fourth.order.tensor = FourthOrderTensor$new(author.networks) | ||
|
||
## calculate EDCPTD scores | ||
edcptd.scores = calculate.EDCPTD.centrality(fourth.order.tensor) | ||
|
||
## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / | ||
## Range-level data -------------------------------------------------------- | ||
|
@@ -319,10 +332,10 @@ y = NetworkBuilder$new(project.data = y.data, network.conf = net.conf) | |
# panel.border = ggplot2::element_blank(), | ||
# legend.position = "none" | ||
# ) + | ||
# ggraph::facet_edges( ~ edge.type.char) | ||
# ggraph::facet_edges( ~ edge.type) | ||
# # ggraph::facet_edges( ~ weight) | ||
# # ggraph::facet_nodes( ~ vertex.type.char) | ||
# # ggraph::facet_graph(edge.type.char ~ vertex.type.char) | ||
# # ggraph::facet_nodes( ~ vertex.type) | ||
# # ggraph::facet_graph(edge.type ~ vertex.type) | ||
# print(p) | ||
|
||
# ## generate network plot from README file and save it to disk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
## | ||
## Copyright 2017, 2019 by Claus Hunsen <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## All Rights Reserved. | ||
|
||
## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / | ||
|
@@ -42,8 +43,9 @@ sessionInfo() | |
|
||
logging::loginfo("Running test suite.") | ||
|
||
## load package 'testthat' | ||
## load packages 'testthat' and 'patrick' | ||
requireNamespace("testthat") | ||
requireNamespace("patrick") | ||
|
||
## starting tests | ||
do.tests = function(dir) { | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
## Copyright 2018 by Claus Hunsen <[email protected]> | ||
## Copyright 2018 by Barbara Eckl <[email protected]> | ||
## Copyright 2018 by Thomas Bock <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## Copyright 2018 by Jakob Kronawitter <[email protected]> | ||
## All Rights Reserved. | ||
|
||
|
@@ -62,14 +63,14 @@ test_that("Cut commit and mail data to same date range.", { | |
artifact.type = c("Feature", "Feature"), | ||
artifact.diff.size = as.integer(c(1, 1))) | ||
|
||
mail.data.expected = data.frame(author.name = c("Thomas"), | ||
author.email = c("[email protected]"), | ||
message.id = c("<[email protected]>"), | ||
date = get.date.from.string("2016-07-12 16:04:40"), | ||
date.offset = as.integer(c(100)), | ||
subject = c("Re: Fw: busybox 2 tab"), | ||
thread = sprintf("<thread-%s>", c(9)), | ||
artifact.type = "Mail") | ||
mail.data.expected = data.frame(author.name = c("Thomas", "Olaf"), | ||
author.email = c("[email protected]", "[email protected]"), | ||
message.id = c("<[email protected]>", "<[email protected]>"), | ||
date = get.date.from.string(c("2016-07-12 16:04:40", "2016-07-12 16:05:37")), | ||
date.offset = as.integer(c(100, 200)), | ||
subject = c("Re: Fw: busybox 2 tab", "Re: Fw: busybox 10"), | ||
thread = sprintf("<thread-%s>", c(9, 9)), | ||
artifact.type = c("Mail", "Mail")) | ||
|
||
commit.data = x.data$get.data.cut.to.same.date(data.sources = data.sources)$get.commits() | ||
rownames(commit.data) = 1:nrow(commit.data) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
## Copyright 2017 by Christian Hechtl <[email protected]> | ||
## Copyright 2018 by Claus Hunsen <[email protected]> | ||
## Copyright 2018 by Thomas Bock <[email protected]> | ||
## Copyright 2020 by Thomas Bock <[email protected]> | ||
## Copyright 2018 by Jakob Kronawitter <[email protected]> | ||
## All Rights Reserved. | ||
|
||
|
@@ -62,14 +63,14 @@ test_that("Cut commit and mail data to same date range.", { | |
artifact.type = c("Feature", "Feature"), | ||
artifact.diff.size = as.integer(c(1, 1))) | ||
|
||
mail.data.expected = data.frame(author.name = c("Thomas"), | ||
author.email = c("[email protected]"), | ||
message.id = c("<[email protected]>"), | ||
date = get.date.from.string(c("2016-07-12 16:04:40")), | ||
date.offset = as.integer(c(100)), | ||
subject = c("Re: Fw: busybox 2 tab"), | ||
thread = sprintf("<thread-%s>", c(9)), | ||
artifact.type = "Mail") | ||
mail.data.expected = data.frame(author.name = c("Thomas", "Olaf"), | ||
author.email = c("[email protected]", "[email protected]"), | ||
message.id = c("<[email protected]>", "<[email protected]>"), | ||
date = get.date.from.string(c("2016-07-12 16:04:40", "2016-07-12 16:05:37")), | ||
date.offset = as.integer(c(100, 200)), | ||
subject = c("Re: Fw: busybox 2 tab", "Re: Fw: busybox 10"), | ||
thread = sprintf("<thread-%s>", c(9, 9)), | ||
artifact.type = c("Mail", "Mail")) | ||
|
||
commit.data = x$get.project.data()$get.commits() | ||
rownames(commit.data) = 1:nrow(commit.data) | ||
|
Oops, something went wrong.