Skip to content
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

The CR Open Funder Registry is migrating to ROR #5596

Open
devincowan opened this issue Sep 11, 2024 · 7 comments · May be fixed by #5632
Open

The CR Open Funder Registry is migrating to ROR #5596

devincowan opened this issue Sep 11, 2024 · 7 comments · May be fixed by #5632
Assignees

Comments

@devincowan
Copy link
Contributor

https://www.crossref.org/blog/open-funder-registry-to-transition-into-research-organization-registry-ror/
https://ror.org/

Related to #5385

@devincowan
Copy link
Contributor Author

@martinseul

@devincowan devincowan changed the title The CF Open Funder Registry is migrating to ROR The CR Open Funder Registry is migrating to ROR Sep 11, 2024
@martinseul
Copy link
Contributor

martinseul commented Sep 13, 2024

previously we updated the "Add Funding Agency" functionality to include the Open Fuding Registry maintained by Crossref
image
. Crossref is now migrating to using the Research Organization Registry (ROR) as a reference for assigning Funders. This will require a migration of the existing references, hopefully minimal and a switch to use the ROR API.

@MSDrao MSDrao self-assigned this Oct 19, 2024
@MSDrao MSDrao moved this from Backlog to In Progress in HydroShare Issue Management Board Oct 19, 2024
@devincowan
Copy link
Contributor Author

@MSDrao here is the class that will need migrations:
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/models.py#L1979

And here is an example migration to use as a template for the new migration:
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/migrations/0021_fundingagency.py#L15

And the django docs:
https://docs.djangoproject.com/en/4.2/topics/migrations/

@devincowan
Copy link
Contributor Author

devincowan commented Oct 22, 2024

@MSDrao adding some more notes here about the database migration of these entries.

Let's take a look as an example.

Before migration

Here is a resource that has a funder:
https://www.hydroshare.org/resource/0d9da2fd06aa4864b727fa32f7a1b17e/

We store the DOI for that funder in our HydroShare database:
https://doi.org/10.13039/100007231
This link is stored in the FundingAgency.agency_url

That DOI points at the crossref record:
http://data.crossref.org/fundingdata/funder/10.13039/100007231

Migration

There is a matching ROR record for this organization:
https://ror.org/05bnh6r87
Or the same as viewed in the API:
https://api.ror.org/organizations/05bnh6r87

We want to store the ROR link instead of the CR link in our HydroShare metadata.
So after the migration, we would have https://ror.org/05bnh6r87 stored in the metadata for this resource in Hydroshare.

New funders

Additionally, after this issue is completed, adding new Funders into Hydroshare will query the ROR API and create ROR links in our metadata (instead of querying crossref api and creating crossref links)

@devincowan
Copy link
Contributor Author

devincowan commented Oct 22, 2024

@martinseul see my comments about this migration.

It is worth noting that right now we only store agency name and agency url metadata for a funding agency in HS (along with award info).
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/models.py#L1983-L1986

ROR has additional metadata that we could store and display if we wanted. Example:
https://ror.org/05bnh6r87
Not sure that it's worth the effort but thought I'd mention it.

@martinseul
Copy link
Contributor

for now I'd say to not extend scope and leave it as is.

@devincowan
Copy link
Contributor Author

devincowan commented Oct 22, 2024

Fielding a question on this issue, adding some info here

I would imagine this migration should edit exiting FundingAgencies (rather than creating new ones).
However, we should accommodate creating future funding agencies using ROR instead of Crossref.

Typically for metadata elements, we create them like this (for example):
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/views/__init__.py#L628-L630
resource.metadata.create_element() here is that function:
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/models.py#L4902-L4924

In the case of the migrations, you will likely use resource.metadata.update_element():
https://github.com/hydroshare/hydroshare/blob/2.15.8/hs_core/models.py#L4926-L4942

Here is the function (within a Vue app) that does the current fetching from the Crossref API:
https://github.com/hydroshare/hydroshare/blob/2.15.8/theme/static/js/hs-vue/funding-agency-app.js#L88

@MSDrao MSDrao linked a pull request Oct 23, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants