feat: add Crossref DOI provider#2249
Conversation
|
Opened this PR instead of #2177 as the PR was open for too long. |
|
Sorry for the extra commits, I accidentally named one test file with a capital T, and MacOS doesn't care. And there are issues with tests that I need to again look into. |
33607ea to
9816716
Compare
|
I have fixed most tests and added one new feature. I will do more cleanup via rebasing. Aware that the Invenio partner meeting is less than three weeks away and that this is the best chance to get this PR discussed and approved, I added the following functionality:
All of the above is optional, the DataCite defaults have not changed, and Crossref is (almost) a drop in replacement, i.e. all DOIs are registered via Crossref and with one prefix. I say almost, as there are some subtle differences. I left out the decision flow and UI part of how a DOI provider and prefix are picked if there are multiple. This is tricky and needs more discussion. There is strong interest in one prefix per community, but records can be registered before a community is added and moved to a different community. The other major decision point is content type, as Crossref only supports text content types. But the UI of changing the content type of a record then becomes more complicated. A good discussion topic at the workshop. This PR can be merged before or at the workshop. It provides a good foundation for more flexibility in DOI registration in v14. Instances can build on that addressing their use cases, or we might have a good discussion at the workshop about a first UI implementation. I will deploy the branch (or the merged master) in my production instance this week, so that I can test DOI registration for a few hundred DOIs (my usual quota) until the workshop. |
d897466 to
7b04995
Compare
|
I fixed all tests - the Python 3.9 tests fail because the commonmeta-py dependency requires 3.10 in recent versions. Also seing no issues in my production instance so far, with a few hundred records registered with Crossref with this latest version. |
f0191ef to
3d3ebc2
Compare
* address breaking changes (caused by adding type hints) in commonmeta-py 0.182
* optionally pass in prefix via kwargs from list of allowed prefixes * adjust blocked prefixes for external DOI provider
* register DOIs with Crossref, functionality analogous to DataCitePIDProvider * CrossrefXMLSerializer for metadata export * includes test coverage similar to DataCite PID provider
* Make parent PID registration not break with multiple PID providers and/or prefixes * Copy provider from child to parent * Extract prefix from the child's identifier
f1f4999 to
3906233
Compare
❤️ Thank you for your contribution!
Description
This pull-request adds Crossref DOI registration support to InvenioRDM. The configuration is very similar to DataCite DOI registration, and the new PID provider should not interfere with DataCite DOI registration.
The Crossref PID provider makes heavy use of the commonmeta-py library, similar to how the datacite library is used in the DataCite PID provider. commonmeta-py already was a dependency, but a newer version (>= 0.183) is required for Crossref DOI registration functionality.
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Frontend
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: