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

Adding commit-interactions #252

Merged
merged 38 commits into from
Apr 23, 2024
Merged

Adding commit-interactions #252

merged 38 commits into from
Apr 23, 2024

Conversation

Leo-Send
Copy link
Contributor

@Leo-Send Leo-Send commented Feb 12, 2024

Prerequisites

  • I adhere to the coding conventions (described here) in my code.
  • I have updated the copyright headers of the files I have modified.
  • I have written appropriate commit messages, i.e., I have recorded the goal, the need, the needed changes, and the location of my code modifications for each commit. This includes also, e.g., referencing to relevant issues.
  • I have put signed-off tags in all commits.
  • I have updated the changelog file NEWS.md appropriately.
  • I have checked whether I need to adjust the showcase file showcase.R with respect to my changes.
  • The pull request is opened against the branch 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

@Leo-Send Leo-Send force-pushed the pullrequest branch 6 times, most recently from 0b28e62 to 0e269af Compare March 6, 2024 12:52
@Leo-Send Leo-Send marked this pull request as ready for review March 8, 2024 12:20
Copy link
Contributor

@hechtlC hechtlC 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 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.

util-data.R Outdated Show resolved Hide resolved
util-data.R Show resolved Hide resolved
util-networks.R Outdated Show resolved Hide resolved
util-networks.R Show resolved Hide resolved
tests/test-networks-artifact.R Outdated Show resolved Hide resolved
Copy link
Collaborator

@bockthom bockthom left a 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 😄

util-data.R Outdated Show resolved Hide resolved
util-data.R Show resolved Hide resolved
util-data.R Outdated Show resolved Hide resolved
util-data.R Outdated Show resolved Hide resolved
util-data.R Outdated Show resolved Hide resolved
tests/test-data.R Show resolved Hide resolved
tests/test-data.R Show resolved Hide resolved
tests/test-networks-author.R Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
@bockthom
Copy link
Collaborator

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

@bockthom bockthom added this to the v4.5 milestone Mar 22, 2024
Copy link
Collaborator

@bockthom bockthom left a 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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tests/README.md Outdated Show resolved Hide resolved
util-networks.R Outdated Show resolved Hide resolved
util-networks.R Outdated Show resolved Hide resolved
util-networks.R Outdated Show resolved Hide resolved
util-read.R Outdated Show resolved Hide resolved
@Leo-Send Leo-Send force-pushed the pullrequest branch 3 times, most recently from b451b2b to 9a5c1a1 Compare April 16, 2024 12:15
Leo-Send added 12 commits April 17, 2024 15:11
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]>
Leo-Send added 17 commits April 17, 2024 15:11
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]>
Copy link
Collaborator

@bockthom bockthom left a 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.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
tests/test-networks-author.R Outdated Show resolved Hide resolved
util-read.R Outdated Show resolved Hide resolved
util-read.R Outdated Show resolved Hide resolved
NEWS.md Show resolved Hide resolved
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]>
Copy link
Collaborator

@bockthom bockthom left a 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.

util-conf.R Show resolved Hide resolved
install.R Outdated Show resolved Hide resolved
Copyright headers in `install.R` and `util-conf`

Signed-off-by: Leo Sendelbach <[email protected]>
Copy link
Contributor

@hechtlC hechtlC left a 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.

@hechtlC hechtlC merged commit 2b38824 into se-sic:dev Apr 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants