Skip to content

Conversation

ewan-escience
Copy link
Collaborator

Use v2 of the ROR API

Changes proposed in this pull request

  • Use v2 of the ROR API

How to test

  • docker compose down --volumes && docker compose build --parallel && docker compose up --scale data-generation=1
  • Sign in as admin
  • Add organisations in the admin panel or add organisations to software/project pages
  • docker compose exec scrapers java -cp /usr/myjava/scrapers.jar nl.esciencecenter.rsd.scraper.ror.MainRor
  • The scraper should run without errors (check the error logs)
  • http://localhost/api/v1/organisation?ror_id=not.is.null&order=ror_scraped_at.desc.nullslast should show that organisations were recently harvested

closes #1597

PR Checklist:

  • Increase version numbers in docker-compose.yml
  • Link to a GitHub issue
  • Update documentation
  • Tests

@ewan-escience ewan-escience self-assigned this Aug 21, 2025
@ewan-escience ewan-escience force-pushed the 1597-ror-v2 branch 3 times, most recently from 9115545 to 991ad5d Compare August 25, 2025 10:14
@ewan-escience ewan-escience marked this pull request as draft August 28, 2025 08:58
@dmijatovic dmijatovic marked this pull request as ready for review September 8, 2025 15:23
Copy link
Member

@jmaassen jmaassen left a comment

Choose a reason for hiding this comment

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

Works as expected. The readability of these statements in MainRor.java could improve though;

Double lat = latJson != null && latJson.isJsonPrimitive()
				? latJson.getAsJsonPrimitive().getAsDouble()
				: null;

My internal type checker triggered a few times with an error before I realize that the && gets priority over the ? ;-)

I would put the expression before the ? between brackets for readability, so:

Double lat = (latJson != null && latJson.isJsonPrimitive())
				? latJson.getAsJsonPrimitive().getAsDouble()
				: null;

ewan-escience and others added 3 commits September 12, 2025 13:35
tests: extend unit test to cover organisation website and wikipedia url
e2e: generate mock data returned from ror v2 api
Copy link

Copy link

Quality Gate Failed Quality Gate failed for 'rsd-frontend'

Failed conditions
29.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@ewan-escience ewan-escience merged commit 28d4fa5 into main Sep 12, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ROR API v1 deprecated
3 participants