diff --git a/tests/test-data.R b/tests/test-data.R index 8794abef..09f323ae 100644 --- a/tests/test-data.R +++ b/tests/test-data.R @@ -71,11 +71,11 @@ test_that("Compare two ProjectData objects", { expect_true(proj.data.one$equals(proj.data.two), "Two identical ProjectData objects.") - proj.data.one$get.issues() + proj.data.one$get.issues.filtered() expect_false(proj.data.one$equals(proj.data.two), "Two not identical ProjectData objects.") - proj.data.two$get.issues() + proj.data.two$get.issues.filtered() expect_true(proj.data.one$equals(proj.data.two), "Two identical ProjectData objects.") diff --git a/tests/test-split-sliding-window.R b/tests/test-split-sliding-window.R index 72ce006a..19efbb96 100644 --- a/tests/test-split-sliding-window.R +++ b/tests/test-split-sliding-window.R @@ -68,7 +68,7 @@ test_that("Split a data object time-based (split.basis = 'commits', sliding.wind data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -138,7 +138,7 @@ test_that("Split a data object time-based (split.basis = 'commits', sliding.wind results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -164,7 +164,7 @@ test_that("Split a data object time-based (split.basis = 'mails', sliding.window data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -248,7 +248,7 @@ test_that("Split a data object time-based (split.basis = 'mails', sliding.window results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -274,7 +274,7 @@ test_that("Split a data object time-based (split.basis = 'issues', sliding.windo data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -337,7 +337,7 @@ test_that("Split a data object time-based (split.basis = 'issues', sliding.windo results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -364,7 +364,7 @@ test_that("Split a data object time-based (bins = ... , sliding.window = TRUE)." data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -413,7 +413,7 @@ test_that("Split a data object time-based (bins = ... , sliding.window = TRUE)." results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -439,7 +439,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -501,7 +501,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -547,7 +547,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -600,7 +600,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -643,7 +643,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -712,7 +712,7 @@ test_that("Split a data object activity-based (activity.type = 'commits', slidin results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -738,7 +738,7 @@ test_that("Split a data object activity-based (activity.type = 'mails', sliding. data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -842,7 +842,7 @@ test_that("Split a data object activity-based (activity.type = 'mails', sliding. results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -888,7 +888,7 @@ test_that("Split a data object activity-based (activity.type = 'mails', sliding. results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -941,7 +941,7 @@ test_that("Split a data object activity-based (activity.type = 'mails', sliding. results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -979,7 +979,7 @@ test_that("Split a data object activity-based (activity.type = 'issues', sliding data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -1076,7 +1076,7 @@ test_that("Split a data object activity-based (activity.type = 'issues', sliding results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1122,7 +1122,7 @@ test_that("Split a data object activity-based (activity.type = 'issues', sliding results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1175,7 +1175,7 @@ test_that("Split a data object activity-based (activity.type = 'issues', sliding results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1186,7 +1186,7 @@ test_that("Split a data object activity-based (activity.type = 'issues', sliding expect_error( split.data.activity.based(project.data, activity.type = "issues", - number.windows = nrow(project.data$get.issues()) + 10, sliding.window = TRUE), + number.windows = nrow(project.data$get.issues.filtered()) + 10, sliding.window = TRUE), info = "Error expected (number.windows) (1)." ) diff --git a/tests/test-split.R b/tests/test-split.R index b430e38f..a4fff6ba 100644 --- a/tests/test-split.R +++ b/tests/test-split.R @@ -75,7 +75,7 @@ test_that("Split a data object time-based (split.basis = 'commits').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -130,7 +130,7 @@ test_that("Split a data object time-based (split.basis = 'commits').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -157,7 +157,7 @@ test_that("Split a data object time-based (split.basis = 'mails').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -220,7 +220,7 @@ test_that("Split a data object time-based (split.basis = 'mails').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -246,7 +246,7 @@ test_that("Split a data object time-based (split.basis = 'issues').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -302,7 +302,7 @@ test_that("Split a data object time-based (split.basis = 'issues').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -330,7 +330,7 @@ test_that("Split a data object time-based (bins = ... ).", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -371,7 +371,7 @@ test_that("Split a data object time-based (bins = ... ).", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -476,7 +476,7 @@ test_that("Test splitting data by ranges", { expected.data = list( commits = lapply(expected.results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(expected.results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(expected.results, function(cf.data) cf.data$get.issues()), + issues = lapply(expected.results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(expected.results, function(cf.data) cf.data$get.mails()), pasta = lapply(expected.results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(expected.results, function(cf.data) cf.data$get.synchronicity()) @@ -484,7 +484,7 @@ test_that("Test splitting data by ranges", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -510,7 +510,7 @@ test_that("Split a data object activity-based (activity.type = 'commits').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -565,7 +565,7 @@ test_that("Split a data object activity-based (activity.type = 'commits').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -611,7 +611,7 @@ test_that("Split a data object activity-based (activity.type = 'commits').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -664,7 +664,7 @@ test_that("Split a data object activity-based (activity.type = 'commits').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -702,7 +702,7 @@ test_that("Split a data object activity-based (activity.type = 'mails').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -778,7 +778,7 @@ test_that("Split a data object activity-based (activity.type = 'mails').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -824,7 +824,7 @@ test_that("Split a data object activity-based (activity.type = 'mails').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -877,7 +877,7 @@ test_that("Split a data object activity-based (activity.type = 'mails').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -914,7 +914,7 @@ test_that("Split a data object activity-based (activity.type = 'issues').", { data = list( commits = project.data$get.commits(), commit.messages = project.data$get.commit.messages(), - issues = project.data$get.issues(), + issues = project.data$get.issues.filtered(), mails = project.data$get.mails(), pasta = project.data$get.pasta(), synchronicity = project.data$get.synchronicity() @@ -983,7 +983,7 @@ test_that("Split a data object activity-based (activity.type = 'issues').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1029,7 +1029,7 @@ test_that("Split a data object activity-based (activity.type = 'issues').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1082,7 +1082,7 @@ test_that("Split a data object activity-based (activity.type = 'issues').", { results.data = list( commits = lapply(results, function(cf.data) cf.data$get.commits()), commit.messages = lapply(results, function(cf.data) cf.data$get.commit.messages()), - issues = lapply(results, function(cf.data) cf.data$get.issues()), + issues = lapply(results, function(cf.data) cf.data$get.issues.filtered()), mails = lapply(results, function(cf.data) cf.data$get.mails()), pasta = lapply(results, function(cf.data) cf.data$get.pasta()), synchronicity = lapply(results, function(cf.data) cf.data$get.synchronicity()) @@ -1092,7 +1092,7 @@ test_that("Split a data object activity-based (activity.type = 'issues').", { ## too large number of windows expect_error( - split.data.activity.based(project.data, activity.type = "issues", number.windows = nrow(project.data$get.issues()) + 10), + split.data.activity.based(project.data, activity.type = "issues", number.windows = nrow(project.data$get.issues.filtered()) + 10), info = "Error expected (number.windows) (1)." ) diff --git a/tests/testthat-problems.rds b/tests/testthat-problems.rds index 65ac1054..7cdad4c6 100644 Binary files a/tests/testthat-problems.rds and b/tests/testthat-problems.rds differ diff --git a/util-core-peripheral.R b/util-core-peripheral.R index 270c64ba..94aa858e 100644 --- a/util-core-peripheral.R +++ b/util-core-peripheral.R @@ -824,7 +824,7 @@ get.author.mail.thread.count = function(proj.data) { #' preprocess.issue.data = function(proj.data, type = c("all", "pull.requests", "issues")) { type = match.arg(type) - df = proj.data$get.issues.unfiltered() + df = proj.data$get.issues() # if k is a list, and nrow(df) == 0, then df[k, ..] fails # so we abort beforehand if (nrow(df) == 0) { diff --git a/util-data.R b/util-data.R index 9f362df0..4215e8c7 100644 --- a/util-data.R +++ b/util-data.R @@ -57,7 +57,7 @@ BASE.ARTIFACTS = c( DATASOURCE.TO.ARTIFACT.FUNCTION = list( "commits" = "get.commits.filtered", "mails" = "get.mails", - "issues" = "get.issues" + "issues" = "get.issues.filtered" ) ## mapping of data source to artifact column @@ -1073,12 +1073,12 @@ ProjectData = R6::R6Class("ProjectData", #' If it does not already exist call the read method. #' #' @return the issue data - get.issues = function() { + get.issues.filtered = function() { logging::loginfo("Getting issue data") ## if issues have not been read yet do this if (is.null(private$issues.filtered)) { - private$issues.filtered = self$get.issues.unfiltered() + private$issues.filtered = self$get.issues() if (private$project.conf$get.value("issues.only.comments")) { private$issues.filtered = private$issues.filtered[private$issues[["event.name"]] == "commented", ] } @@ -1091,7 +1091,7 @@ ProjectData = R6::R6Class("ProjectData", #' If it does not already exist call the read method. #' #' @return the issue data - get.issues.unfiltered = function() { + get.issues = function() { logging::loginfo("Getting issue data") ## if issues have not been read yet do this diff --git a/util-split.R b/util-split.R index 1d62a8a0..b11902a4 100644 --- a/util-split.R +++ b/util-split.R @@ -64,7 +64,7 @@ split.data.time.based = function(project.data, time.period = "3 months", bins = data = list( commits = project.data$get.commits(), mails = project.data$get.mails(), - issues = project.data$get.issues.unfiltered() + issues = project.data$get.issues() ) split.data = names(data) names(split.data) = split.data @@ -238,7 +238,7 @@ split.data.activity.based = function(project.data, activity.type = c("commits", data = list( commits = project.data$get.commits(), mails = project.data$get.mails(), - issues = project.data$get.issues.unfiltered() + issues = project.data$get.issues() ) ## define ID columns for mails and commits