-
Notifications
You must be signed in to change notification settings - Fork 157
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
[#944] Implement authorship analysis #2140
[#944] Implement authorship analysis #2140
Conversation
…to authorship reporter
switch to a new segment if changes
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.
Hey @SkyBlaise99, thanks for your awesome work on the frontend! Everything looks good to me. Really appreciate the detailed comments in your Cypress tests and your continued work in improving the code and UI.
Have left a few comments for the docs.
@ckcherry23 you might need to look again, I added in the codes about the legend as well as requested. |
Can you please add a screenshot of how the legend looks now with the rest of the panel? |
Thanks for saving me time with the pics! I think you can remove the centre divider and optionally add some padding instead. Otherwise, the legend LGTM! Edit: Seems like other CSS values are also multiples of 5, so we can continue to use such values. |
with previous summary.json
previous authorship.json
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.
Took another pass at the backend changes and things seem to be in order. Thanks for the great work on this feature!
Let's create an associated follow-up issue (created here: #2196) for using GitBlameLineInfo
in aggregateBlameAuthorModifiedAndDateInfo
of FileInfoAnalyzer.java
@SkyBlaise99 Whenever you're available, can you fix the linting errors causing the CI to fail? |
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.
LGTM, tested it with the new flag combinations, and it works as per expected and does not affect any other existing functionality. I think this is a really cool feature, great job on it!
The following links are for previewing this pull request:
|
Fixes #944
Proposed commit message
Other information
Changes in Frontend
Added a new entry:
isFullCredit
to be read fromauthorship.json
files. (types.ts, authorship-type.ts, c-authorship.vue)A darker colour represents full credit while a lighter colour represents partial credit. (c-segment.vue, _colors.scss)
Added a new entry:
isAuthorshipAnalyzed
to be read fromsummary.json
file. (window.ts, summary-type.ts, api.ts)Added a legend for full/partial color scheme, only shown when
isAuthorshipAnalyzed
istrue
(i.e. full/partial credit analysis was turned on). (c-authorship.vue)Changes in Backend
--analyze-authorship
or-A
to enable the featurefalse
)true
by default if required, since runtime decreased by a lot (90 min -> 13 min).--originality-threshold
or-ot
to manually set the threshold0.0 ~ 1.0
0.51
l
by authora
.l
, the deleted linesdl
with the lowest originality score (same idea as highest similarity score). Letda
be the author ofdl
.a != da
(Soa
updated lines a little bit)dl
andda
git log
andgit diff
getLevenshteinDistance()
getLevenshteinDistance()
@@author tags
)last author == annotated author
-> Do nothing since it's the same author, credit information is retained.
last author != annotated author
-> Overwrite author as usual, partial credit is given to annotated author as we are not sure the exact contribution since it is claimed.