jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Rewrite `org.jabref.logic.importer.fetcher.CustomizableKeyFetcher#getTestUrl` to be a pattern

Open koppor opened this issue 2 months ago β€’ 16 comments

Currently, the assumption of org.jabref.logic.importer.fetcher.CustomizableKeyFetcher#getTestUrl is that the API key is appended.

It is appended at org.jabref.gui.preferences.websearch.WebSearchTabViewModel#checkCustomApiKey and then some fetch is done.

This does not work if the API key is used otherwise.

Task

  1. Replace default String getTestUrl() by boolean isValidKey(String apiKey.
    • Instead of checkCustomApiKey testing for the key, the fetcher itself does the test
    • No default implementaiton - all fetchers need to implement - stub: return true with a TODO that it needs to be implemented
  2. Remove the tests baseURLConstruction etc from org.jabref.logic.importer.fetcher.BiodiversityLibraryTest
  3. Implement checkCustomApiKey for org.jabref.logic.importer.fetcher.BiodiversityLibrary based on the existing idea. -- You can move code from WebSearchTabViewModel#checkCustomApiKey to here
  4. Adapt WebSearchTabViewModel#checkCustomApiKey to use the new interface
  5. Adapt org.jabref.logic.importer.fetcher.IEEE to test for api key - add new private getURLForQuery accepting an API key - and have the existing getURLForQuery make use of it - Use "JabRef API key test" as search (look at the code on how to construct a lucene query)

koppor avatar Oct 02 '25 08:10 koppor

/assign-me

arokoolamayowa avatar Oct 02 '25 13:10 arokoolamayowa

πŸ‘‹ Hey @arokoolamayowa, thank you for your interest in this issue! πŸŽ‰

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! πŸš€

github-actions[bot] avatar Oct 02 '25 13:10 github-actions[bot]

⏰ Assignment Reminder

Hi @arokoolamayowa, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 11 days
  • Asking for the πŸ“Œ Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Oct 12 '25 12:10 github-actions[bot]

Hi! @koppor

I’d like to pick this up. I’ve already forked and set up a branch . If there’s no update from the current assignee, could you please reassign this to me? Thanks!

dag2104 avatar Oct 20 '25 17:10 dag2104

/assign-me

dag2104 avatar Oct 21 '25 11:10 dag2104

⚠️ Issue Already Assigned

Hi @dag2104, this issue is currently assigned to @arokoolamayowa.

[!NOTE] If no progress is made within 21 days, the issue will be automatically unassigned.

Options for contributors
  • Wait for availability: The issue may become available if auto-unassigned
  • Collaborate: You can ask the assignee if they want help
  • Maintainer assistance: A maintainer can add you as co-assignee if appropriate

github-actions[bot] avatar Oct 21 '25 11:10 github-actions[bot]

πŸ“‹ Assignment Update

Hi @arokoolamayowa, due to inactivity, you have been unassigned from this issue.

Next steps


If you still want to work on this:

  • Submit a pull request showing your current state. You will be automatically assigned again.
  • Ask a maintainer to assign you again.

github-actions[bot] avatar Nov 10 '25 12:11 github-actions[bot]

/assign-me

technologic-technologic avatar Nov 11 '25 02:11 technologic-technologic

πŸ‘‹ Hey @technologic-technologic, thank you for your interest in this issue! πŸŽ‰

We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.

In case you encounter failing tests during development, please check our developer FAQs!

Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.

Happy coding! πŸš€

github-actions[bot] avatar Nov 11 '25 02:11 github-actions[bot]

Hi maintainers and community! I'll be working with this. Excited for the opportunity! πŸ‘

technologic-technologic avatar Nov 11 '25 02:11 technologic-technologic

⏰ Assignment Reminder

Hi @technologic-technologic, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 11 days
  • Asking for the πŸ“Œ Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Nov 20 '25 12:11 github-actions[bot]

πŸ“‹ Assignment Update

Hi @technologic-technologic, due to inactivity, you have been unassigned from this issue.

Next steps


If you still want to work on this:

  • Submit a pull request showing your current state. You will be automatically assigned again.
  • Ask a maintainer to assign you again.

github-actions[bot] avatar Dec 01 '25 12:12 github-actions[bot]

/assign-me

Eduguimar avatar Dec 02 '25 00:12 Eduguimar

πŸ‘‹ Hey @Eduguimar, thank you for your interest in this issue! πŸŽ‰

We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.

In case you encounter failing tests during development, please check our developer FAQs!

Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.

Happy coding! πŸš€

jabref-machine avatar Dec 02 '25 00:12 jabref-machine

Hello @koppor ! How about the other classes that implements the CustomizableKeyFetcher? It is implemented in the UnpaywallFetcher, MedlineFetcher and SpringerNatureWebFetcher. Do I also need to adjust these implementations?

Thanks!

Eduguimar avatar Dec 04 '25 23:12 Eduguimar

Hello @koppor ! How about the other classes that implements the CustomizableKeyFetcher? It is implemented in the UnpaywallFetcher, MedlineFetcher and SpringerNatureWebFetcher. Do I also need to adjust these implementations?

Yes. I think, this was the whole point of the issue.

koppor avatar Dec 05 '25 02:12 koppor