-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Implement a duplicate checker for Citation Relations entities #11186
Conversation
- implemented a duplicate checker by comparing entries names - Marked existing entries "Light Green" - Added a "localEntry" in the "CitationRelationItem"
much simpler, use the existing duplicate check https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/logic/database/DuplicateCheck.java#L38 |
It might be that the duplicate check needs to be improved. One can do that test-driven. -- Nevertheless, that check needs to be used, because other JabRef functionality also relies on that code. |
I'd like to try to improve the checker. Should I start by writing test cases and detect the weaknesses? |
Sure thing. I think, the main issue is #8885. - The hint at #9769 (comment) is worth to read. See the diff https://github.com/JabRef/jabref/pull/9769/files where tests are located. When working in the code, leave some JavaDoc how to treat duplicates. The current idea is IMHO that each difference gets some points. So that if, by accident, an entry has the same identifier, it could still be a non-duplicate somehow. However, I would try to change the algorithm to treat identifier equality as equal entries. -- And weight title the highest. One has really to play around with the thing. Please do in a separate pull request - and just use the duplication check in this PR. (Reason: Keeping the pull requests small) |
Ok, I will keep that in mind. |
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.
Good start, some minor comments.
src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Outdated
Show resolved
Hide resolved
…TabViewModelTest" to match the new constructor
… check" Signed-off-by: AbdAlRahmanGad <[email protected]>
.../java/org/jabref/gui/entryeditor/citationrelationtab/CitationsRelationsTabViewModelTest.java
Outdated
Show resolved
Hide resolved
@AbdAlRahmanGad Please check GitHubs CI report 30 minutes after submitting the PR. In the concrete case, you see that |
…te entries Signed-off-by: AbdAlRahmanGad <[email protected]>
@AbdAlRahmanGad Looks good. Do you think, something is left from your side? If not, you can mark it as "Ready for review"! |
Fixes #10414
I implemented the duplicate checker by comparing entries names although I am not sure if it's the best way yet.
As for the second requirement.
There is already a code that replaces the "add button" to a "link button" if the entry is a local one.
Preview
Untitled.mov
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)