Skip to content
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

Merged
merged 12 commits into from
Jun 6, 2018

Conversation

klaraschlueter
Copy link

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

Changed/Improved

Fixed

  • Change the type of all commit count default values to Integer

Klara added 11 commits May 30, 2018 15:23
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>
Copy link
Collaborator

@clhunsen clhunsen left a 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
Copy link
Collaborator

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.

@@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"committer"

return(res)
}

#' Get the commit count per person in the given range data where it is commiter or author or both.
Copy link
Collaborator

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."


## 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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"WHERE"

#' \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]
Copy link
Collaborator

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) {
Copy link
Collaborator

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.

@clhunsen clhunsen added this to the v3.3 milestone May 31, 2018
@@ -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.
Copy link
Contributor

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

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
Copy link
Contributor

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>
@clhunsen
Copy link
Collaborator

clhunsen commented Jun 6, 2018

Thank you very much for your additions to the network library, @klaraschlueter. Nice work! 👍

@clhunsen clhunsen merged commit f4aaa44 into se-sic:dev Jun 6, 2018
@clhunsen clhunsen mentioned this pull request Jun 7, 2018
6 tasks
@clhunsen clhunsen mentioned this pull request Jul 24, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants