Refactor importDatabase in OvidImporter for better readability#14274
Conversation
Hey @merlinymy!Thank you for contributing to JabRef! Your help is truly appreciated ❤️. We have automatic checks in place, based on which you will soon get automated feedback if any of them are failing. We also use TragBot with custom rules that scans your changes and provides some preliminary comments, before a maintainer takes a look. TragBot is still learning, and may not always be accurate. In the "Files changed" tab, you can go through its comments and just click on "Resolve conversation" if you are sure that it is incorrect, or comment on the conversation if you are doubtful. Please re-check our contribution guide in case of any other doubts related to our contribution workflow. |
koppor
left a comment
There was a problem hiding this comment.
Checked with RefactoringMiner. Looks good!
* main: Fix calling JBang command (#14282) .jbang scripts should not be included inside themselves (#14278) Fix typos (#14277) Refactor importDatabase for better readability (#14274) fix jbang (#14276) Feat: Add definition links for TeX Files (#14260) Update preventing module commits (#14273) Fix JabKitLuancher Rename packages in jabkit to start with org.jabref.toolkit to avoid split packages between jabkit and jabgui (#14052). (#14271) Add doi-to-bibtex to examples and JabKit (#14244)
Closes #14132
Refactored the
importDatabase()method inOvidImporterby extracting four private helper methods (parseField(),parseSource(),normalizeContributors(), andresolveEntryType()). This improves code readability and maintainability by reducing the method from 135 lines to 25 lines while preserving all existing functionality. All existing tests pass without modification.Steps to test
Run the existing OvidImporter tests:
./gradlew :jablib:test --tests OvidImporterTest. All 236 tests should pass, confirming the refactoring maintains the original behavior.Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)