-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add Integrity Checker for BookTitle #13854
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
base: main
Are you sure you want to change the base?
Add Integrity Checker for BookTitle #13854
Conversation
Part of JabRef#12271
Requirements1. Integrity Checker should flag a
|
@koppor please check if the approach fits with the expectations of the feature, and help clarify those questions. I'll start laying out some of the core logic in the meantime. |
Since I have not received any feedback on the approach for the last two weeks, I'll be pushing an implementation as per the outlined approach in a couple of days. |
- Add integrity checkers for each of the following fields: Year, Month, Page Range, and Location. - Update FieldCheckers to apply the checkers on the Booktitle, Journal, and Journaltitle fields. - Add location data (countries_cities1000.txt) containing country and city names. The data is sourced from - Add LocationDetector to load location data and allow location extraction from input. - Add BooktitleCleanupField enum to represent each checker field. - Add BooktitleCleanupAction enum to represent the following cleanup actions: remove only, replace, replace if empty, and skip. - Consolidate reused pre-compiled regex patterns into RegexPatterns. - Add BooktitleCleanupPanel and BooktitleCleanupPanelViewModel (inspired by FieldFormatterCleanups) to the GUI. - Add BooktitleCleanupPanel.fxml for the cleanup section's layout and integrate it into CleanupPresetPanel.fxml. - Update CleanupPreferences, CleanupPresetPanel, and CleanupWorker to include Booktitle cleanups. - Update module-info.java to export the BooktitleCleanupAction enum. - Add localization keys to JabRef_en.properties for all the new cleanup GUI text. - Add unit tests and relevant javadoc. Part of JabRef#12271
jabgui/src/main/java/org/jabref/gui/commonfxcontrols/BooktitleCleanupPanel.java
Outdated
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/integrity/BooktitleLocationCheckerTest.java
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/integrity/BooktitleMonthCheckerTest.java
Show resolved
Hide resolved
@koppor check if the feature implementation so far is up to expectations. Also, please help me figure out whether it requires adding a preference migration or updating preferences in the CliPreferences to have JabRef "remember" the previous choice for the cleanup panel. |
jablib/src/test/java/org/jabref/logic/integrity/BooktitlePageRangeCheckerTest.java
Show resolved
Hide resolved
jablib/src/test/java/org/jabref/logic/integrity/BooktitleYearCheckerTest.java
Show resolved
Hide resolved
I assume the functionality is existing for the other settings. Thus, please also support this for the new checkbox. Thank you 😅. |
My question wasn't a "whether or not" to add the functionality, it says "whether it requires A OR B" to be modified to have it enabled, i.e., which of the two options need to be updated to get it to work. |
Closes #12271
This PR adds a new integrity checker for the booktitle field along with the associated cleanup actions.
I'll be doing the development in the following major phases (these will be refined further as I move along):
Steps to test
Mandatory checks
CHANGELOG.md
in a way that is understandable for the average user (if change is visible to the user)