Skip to content

Conversation

MartinBuzogan
Copy link
Contributor

Closes #13940

  • Implemented Fetcher for OpenAlex for SearchBasedFetcher and FullTextFetcher
  • implemented required parser
  • Implemented unitTests for new Fetcher

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [.] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

Copy link
Contributor

github-actions bot commented Oct 3, 2025

Hey @MartinBuzogan!

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.

// DOI
if (item.has("publication_year")) {
String doi = item.optString("doi");
doi = doi.replaceFirst("^https://doi\\.org/", "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to split the url from doi, we have cleanup/converter for this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i will remove unnecessary cleanup

@Test
void parserParsesSingleWorkObject() throws Exception {
Parser parser = fetcher.getParser();
String json = "{" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can convert this to multi-line string (three quotation marks) intellij should offer an action for it

@Siedlerchr
Copy link
Member

Thanks a lot for the contribution, looks already mostly good. Please have a look at the failing test.
There is probably one architecture test that needs to be adapted as we have now another fetcher

@MartinBuzogan MartinBuzogan marked this pull request as ready for review October 4, 2025 22:02
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 5, 2025
Copy link
Member

@subhramit subhramit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks!

P.S. (for future) please don't remove the steps to test section from the PR description.

@MartinBuzogan
Copy link
Contributor Author

After merging the main branch into mine I have issues with some of the pipeline, I don't know where is the problem before it passed all the tests

@Siedlerchr
Copy link
Member

Seems like an issue with sonatype or jitpack, resolving a snapshot dependency fails. not related to your changes

@Siedlerchr Siedlerchr added this pull request to the merge queue Oct 5, 2025
Merged via the queue into JabRef:main with commit 4e92491 Oct 5, 2025
45 of 48 checks passed
merlinymy pushed a commit to merlinymy/jabref that referenced this pull request Oct 6, 2025
* implementation of OpenAlexFetcher , Added UnitTest

* updated changelog

* updated tests for OpenAlex

* Updated WebFetcher to correct SourceCode test & converted parser tests to multi-line strings & applied DoiCleanup instead of removing it manualy

* OpenAlexFetcherTest Reformated

* Changed annotation NotNull to NonNull
@Siedlerchr
Copy link
Member

Are you interested in implementing the fetcher in #13400 as well?
While the issue is currently assigned, I have my doubts that the contributor will show up doing anything...
I think this would be more straightforward if you take this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first contrib status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a fetcher for OpenAlex
3 participants