Skip to content

Preserve DatasetDOI, sync title, add uploader contributor - #258

Merged
neuromechanist merged 3 commits into
devfrom
feature/issue-256-preserve-doi-sync-title
Mar 7, 2026
Merged

neuromechanist merged 3 commits into
devfrom
feature/issue-256-preserve-doi-sync-title

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

  • Preserve existing DatasetDOI in SourceDatasets before overwriting with NEMAR concept DOI during publish workflow (flows into DataCite as IsDerivedFrom via existing logic)
  • Auto-sync BIDS Name changes to EZID DOI metadata via the LLM enrichment webhook (full DataCite XML rebuild, non-fatal)
  • Add data uploader as DataCurator contributor in DataCite metadata when they are not listed as a BIDS Author

Test plan

  • bun test test/doi-provider.test.ts passes (updated tests for new uploaderName/uploaderOrcid fields)
  • bun test test/datacite.test.ts passes
  • bun test test/publish-workflow.test.ts passes
  • TypeScript type-check passes (tsc --noEmit)
  • E2E: Publish a dataset with pre-existing DatasetDOI and verify SourceDatasets is updated
  • E2E: Update BIDS Name in a test dataset, trigger LLM enrichment, verify EZID DOI metadata reflects new title
  • E2E: Upload dataset where uploader is not in Authors list, verify DataCurator contributor in DataCite XML

Closes #256

- Preserve existing DatasetDOI in SourceDatasets before overwriting
  with NEMAR concept DOI during publish workflow
- Auto-sync BIDS Name changes to EZID DOI metadata via the LLM
  enrichment webhook (full DataCite XML rebuild)
- Add data uploader as DataCurator contributor in DataCite metadata
  when they are not listed as a BIDS Author
- Update buildOrcidEnrichment to always pass through uploader fields

Closes #256
@github-actions

github-actions Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR258

Version: 0.7.13-PR258.eeff4e8
Commit: eeff4e8


🤖 Updated on each push.

- Use LEFT JOIN for users table to avoid masking orphaned datasets
- Broaden DOI sync to run on every enrichment (not just name change)
- Distinguish config vs transient errors in DOI sync catch block
- Skip parseAuthorName for usernames in DataCurator contributor
- Add 4 tests for DataCurator contributor logic in bidsToDataCite
- Add orcid field to DataCiteContributor interface and XML builder
- Attach uploaderOrcid to DataCurator contributor entry
- Use word-boundary regex instead of substring matching for
  uploader-is-author check to avoid false positives
- Add tests for ORCID on contributor and word-boundary matching
@neuromechanist
neuromechanist merged commit d42d29d into dev Mar 7, 2026
8 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-256-preserve-doi-sync-title branch March 7, 2026 06:26
@neuromechanist neuromechanist mentioned this pull request Mar 8, 2026
2 of 4 tasks

This branch was previously deployed

1 inactive deployment
npm — eeff4e8e Deployed Mar 7, 2026 by neuromechanist via publish #428
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.

1 participant