Skip to content

BF: Migrate CRCNS DataCite fetch to /dois endpoint - #153

Merged
yarikoptic merged 1 commit into
masterfrom
bf-tests
Jul 7, 2026
Merged

BF: Migrate CRCNS DataCite fetch to /dois endpoint#153
yarikoptic merged 1 commit into
masterfrom
bf-tests

Conversation

@yarikoptic

Copy link
Copy Markdown
Member

DataCite retired the legacy /works REST endpoint (returns 410 Gone with a pointer to /dois, /providers, /clients), which broke test_get_metadata in CI. Switch fetch_datacite_metadata to
/dois?prefix=10.6080&detail=true&page[size]=1000 — prefix 10.6080 is the CRCNS.org DOI namespace, and detail=true is required to include the base64-encoded XML in attributes.xml (list responses omit it by default).

Also swap base64.decodestring for base64.b64decode (the former was removed in Python 3.9) and update the outdated search.datacite.org host check in the skip-on-502 fallback to api.datacite.org so the test still skips gracefully on transient upstream errors.

DataCite retired the legacy /works REST endpoint (returns 410 Gone with a
pointer to /dois, /providers, /clients), which broke test_get_metadata in
CI. Switch fetch_datacite_metadata to
`/dois?prefix=10.6080&detail=true&page[size]=1000` — prefix 10.6080 is
the CRCNS.org DOI namespace, and detail=true is required to include the
base64-encoded XML in attributes.xml (list responses omit it by default).

Also swap base64.decodestring for base64.b64decode (the former was
removed in Python 3.9) and update the outdated search.datacite.org host
check in the skip-on-502 fallback to api.datacite.org so the test still
skips gracefully on transient upstream errors.

Co-Authored-By: Claude Code 2.1.202 / Claude Opus 4.7 <noreply@anthropic.com>
@yarikoptic yarikoptic added patch Increment the patch version when merged release Create a release when this pr is merged labels Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.94%. Comparing base (bf7c4c6) to head (7ae38c0).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
datalad_crawler/pipelines/tests/test_crcns.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   76.58%   76.94%   +0.35%     
==========================================
  Files          58       58              
  Lines        4733     4733              
  Branches      596      596              
==========================================
+ Hits         3625     3642      +17     
+ Misses        947      928      -19     
- Partials      161      163       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yarikoptic
yarikoptic merged commit 8e5aaa3 into master Jul 7, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged release Create a release when this pr is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant