Skip to content

Commit

Permalink
Adjust NEWS.md, update mail count tests
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Hostert <[email protected]>
  • Loading branch information
JoJoDeveloping committed Apr 28, 2021
1 parent 436e4c9 commit d113945
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
8 changes: 5 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ and their respective centrality values (d3cd528609480f87658601ef13326e950a74cce7
- Add `get.data.sources.from.relations` to `util-networks.R` which extracts the data sources of a network that were used when building it (PR #195, d1e4413a49ab83a115a7f26719592876371ab264)
- Add tests for the `get.data.sources.from.relations` function (PR #195, add0c746dde8279da41d180deecf52b91a46095c)
- Add logo directory containing several logo variants (PR #196, 82f99719b8a43b0a44914b67b26bf1a34bb076c6, dc4659ea354e97159f8ee6167811db544f0b7087, fdc5e677325225f92d1f99948cb9441bfe1d150d, 752a9b376ffeffd5d6b380b4fdba838a890e3ef7)
- Add per-author vertex attributes regarding issue/pull request/mail count and derived quantities (like mail thread count, issue creation count) (PR #194, 9f9150a97ffbb64607df0ddcbce299e16c2580da, 7260d62cf6f1470584753f76970d19664638eeed, 139f70b67903909bcd4c57e26afa458681a869f2, eb4f649c04155e22195627072e0f08bb8fe65dc4, 627873c641410182ca8fee0e78b95d7bda1e8e6b, 1e1406f4a0898cac3e61a7bc9a5aa665dceef79f, 98e11abc651b5fe0ec994eddea078635b0d6f0b2, cc64b9b3e3f3e33798a6d138225f745bd2f550a0)
- Add function `preprocess.issue.data`, which implements common issue data filtering operations.
- Add function `get.issues.filtered.uncached`, which gets the issues filtered without poisoning or using the cache.
- Add per-author vertex attributes regarding counting of issues, issue-creations, issue-comments, mails, mail-threads, ... (like mail thread count, issue creation count) (PR #194, issue #188, 9f9150a97ffbb64607df0ddcbce299e16c2580da, 7260d62cf6f1470584753f76970d19664638eeed, 139f70b67903909bcd4c57e26afa458681a869f2, eb4f649c04155e22195627072e0f08bb8fe65dc4, 627873c641410182ca8fee0e78b95d7bda1e8e6b, 1e1406f4a0898cac3e61a7bc9a5aa665dceef79f, 98e11abc651b5fe0ec994eddea078635b0d6f0b2, a566caec6d7e649cc495d292a19eca8a7ffccde8)

### Changed/Improved
- Add `.drone.yml` to enable running our CI pipelines on drone.io (PR #191, 1c5804b59c582cf34af6970b435add51452fbd11)
- Update documentation in `util-network-metrics.R` (PR #195, f929248182594613bd203e100268e3e3dce87f34, de9988cc171cafdd084701d5a2693a74176a802a)
- Add check for empty network in `metrics.hub.degree` function. In the case of an empty network, a warning is being printed and `NA` is returned (PR #195, 4b164bebea1e8258cb93febf51271a4b6f486779)
- Adjust the function `ProjectData$get.artifacts`: Rename its single parameter to `data.sources` and change the function so that it can extract the artifacts for multiple data sources at once. The default is still that only artifacts from the commit data are extracted. (PR #195, cf795f26652b00de5d717c703c688af55a972943, 70c05ecd1e3c0f10810acc2b2ae06a3eb8856317, 5a46ff4d428af7f301fe57d6e9e10421f553a9cc, fd767bb37ca608c28d9ff4a449415cc0e863d7ee)
- Rename `get.issues` to `get.issues.filtered`, and write a new `get.issues` to get the unfiltered issues so that these methods follow the naming scheme known from the respective methods for commits (b9dd94c8575b8cab40d0d1185368854f84299d87)
- Rename `get.issues` to `get.issues.filtered`, write a new `get.issues` to get the unfiltered issues so that these methods follow the naming scheme known from the respective methods for commits, and add `get.issues.filtered.uncached` (b9dd94c8575b8cab40d0d1185368854f84299d87)

### Fixed
- Fix fencing issue timing data so that all issue actions "happen" after the issue was created (issue #185, 627873c641410182ca8fee0e78b95d7bda1e8e6b, 6ff585d9da1da3432668605f0c09f8e182ad0d2f)
- Fix fencing issue timing data so that all issue events "happen" after the issue was created (issue #185, 627873c641410182ca8fee0e78b95d7bda1e8e6b, 6ff585d9da1da3432668605f0c09f8e182ad0d2f)


## 3.7
Expand Down
30 changes: 15 additions & 15 deletions tests/test-networks-covariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,15 @@ test_that("Test add.vertex.attribute.commit.count.committer.or.author", {
#' Test the add.vertex.attribute.mail.count method
test_that("Test add.vertex.attribute.mail.count", {
## Test setup
networks.and.data = get.network.covariates.test.networks()
networks.and.data = get.network.covariates.test.networks(author.relation = "mail")

expected.attributes = list(
range = network.covariates.test.build.expected(c(1L), c(0L), c(1L, 0L, 0L)),
cumulative = network.covariates.test.build.expected(c(1L), c(1L), c(2L, 0L, 1L)),
all.ranges = network.covariates.test.build.expected(c(1L), c(2L), c(2L, 0L, 1L)),
project.cumulative = network.covariates.test.build.expected(c(3L), c(1L), c(2L, 0L, 1L)),
project.all.ranges = network.covariates.test.build.expected(c(3L), c(2L), c(2L, 0L, 1L)),
complete = network.covariates.test.build.expected(c(3L), c(2L), c(2L, 0L, 1L))
range = network.covariates.test.build.expected(c(1L, 1L), c(1L), c(1L)),
cumulative = network.covariates.test.build.expected(c(1L, 1L), c(1L), c(2L)),
all.ranges = network.covariates.test.build.expected(c(1L, 2L), c(1L), c(2L)),
project.cumulative = network.covariates.test.build.expected(c(3L, 1L), c(1L), c(2L)),
project.all.ranges = network.covariates.test.build.expected(c(3L, 2L), c(1L), c(2L)),
complete = network.covariates.test.build.expected(c(3L, 2L), c(1L), c(2L))
)

## Test
Expand All @@ -525,20 +525,20 @@ test_that("Test add.vertex.attribute.mail.count", {
#' Test the add.vertex.attribute.mail.count method
test_that("Test add.vertex.attribute.mail.thread.count", {
## Test setup
networks.and.data = get.network.covariates.test.networks()
networks.and.data = get.network.covariates.test.networks(author.relation = "mail")

expected.attributes = list(
range = network.covariates.test.build.expected(c(1L), c(0L), c(1L, 0L, 0L)),
cumulative = network.covariates.test.build.expected(c(1L), c(1L), c(2L, 0L, 1L)),
all.ranges = network.covariates.test.build.expected(c(1L), c(2L), c(2L, 0L, 1L)),
project.cumulative = network.covariates.test.build.expected(c(3L), c(1L), c(2L, 0L, 1L)),
project.all.ranges = network.covariates.test.build.expected(c(3L), c(2L), c(2L, 0L, 1L)),
complete = network.covariates.test.build.expected(c(3L), c(2L), c(2L, 0L, 1L))
range = network.covariates.test.build.expected(c(1L, 1L), c(1L), c(1L)),
cumulative = network.covariates.test.build.expected(c(1L, 1L), c(1L), c(2L)),
all.ranges = network.covariates.test.build.expected(c(1L, 2L), c(1L), c(2L)),
project.cumulative = network.covariates.test.build.expected(c(3L, 1L), c(1L), c(2L)),
project.all.ranges = network.covariates.test.build.expected(c(3L, 2L), c(1L), c(2L)),
complete = network.covariates.test.build.expected(c(3L, 2L), c(1L), c(2L))
)

## Test

lapply(AGGREGATION.LEVELS, function(level) {
lapply(AGGREGATION.LEVELS, function(level) {logging::logerror(level)
networks.with.attr = add.vertex.attribute.mail.thread.count(
networks.and.data[["networks"]], networks.and.data[["project.data"]], aggregation.level = level
)
Expand Down

0 comments on commit d113945

Please sign in to comment.