-
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
Adding commit-interactions #252
Conversation
0b28e62
to
0e269af
Compare
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 for the addition @Leo-Send ! Looks good apart from some minor points that I have marked in the review. Especially the test data need to be changed and all tests accordingly.
tests/codeface-data/results/testing/test_proximity/proximity/commit-interactions.yaml
Outdated
Show resolved
Hide resolved
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.
@Leo-Send thanks for this great work on commit-interaction data! Adding a completely new data source to coronet is always a hassle. Especially, as there are many small places one is not aware of if you haven't added a new data source to coronet yet. So, no worries, this is quite usual when adding huge new features like this one.
Therefore, I tried to spot these places that demand adjustment; I am pretty sure that there may still be additional places that I did not spot yet during my review... Anyway, in addition, I also spotted a couple of inconsistencies with regard to the behavior of corner cases of other data sources. And I also have some ideas on how to improve specific parts of the implementation.
Please see all my detailed comments below. Don't hesitate to comment on my comments if something is unclear. Also @hechtlC can provide some help on some of the comments, I guess 😄
And one comment that I did forget in my review: There are some commits whose commit messages do not comply with the contribution policy of coronet: Commit messages have to be in present tense, as explained in our contribution guide. That is, commit messages starting with "Changed" or "Added", for example, are not allowed. Instead, please use "Change" or "Add". So, most of your commit messages are ok, but a few commit messages need to be reworded. (Notice that rewording will change the commit hash and also the commit hashes of all subsequent commits during a rebase. So, maybe you perform the rewording in the end when you perform the rebase onto the most recent dev version after our version release.) |
tests/codeface-data/results/testing/test_proximity/proximity/commit-interactions.yaml
Show resolved
Hide resolved
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.
While looking at your new changes, I just spotted a few typos etc.
b451b2b
to
9a5c1a1
Compare
This includes reading and storing the data as well as building author and artifact networks. Signed-off-by: Christian Hechtl <[email protected]> Applied-by: Leo Sendelbach <[email protected]>
Also removed comments and browser statements, as well as added updating of commit-interaction data when commit data is changed if commit-interactions are configured Signed-off-by: Leo Sendelbach <[email protected]>
outdated comment with local data path removed Signed-off-by: Leo Sendelbach <[email protected]>
Uses 'equals' function on Project Data with new commit-interactions Signed-off-by: Leo Sendelbach <[email protected]>
new test reads commit-interactions data and asserts its correctness Signed-off-by: Leo Sendelbach <[email protected]>
An empty file and an example file with four interactions Signed-off-by: Leo Sendelbach <[email protected]>
Checks that the empty dataframe has correct col and rownames Signed-off-by: Leo Sendelbach <[email protected]>
Test that commit-interactions are updated when they are configured and commit data is changed Signed-off-by: Leo Sendelbach <[email protected]>
Also added some linebreaks Signed-off-by: Leo Sendelbach <[email protected]>
in 'update.commit.interactions' Signed-off-by: Leo Sendelbach <[email protected]>
using 'expect_false(isTRUE(all.equal(x, y)))' Signed-off-by: Leo Sendelbach <[email protected]>
Also change the test to reflect this change Signed-off-by: Leo Sendelbach <[email protected]>
Test now checks for 'base.author' and 'interacting.author' as intended Signed-off-by: Leo Sendelbach <[email protected]>
Function removes lines from commit-interactions that do not contain an author in either 'base.author' or 'interacting.author' Signed-off-by: Leo Sendelbach <[email protected]>
Test that a line is removed from a data frame with a missing author Signed-off-by: Leo Sendelbach <[email protected]>
Test easy construction of an author network with interaction as relation Signed-off-by: Leo Sendelbach <[email protected]>
Also in 'get.artifact.network.commit.interaction' distinguish between 'file' and 'function' artifact networks Signed-off-by: Leo Sendelbach <[email protected]>
One simple test for each artifact network configuration (either 'file' or 'function') Signed-off-by: Leo Sendelbach <[email protected]>
It now uses the correct vertices depending on the configuration of either 'file' or 'function'. Signed-off-by: Leo Sendelbach <[email protected]>
Tests now expect the correct vertex kind Signed-off-by: Leo Sendelbach <[email protected]>
vertices now have the correct 'kind' attribute also restructured if statements in artifact network construction Signed-off-by: Leo Sendelbach <[email protected]>
Same points as before with more references to commits Signed-off-by: Leo Sendelbach <[email protected]>
Warning is now uniform with other warnings in project Signed-off-by: Leo Sendelbach <[email protected]>
Also made small changes to testing data to include a commit with specified function and added a warning that should only occur when the commit-interaction data was generated incorrectly Signed-off-by: Leo Sendelbach <[email protected]>
Now uses a custom handler for type 'int' that converts the int to a string, which lets us read the 'region' value for the commits Signed-off-by: Leo Sendelbach <[email protected]>
Fix style issues, modify README.md, add small test and add some comments for clarity Signed-off-by: Leo Sendelbach <[email protected]>
Also add more available edge attributes to network construction Signed-off-by: Leo Sendelbach <[email protected]>
Also use patrick to test for directedness Signed-off-by: Leo Sendelbach <[email protected]>
Read method now exclusively uses names to access data frame Signed-off-by: Leo Sendelbach <[email protected]>
Also remove to points from it as per @bockthom's suggestions Signed-off-by: Leo Sendelbach <[email protected]>
Filtering happens in 'get.commit.interactions' if 'filter.commit.interactions' is TRUE, as it is per default. Signed-off-by: Leo Sendelbach <[email protected]>
Helper function 'prefix.function.with.file.names' in 'util-read.R' Signed-off-by: Leo Sendelbach <[email protected]>
Now also contains an entry for new helper method Signed-off-by: Leo Sendelbach <[email protected]>
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.
Thanks for your additions @Leo-Send. Almost done 😉
I only have a few comments, see them below.
Helper function is now called `prefix.function.with.file.name` and config parameter is called `commit.interactions.filter.global`. Signed-off-by: Leo Sendelbach <[email protected]>
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.
Looks good to me now! I only noticed that your copyright header is missing in two files that you have changed in this PR. Please add the copyright header there, then I am fine with this PR.
Copyright headers in `install.R` and `util-conf` Signed-off-by: Leo Sendelbach <[email protected]>
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.
Looks good thanks @Leo-Send !
I will merge this.
Prerequisites
showcase.R
with respect to my changes.dev
.Description
Add commit-interactions to the project by applying and integrating patch by @hechtlC. This adds two new types of network which are based the commit interaction data and show the interaction between authors and artifacts respectively.
Changelog
read.commit.interactions
for reading, as well asget.commit.interactions
,set.commit.interactions
and utility functions for working with commit-interaction data (PR Adding commit-interactions #252, 5da0e60, 7792a4e, 178265d, 80e6ac5, 1ffa607)create.author.network
andcreate.artifact.network
if theartifact.relation
andauthor.relation
is configured to beinteraction
(PR Adding commit-interactions #252, 5da0e60, deddd4c, 0e269af, d96b10b)