Skip to content

Include contributors with includeInCitation=True as DataCite creators#398

Open
yarikoptic wants to merge 1 commit intomasterfrom
enh-organizations-datacite
Open

Include contributors with includeInCitation=True as DataCite creators#398
yarikoptic wants to merge 1 commit intomasterfrom
enh-organizations-datacite

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

Previously, only contributors with dcite:Author role were placed into DataCite creators. Organizations (e.g., "Allen Institute for Brain Science" in dandiset 000020) that had includeInCitation=True but no dcite:Author role ended up only as DataCite contributors with contributorType "Other" -- despite appearing in the citation string.

Now any contributor with includeInCitation=True OR dcite:Author role becomes a DataCite creator.

Tests: folded new includeInCitation test cases into the existing test_dandimeta_datacite parametric test. Removed @skipif_no_doi_prefix and @skipif_no_datacite_auth decorators so that local validation (schema + field checks) always runs; posting to DataCite is now gated at runtime on credential availability. This required adapting the publisher field check to be instance-config-aware (via _EXPECTED_PUBLISHER) since the RRID fields are only present for the DANDI instance, not DANDI-ADHOC.

This is initially triggered by curation work on https://github.com/bids-dandisets/curations/ and running into empty Authors within https://github.com/bids-dandisets/000020/blob/curation/dataset_description.json#L7 .

Related issues/PRs now

Previously, only contributors with dcite:Author role were placed into
DataCite creators. Organizations (e.g., "Allen Institute for Brain
Science" in dandiset 000020) that had includeInCitation=True but no
dcite:Author role ended up only as DataCite contributors with
contributorType "Other" -- despite appearing in the citation string.

Now any contributor with includeInCitation=True OR dcite:Author role
becomes a DataCite creator.

Tests: folded new includeInCitation test cases into the existing
test_dandimeta_datacite parametric test. Removed @skipif_no_doi_prefix
and @skipif_no_datacite_auth decorators so that local validation
(schema + field checks) always runs; posting to DataCite is now gated
at runtime on credential availability. This required adapting the
publisher field check to be instance-config-aware (via
_EXPECTED_PUBLISHER) since the RRID fields are only present for the
DANDI instance, not DANDI-ADHOC.

Co-Authored-By: Claude Code 2.1.107 / Claude Opus 4.6 <noreply@anthropic.com>
@yarikoptic yarikoptic requested a review from candleindark April 15, 2026 19:28
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.88%. Comparing base (bf5c98e) to head (1dbb701).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
- Coverage   97.92%   97.88%   -0.04%     
==========================================
  Files          18       18              
  Lines        2405     2410       +5     
==========================================
+ Hits         2355     2359       +4     
- Misses         50       51       +1     
Flag Coverage Δ
unittests 97.88% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@candleindark
Copy link
Copy Markdown
Member

candleindark commented Apr 16, 2026

Some tests are still failing, particularly ones that have vendor specific information.

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.

2 participants