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

Add further vertex attributes for author vertices #188

Closed
4 tasks done
bockthom opened this issue Dec 1, 2020 · 2 comments
Closed
4 tasks done

Add further vertex attributes for author vertices #188

bockthom opened this issue Dec 1, 2020 · 2 comments

Comments

@bockthom
Copy link
Collaborator

bockthom commented Dec 1, 2020

Description

Complementary to #92 and #170, we should also add further vertex attributes for author vertices that deal with other data sources than commits. At the moment, we (almost) only have commit-related vertex attributes for authors, such as
add.vertex.attribute.commit.count.author,
add.vertex.attribute.commit.count.committer (and several more of them combining author and committer information),
add.vertex.attribute.artifact.count (only for source-code artifacts (files, functions, etc.)

Along with them, we need to create new functions to determine

  • mail.count,
  • mail.thread.count,
  • issue.count (possibly also PR count?) ,
  • issue.comment.count, etc...

[The idea of this issue is rather old, but it has not been documented properly yet. So I just opened this issue to not forget about it.]

Ideas for the Implementation

To get the mail count etc. as values, we need new functions like get.author.mail.count. To achieve that, see also the following comment: #70 (comment)

For the implementation of the vertex attributes, see the current implementations for the commit-count attribute L156ff and for the artifact-count attribute L385ff.

@JoJoDeveloping
Copy link
Contributor

For the implementation of the vertex attributes, see the current implementations for the commit-count attribute L156ff and for the artifact-count attribute L385ff.

Where are these functions actually called from?

@bockthom
Copy link
Collaborator Author

Where are these functions actually called from?

These functions are called by the end-user of coronet 😄 That is, they are not called inside coronet but are called by outside scripts which use coronet as a library.

However, if you are looking for example use cases, you can find an exemplary code snippet in our showcase.R file -- which just displays how to use vertex attributes in general, not using each of these functions, but the usage is very similar for all of these functions:

coronet/showcase.R

Lines 160 to 179 in 91fc448

## Vertex attributes -------------------------------------------------------
# ## define bins for network construction
# mybins = c("2012-07-10 15:58:00", "2012-07-15 16:02:00", "2012-07-20 16:04:00", "2012-07-25 16:06:30")
# ## split data into ranges
# cf.data = split.data.time.based(x.data, bins = mybins)
# ## construct (author) networks from range data
# my.networks = lapply(cf.data, function(range.data) {
# y = NetworkBuilder$new(project.data = range.data, network.conf = net.conf)
# return (y$get.author.network())
# })
# ## add commit-count vertex attributes
# sample = add.vertex.attribute.commit.count.author(my.networks, x.data, aggregation.level = "range")
# sample.cumulative = add.vertex.attribute.commit.count.author(my.networks, x.data, aggregation.level = "cumulative")
# ## add email-address vertex attribute
# sample.mail = add.vertex.attribute.author.email(my.networks, x.data, "author.email")
# ## add vertex attributes for the project-level network
# x.net.as.list = list("1970-01-01 00:00:00-2030-01-01 00:00:00" = x$get.author.network())
# sample.entire = add.vertex.attribute.commit.count.author(x.net.as.list, x.data, aggregation.level = "complete")

In addition to that, these functions are also tested properly and therefore, of course, called in our test-suite: test-networks-covariates.R

Does this answer your question? If you need further information, don't hesitate to ask.

JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Jan 27, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Feb 7, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Feb 7, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Feb 7, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Mar 23, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Mar 23, 2021
JoJoDeveloping added a commit to JoJoDeveloping/coronet that referenced this issue Mar 23, 2021
Tests for PRs are missing since there is no test data including PRs yet

Signed-off-by: Johannes Hostert <[email protected]>
@bockthom bockthom mentioned this issue Sep 1, 2021
@bockthom bockthom closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants