Create groups where paper from - SLR - #15429
Conversation
…ntries with non-empty values
Review Summary by QodoAdd automatic source groups and union-merge for SLR results
WalkthroughsDescription• Automatic source groups created for SLR fetched entries by fetcher name • Group merging now union-merges instead of replacing existing groups • Keyword separator support added for group field merging • Three-way merge auto-merges groups when both entries have values Diagramflowchart LR
A["SLR Crawl Results"] --> B["Fetcher 1<br/>ArXiv"]
A --> C["Fetcher 2<br/>Springer"]
B --> D["Create Group<br/>by Fetcher Name"]
C --> D
D --> E["Tag Entries<br/>with Group"]
E --> F["Persist to<br/>Result Files"]
G["Merge Entries"] --> H["Union-Merge<br/>Groups Field"]
H --> I["Preserve All<br/>Source Groups"]
File Changes1. jabgui/src/main/java/org/jabref/gui/mergeentries/BatchEntryMergeTask.java
|
Code Review by Qodo
1.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ All tests passed ✅🏷️ Commit: b2ad00a Learn more about TestLens at testlens.app. |
|
Your pull request conflicts with the target branch. Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. |
…ordList.merge() in tagEntriesWithFetcherGroup to preserve existing groups
…:LoayTarek5/jabref into create-groups-where-paper-from-SLR-12542
faneeshh
left a comment
There was a problem hiding this comment.
The original ordering bug seems to have been resolved so it looks good to me now.
| private void mergeEntries(BibDatabase target, BibDatabase other) { | ||
| DuplicateCheck duplicateCheck = new DuplicateCheck(new BibEntryTypesManager()); |
There was a problem hiding this comment.
Since this new behavior runs for every caller of this method, it's worth adding a note that duplicates now have their groups field union merged into the entry. Would make the code easier to review later.
|
|
||
| boolean groupExists = rootNode.getChildren().stream() | ||
| .anyMatch(child -> child.getGroup().getName().equals(fetcherName)); | ||
|
|
There was a problem hiding this comment.
| boolean groupExists = rootNode.getChildren().stream() | |
| .anyMatch(child -> child.getGroup().getName().equals(fetcherName)); | |
| boolean groupExists = rootNode.getChildren().stream() | |
| .anyMatch(child -> child.getGroup() instanceOf ExplicitGroup | |
| && child.getGroup().getName().equals(fetcherName)); | |
If the existing group is a search group then the entries won't be matched by it
|
|
||
| if (field == StandardField.GROUPS) { | ||
| continue; | ||
| } | ||
|
|
There was a problem hiding this comment.
I could be wrong but I think this is the last statement in the loop above so you can just remove it
There was a problem hiding this comment.
The continue itself is still needed, without it the loop would clear the GROUPS field.
but the two consecutive guards can be combined into one, which I think is what you were getting at.
| - We added "All" option to the citation fetcher combo box, which queries all providers (CrossRef, OpenAlex, OpenCitations, SemanticScholar) and merges the results into a single deduplicated list. | ||
| - We added a quick setting toggle to enable cover images download. [#15322](https://github.com/JabRef/jabref/pull/15322) | ||
| - We now support refreshing existing CSL citations with respect to their in-text nature in the LibreOffice integration. [#15369](https://github.com/JabRef/jabref/pull/15369) | ||
| - We added automatic source groups to SLR results and fixed group merging to preserve all source groups. [#12542](https://github.com/JabRef/jabref/issues/12542) |
There was a problem hiding this comment.
NItpick must be moved now to the unreleased section of the new release
move to correct secion
Related issues and pull requests
Closes #12542
PR Description
During SLR crawls, fetched entries are now automatically grouped by their source.
Group merging is also fixed to union-merge instead of replacing or deleting existing groups.
Steps to test
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)