Enhance the codeface data for testing - #286
Conversation
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #286 +/- ##
==========================================
+ Coverage 82.34% 82.55% +0.20%
==========================================
Files 16 16
Lines 5371 5378 +7
==========================================
+ Hits 4423 4440 +17
+ Misses 948 938 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bockthom @hechtlC To follow up our last meeting I have investigated the other uses of the If I remember correctly, @Leo-Send mentioned that commit interaction data is separate but does that exclude it from having to be ordered by date? Currently, there is no reordering after The |
Could you please check if the commit-interaction data is sorted anywhere by any column (e.g., upon reading, etc.) - if there is an ordering assumed, we might think about ensuring the ordering even after merging...
I don't know any reason for that. I guess we simple have overlooked this or we did not care about any ordering. |
Commit interaction data is indeed never ordered. Now the question is, should it be? Every other major data source seems to be ordered in some way, commits, issues and mails by date, authors by id etc. |
|
Regarding |
I agree that it would make sense to order the commit-interaction data in some way - but no idea which way it would make sense here. @Leo-Send @hechtlC any ideas on that? Or comments why ordering might not be a good idea?
Thank you very much @maxloeffler for mentioning this! @hechtlC This was what I wanted to mention in our last meeting but did not remember any more: While debugging stuff I noticed that authors are not ordered by name but by id, which made debugging more tedious to me. I wonder why don't sort authors by name? @maxloeffler Could you please figure out how many tests would break if we would order authors by their name?
Good question. If merging commit messages does destroy the ordering of commits, we should definitely fix that. Is there any reason why not ordering commit-message data initially? I guess we could make it similar to pasta data. Do we order pasta data initially? If so, I'd suggest to also order commit messages initially. Otherwise I'd go with your suggestion. |
Its exactly one test in
No, pasta is initially unsorted. Only after pasta data is merged onto the major data sources, sorting of those major sources is reinforced. So lets do the same for commit message data. As we merge commit message data on either |
|
@maxloeffler regarding the commit interaction data: There should not be a date field anywhere as you suggested. What do you mean by that? And it should not be sorted. |
There are two interesting cases that the codeface data was missing before. 1) Commits that touch multiple different files / functions, 2) Commits by different authors that are issued at the exact same time. This works towards fixing se-sic#284. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Additionally, sort in all cases (even if 'merge' is not called) to acomodate for unsorted input data. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the codeface data used for testing by introducing two new corner cases and maintaining consistency between proximity and feature commit IDs. The changes improve test coverage by adding scenarios where commits touch multiple files/functions and where different authors commit at the same time.
- Enhanced codeface test data with corner cases for multiple files/functions per commit and simultaneous commits by different authors
- Ensured commit ID consistency between proximity and feature data sources
- Improved data ordering preservation during merge operations to maintain correct chronological sequence
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| util-read.R | Updated copyright year and improved author ordering logic |
| util-data.R | Enhanced merge operations to preserve data ordering when adding commit messages, PaStA, and synchronicity data |
| tests/test-*.R | Updated test expectations to reflect new codeface data with additional commits and corner cases |
| tests/codeface-data/ | Added new commit entries with consistent IDs between proximity and feature data sources |
Comments suppressed due to low confidence (1)
util-read.R:528
- [nitpick] Removing the blank line between the try block and the error check reduces code readability. Consider keeping blank lines to separate logical sections of code.
## break if the list of authors is empty
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@maxloeffler Thanks for fixing this, looks good now. Could you please draft the update for the |
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Prerequisites
showcase.Rwith respect to my changes.dev.Description
Enhance the codeface data used for testing to include two new corner cases. Additionally, maintain consistency in the commit ids between proximity and feature data.
Changelog