-
-
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
Initial conference paper bibliography consistency check #10778
Conversation
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/quality/consistency/PaperConsistencyCheckResult.java
Outdated
Show resolved
Hide resolved
…and absent fields.
06d336b
to
c79e252
Compare
PaperConsistencyCheck.EntryTypeResult entries = mapEntry.getValue(); | ||
SequencedCollection<BibEntry> bibEntries = entries.sortedEntries(); | ||
|
||
bibEntries.forEach(Unchecked.consumer(bibEntry -> { |
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.
Refactor to own method
allFields.forEach(field -> { | ||
theRecord.add(bibEntry.getField(field).map(value -> { | ||
if (requiredFields.contains(field)) { | ||
return "x"; |
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.
make this constants
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.
some refactorings necessary
.get(entryType).stream() | ||
.filter(entry -> !entry.getFields().equals(commonFields)) | ||
.sorted((e1, e2) -> { | ||
int first = e1.getFields().size() - e2.getFields().size(); |
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.
Extract this to a comparator method stuff
Will try to add Markdown output in this PR, too. |
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
Should we merge this first draft? |
Very OK for me! There won't be markdown, but an ASCII ouput (like the one of lychee) to really enable it for usage in a CI. |
When writing a paper, one copies BibTeX entries to the .bib file for the paper. Then, one deletes fields to make the library shorter. Maybe, one does not touch the entries at all. All in all, there will be inconsistencies in the bib file, which typically need manual investigation. (More discussion on that topic at #160)
This PR adds the logic to check the references of a given list of BibEntries for consistency: Do the entries of the same entry type have the same fields set?
The output is a CSV file.
For a real-life publication (pseudonymized here based on the from-aux functionality), the output is as follows
Future work is to provide an integration in the UI.
This PR gets reviewable if #10776 is merged. Therefore marked as draft.
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)