-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-edges to the author and artifact networks #115
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2f1b4d9
Add implemention of multi-edge-networks for author and artifact networks
ecklbarb b55d3e8
Adapt plot functions to multi-edge networks
ecklbarb f190ca1
Use color palette 'viridis' for plotting for better flexibility
ecklbarb 7c628fb
Introduce the vertex attribute 'kind'
ecklbarb 021ac8b
Change the 'simplify.network' function to handle multi-edge networks
ecklbarb 784c417
Include 'relation' and 'kind' in the expected data of the test suite
ecklbarb 7ad49c4
Remove vertex attribute 'id' and add vertex attribute 'artifact.type'
ecklbarb be6ee8c
Add tests for networks with multiple relations
ecklbarb 2941c22
Set Copyright in test suite
ecklbarb cd4645f
Add description of edge and vertex attributes in 'README'
ecklbarb 3e286ac
Bug fix: Set attribute 'artifact.type' correctly
ecklbarb c2e92c7
Bug fix: Plotting multi networks
ecklbarb e95afd0
Update changelog
ecklbarb ef094eb
Minor fixes from review in PR #115
ecklbarb d791df8
Change plot function: edge width depends on edge weight
ecklbarb 86f39c5
Remove unneeded browser() statements
clhunsen 84516fc
Streamline and improve vertex and edge attributes
clhunsen 4dead55
Adjust resolution of vertex attribute 'kind'
clhunsen a9605c6
Rename artifact-vertex kind for mail relation to 'MailThread'
clhunsen 78c7c87
Rename artifact type for issue relation to 'IssueComment'
clhunsen 26f0c59
Fix plot legends
clhunsen 0817dd8
Add additional parameters to network simplification functions
bockthom 74bd090
Rename artifact type for issue relation to 'IssueEvent'
ecklbarb 8833ae8
Minor fixes from review in PR #115
ecklbarb 9e68293
Add comment
ecklbarb b5e03ac
Simplify resolution of vertex kind for artifact networks
clhunsen bc3c8c1
Adjust return value of 'construct.edge.list.from.key.value.list'
clhunsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
## Copyright 2017 by Christian Hechtl <[email protected]> | ||
## Copyright 2017 by Felix Prasse <[email protected]> | ||
## Copyright 2018 by Claus Hunsen <[email protected]> | ||
## Copyright 2018 by Barbara Eckl <[email protected]> | ||
## All Rights Reserved. | ||
|
||
|
||
|
@@ -68,7 +69,8 @@ test_that("Cut commit and mail data to same date range.", { | |
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))) | ||
thread = sprintf("<thread-%s>", c(9)), | ||
artifact.type = "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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
## | ||
## Copyright 2017-2018 by Christian Hechtl <[email protected]> | ||
## Copyright 2017 by Claus Hunsen <[email protected]> | ||
## Copyright 2018 by Barbara Eckl <[email protected]> | ||
## All Rights Reserved. | ||
|
||
|
||
|
@@ -47,22 +48,25 @@ test_that("Network construction of the undirected artifact-cochange network", { | |
network.built = network.builder$get.artifact.network() | ||
|
||
## vertex attributes | ||
vertices = c("Base_Feature", "foo", "A") | ||
vertices = data.frame(name = c("Base_Feature", "foo", "A"), | ||
kind = "Feature", | ||
type = TYPE.ARTIFACT) | ||
|
||
data = data.frame(from = c("Base_Feature", "Base_Feature"), | ||
to = c("foo", "foo"), | ||
date = get.date.from.string(c("2016-07-12 16:06:32", "2016-07-12 16:06:32")), | ||
hash = c("0a1a5c523d835459c42f33e863623138555e2526", "0a1a5c523d835459c42f33e863623138555e2526"), | ||
file = c("test2.c", "test2.c"), | ||
artifact.type = c("Feature", "Feature"), | ||
artifact = c("Base_Feature", "foo"), | ||
weight = c(1, 1), | ||
type = TYPE.EDGES.INTRA) | ||
data = data.frame( | ||
from = c("Base_Feature", "Base_Feature"), | ||
to = c("foo", "foo"), | ||
date = get.date.from.string(c("2016-07-12 16:06:32", "2016-07-12 16:06:32")), | ||
artifact.type = c("Feature", "Feature"), | ||
hash = c("0a1a5c523d835459c42f33e863623138555e2526", "0a1a5c523d835459c42f33e863623138555e2526"), | ||
file = c("test2.c", "test2.c"), | ||
artifact = c("Base_Feature", "foo"), | ||
weight = 1, | ||
type = TYPE.EDGES.INTRA, | ||
relation = "cochange" | ||
) | ||
|
||
## build expected network | ||
network.expected = igraph::graph.data.frame(data, directed = FALSE, vertices = vertices) | ||
network.expected = igraph::set.vertex.attribute(network.expected, "id", value = igraph::get.vertex.attribute(network.expected, "name")) | ||
igraph::V(network.expected)$type = TYPE.ARTIFACT | ||
|
||
expect_true(igraph::identical_graphs(network.built, network.expected)) | ||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bockthom: Just as a reminder: When packing the next release, we need to combine the duplicate headings named
## unversioned
.