Repository navigation
Resolve DataCite DOIs when Crossref has no record - #321
Conversation
DOIs for datasets, software, and repository deposits (Zenodo, figshare, Dryad) are registered with DataCite, not Crossref, so they failed with "Couldn't parse the DOI." The editor now asks DataCite through a new editor-only route, GET /bibliography/v1/datacite?doi=, after a Crossref 404. Crossref stays first and only its 404 falls through. The route calls DataCite's fixed content negotiation host through the shared resolver (wp_safe_remote_get, size cap, outcome cache), stores the DOI in lowercase, turns family-only names into literal ones, and drops the id, keywords, license, and abstract. Adds a Dryad dataset and a Zenodo software sample to the Playground demo, the External Services entry to the readmes, and a CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA1ucj4SXVReThDWAhs
Plugin readme previewOpen preview · Commit 37 passed · 0 warnings · 0 notes Passed checks (37)
Readme and PHP-header checks only; this does not test plugin runtime compatibility. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
============================================
+ Coverage 87.30% 87.39% +0.08%
Complexity 67 67
============================================
Files 113 113
Lines 12646 12760 +114
Branches 1337 1341 +4
============================================
+ Hits 11041 11151 +110
- Misses 487 489 +2
- Partials 1118 1120 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…-1nf9yh-datacite # Conflicts: # .wordpress-org/blueprints/blueprint.json # CHANGELOG.md # docs/current-metrics.md # playground/blueprint-main.json # playground/blueprint-write-api.json # playground/blueprint.json
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Requested by Dan · project thread
Summary
GET /bibliography/v1/datacite?doi=…. The route requiresedit_posts.api.datacite.org/dois/application/vnd.citationstyles.csl+json/). It goes through the sharedbibliography_builder_resolve_remote_csl(), so it gets the samewp_safe_remote_get, 1 MB cap, timeout and outcome cache as the other resolvers.literalname (DataCite sends organizations that way, for example "The pandas development team");document, as the Crossref path does;id,categories,copyrightandabstract;publisheras the repository (Zenodo, Dryad), which is where APA 7 and Chicago put it for datasets and software.10.5061/dryad.8515) and a Zenodo software release (10.5281/zenodo.3509134). I rannpm run playground:build.readme.txtandREADME.md.SPEC.md,CLAUDE.md,docs/current-metrics.mdand the function inventory.The two demo DOIs were checked against DataCite's live service on 2026-11-29, and the PHPUnit fixtures use those responses. Crossref answers 404 for both DOIs.
Validation
npm run lint:jspasses. Its one warning is insrc/components/editor-canvas-notices.js, a file this PR doesn't touch.npm run lint:css: not run, no CSS changednpm run lint:i18n: not run here. The new strings are in PHP and use the plugin's text domain.npm run testpasses (1,637 tests). Five new tests inparser.test.jscover the fallback, no fallback on a Crossref hit, no fallback on a Crossref 503, one error when neither registry knows the DOI, and caching.composer test:phppasses (890 tests). The newDataciteResolverTestcovers DOI normalization, mapping, encoding, 404 and 204 answers, an invalid response, rejection without a request, and capability.RestEndpointsTestpins the route at index 13.composer lint:php, Psalm,npm run typecheck:js, Prettier, andverify-metrics.shpass.npm run build: not run hereChecklist
Generated by Claude Code