-
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
Complement commit count vertex attribute possibilities #127
Complement commit count vertex attribute possibilities #127
Conversation
The function takes project data and returns a dataframe containing the commit count per person counting commits, where the person is author and committer. Works with SQL, analogous to other methods in the same file. It is used for the adding the commit count as vertex attribute. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
… attribute The function adds the commit count per person (counting commits, where the person is the author AND the committer) to the vertices of the networks given as a list, analogous to already existing functions in the same class. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
The function takes project data and returns a dataframe containing the commit count per person (counting commits, where the person is author OR committer), working wie SQL, analogous to already existing methods in the same file.
The function adds the commit count per person (counting the commits, where the person is author OR commiter) as attributes to the vertices of the given networks, working analogous to already existing methods in the same file. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
The commit data in the test data is complemented by committer information in addition to author information. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau>
Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
The functions for adding a commit count as vertex attribute set as default value an Integer now. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
As committer data was added to test commit data earlier, the tests for reading and cutting the test project data expected incomplete data. To resolve this, tests in test-data-cut.R, test-network-cut.R and test-read.R are adapted to the new test data. Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
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.
Thank you very much for your enhancements, @klaraschlueter. Nice work! 👍
Overall, the code looks good to me, there are just some small things that can be improved in an additional commit. (You can use ef094eb as an reference for the commit message.)
NEWS.md
Outdated
## unversioned | ||
|
||
### Added | ||
- Possibility to add the commit count per person as vertex attribute, counting either commits, where the person ist committer AND author, or committer OR author |
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.
Please add the respective issue IDs and commit hashes to the added changes in the changelog file. You do not need to add all hashes if there are several, but the most important ones should be listed (i.e., those commits where the basic functionality is added, not all the test-suite enhancements). See below for the examples.
Additionally, "ist" is not an English word. 😉
Please also add the addition of committer information to the test data (see tests/codeface-data/results/testing/test_feature/feature/commits.list
) to the Changed/Improved
part of the changelog.
util-core-peripheral.R
Outdated
@@ -522,6 +522,66 @@ get.committer.not.author.commit.count = function(range.data) { | |||
return(res) | |||
} | |||
|
|||
#' Get the commit count per person in the given range data for commits where the author equals the commiter. |
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.
"committer"
util-core-peripheral.R
Outdated
return(res) | ||
} | ||
|
||
#' Get the commit count per person in the given range data where it is commiter or author or both. |
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.
"... where the person is committer or author or both."
util-core-peripheral.R
Outdated
|
||
## Execute queries to get the commit count per person | ||
ungrouped = sqldf::sqldf("SELECT `committer.name` AS `name` FROM `commits.df` | ||
WhERE `committer.name` = `author.name` |
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.
"WHERE"
util-networks-covariates.R
Outdated
#' \code{"project.cumulative"}, \code{"project.all.ranges"}, and | ||
#' \code{"complete"}. See \code{split.data.by.networks} for | ||
#' more details. [default: "range"] | ||
#' @param default.value The default value to add if a vertex has no matching value [default: 0] |
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.
The default value is 0L
.
@@ -134,7 +134,7 @@ add.vertex.attribute.commit.count.author = function(list.of.networks, project.da | |||
aggregation.level = c("range", "cumulative", "all.ranges", | |||
"project.cumulative", "project.all.ranges", | |||
"complete"), | |||
default.value = 0) { | |||
default.value = 0L) { |
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.
Please update the function ocumentation regarding the new default value. This also holds for all other changed default values below.
util-networks-covariates.R
Outdated
@@ -223,6 +223,61 @@ add.vertex.attribute.commit.count.committer.not.author = function(list.of.networ | |||
return(nets.with.attr) | |||
} | |||
|
|||
#' Add commit-count attribute based on comitter name where the committer equals the author. |
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.
"committer" is once written with one m and once with two
util-core-peripheral.R
Outdated
logging::logdebug("get.committer.or.author.commit.count: finished.") | ||
return(res) | ||
} | ||
|
||
#' Get the commit count per comitter in the given range data, where the committer |
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.
"committer" is once written with one m and once with two
I know this is not your code. But the copy-paste-error below should be originated here. Maybe you can change it here as well.
Signed-off-by: Klara Schlueter <schluete@fim.uni-passau.de>
Thank you very much for your additions to the network library, @klaraschlueter. Nice work! 👍 |
Added
Changed/Improved
Fixed