-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Mode aware consistency check #13584
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
Mode aware consistency check #13584
Conversation
|
@subhramit hi that's me. I deleted the old branch with the old rebase problem and i've started clean. |
jablib/src/main/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheck.java
Outdated
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckTest.java
Outdated
Show resolved
Hide resolved
…67-clean' into mode-aware-consistency-check-13467-clean
|
Hello all, I'd like to get some help regarding a failing test in |
It's fine this time - but for future, we generally don't recommend closing and opening - one can update the existing branch so that the PR is also updated. |
Open the failing check by clicking on it, compare the expected and actual values in the log. As far as I can see: Some things seem to be missing from the actual. |
Why are the mandatory checks trimmed with "..." by the way? |
|
@subhramit I don't know I think I found it like this if I remember correctly. BTW i removed the "..." |
Check the other PRs to see the unmodified version |
Ohh thanks I see... I corrected it! |
|
|
||
| resultMap.put(entryType, new EntryTypeResult(uniqueFields, differingEntries)); | ||
| Set<BibEntry> entries = entryTypeToEntriesMap.get(entryType); | ||
| if (entries == null || entries.size() <= 1 || differingFields.isEmpty()) { |
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.
I think, the check is OK. However, I think, this case never happens. Therefore, I added an assert stgatement.
jablib/src/main/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheck.java
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckTest.java
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheckTest.java
Show resolved
Hide resolved
|
We use this PR to fix #13765 |
calixtus
left a comment
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.
Looks fine to me. Lets get this merged.
| } | ||
|
|
||
| entryTypeToEntriesMap | ||
| .computeIfAbsent(entryType, _ -> new java.util.LinkedHashSet<>()) |
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.
I think we could use a hash set here?
Also, should use import
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.
Oh, yes. Follow-up? ^^
jablib/src/main/java/org/jabref/logic/quality/consistency/BibliographyConsistencyCheck.java
Show resolved
Hide resolved
…n-c23b1a88-5c29-46a2-a007-701edd344b9b' into jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b * upstream/jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b: Streamline code for getTabTitle() (#13781) Add missing variables Reformat BibTex in Show BibTex Source (#13761) Auto publish before JBang tests (#13779) Hotfix: calling of publish.yml Support BibLaTeX datamodel validations (#13693) Auto add and remove of "status: changes-required" label (#13778) New Crowdin updates (#13777) Restore local-only Git behavior for SLR to fix repository initialization error (#13775) Use vanilla hashset (#13771) Fix Springer Fetcher names (#13770) Fix condition Publish SNAPSHOT on jablib change (#13774) Adapt as per new set of checks (#13772) Bump jablib/src/main/resources/csl-styles from `1194364` to `17cfa60` (#13750) Fix path (#13769) Mode aware consistency check (#13584) Refine JBang check (#13765) Add Language Server to the UI and add the integrity/consistency check (#13697) Fix/remove comment code (#13763)
* upstream/main: (32 commits) Fix path (#13769) Mode aware consistency check (#13584) Refine JBang check (#13765) Add Language Server to the UI and add the integrity/consistency check (#13697) Fix/remove comment code (#13763) New Crowdin updates (#13760) Bump org.openrewrite.rewrite from 7.14.0 to 7.14.1 (#13757) Bump com.autonomousapps:dependency-analysis-gradle-plugin (#13756) Bump dev.langchain4j:langchain4j-bom from 1.2.0 to 1.3.0 in /versions (#13755) Bump jablib/src/main/resources/csl-locales from `fa56de1` to `e29c453` (#13754) Bump com.autonomousapps:dependency-analysis-gradle-plugin (#13753) Bump org.mockito:mockito-core from 5.18.0 to 5.19.0 in /versions (#13752) Bump actions/upload-pages-artifact from 3 to 4 (#13751) Migrate fetchers to Search.g4 ANTLR parser. (#13691) [Junie]: fix: resolve IllegalArgumentException for non-absolute URIs (#13669) Add auto-renaming of linked files on entry data change (#13295) Walkthrough additions (#13745) Switch from zulu to corretto (#13749) New Crowdin updates (#13747) Fix copy to (#13741) ...
Closes #13467
This draft PR refactors
BibliographyConsistencyCheckto take a fullBibDatabaseContextinstead of just a list of entries.The goal is to prepare the logic for BibTeX/BibLaTeX-aware consistency checking, as discussed in the issue.
So far, logic separation for mode (
BibDatabaseMode) and extraction ofEntryTypehas been implemented.Steps to test
This is a work-in-progress. No final test procedure yet.
Initial behavior should be unchanged (functional refactoring).
Can be tested with a
.bibfile containing@onlineentries with and withoutdate.Mandatory checks