Repository navigation
Description
Implement Complete DOI Publication Workflow
Problem
The current nemar admin publish approve orchestrator creates a pre-reserved concept DOI but does NOT complete the critical steps to publish it to Zenodo. This creates an incomplete workflow where:
- DOI is pre-reserved from Zenodo ✅
- DOI is stored in database ✅
- But DOI is never included in the dataset files ❌
- Git tag is never created ❌
- GitHub release is never created ❌
- Release zip is never uploaded to Zenodo ❌
- DOI is never published ❌
Why This Matters
The pre-reserved DOI workflow is critical for data integrity:
- Pre-reserve DOI from Zenodo
- Update dataset_description.json with the DOI (ensures DOI is in the archival copy)
- Update README.md with the DOI
- Commit changes to git
- Create git tag (e.g., v1.0.0)
- Push tag (triggers GitHub release)
- Download GitHub release zip (contains complete dataset with DOI)
- Upload zip to Zenodo (attach dataset to DOI)
- Publish DOI (permanent - no going back!)
Critical: The DOI must be embedded in the dataset files BEFORE creating the archive. This ensures the archived dataset contains its own DOI, preventing data loss if GitHub/S3 fails.
Reference Implementation
The workflow is documented in EMG-2-BIDS/nemar/DATASET_REVISION_WORKFLOW.md which describes a register_zenodo_doi.py script that implements this complete workflow.
Current Orchestrator Steps
const allSteps = [
"ci_check", // ✅ Verify BIDS validation
"repo_public", // ✅ Make GitHub repo public
"tag_protect", // ✅ Protect version tags
"doi_create", // ⚠️ Only pre-reserves DOI, doesn't publish
"s3_lock", // ✅ Enable S3 object lock
"notify_user", // ✅ Send email notification
];Required New Steps
Add these steps to the orchestrator:
const allSteps = [
"ci_check",
"repo_public",
"tag_protect",
"doi_create", // Pre-reserve DOI
"update_metadata", // NEW: Update dataset_description.json with DOI
"update_readme", // NEW: Update README.md with DOI
"create_tag", // NEW: Commit + create git tag
"create_release", // NEW: Create GitHub release (includes zip)
"upload_to_zenodo", // NEW: Download release zip + upload to Zenodo
"publish_doi", // NEW: Publish the DOI (permanent!)
"s3_lock",
"notify_user",
];Implementation Checklist
- Add step: Update
dataset_description.jsonwith DOI- Clone dataset repo locally (or use GitHub API)
- Parse existing JSON
- Update
DatasetDOIfield - Commit change
- Add step: Update
README.mdwith DOI- Parse README
- Add/update DOI badge
- Commit change
- Add step: Create git tag
- Tag format:
v{version}(e.g., v1.0.0) - Push tag to GitHub
- Tag format:
- Add step: Create GitHub release
- Use
gh release createor GitHub API - Release automatically generates source zip
- Use
- Add step: Upload to Zenodo
- Download GitHub release zip via API
- Upload to Zenodo deposition
- Verify upload checksum
- Add step: Publish DOI
- Call Zenodo publish endpoint
- Verify DOI is live
- Update database with published status
- Handle errors/rollback
- If upload fails, keep DOI draft
- If publish fails, deposition stays editable
- Document manual recovery steps
Testing
Test with sandbox dataset (xx-prefix) using --sandbox flag:
# Create draft with all steps
nemar admin publish approve xx000001 --sandbox
# Verify:
# 1. dataset_description.json has DOI
# 2. README.md has DOI badge
# 3. Git tag exists
# 4. GitHub release exists with zip
# 5. Zenodo deposition has uploaded file
# 6. DOI is published and resolvableReferences
- EMG-2-BIDS workflow:
~/Documents/git/EMG-2-BIDS/nemar/DATASET_REVISION_WORKFLOW.md - Zenodo API docs: https://developers.zenodo.org/
- GitHub Release API: https://docs.github.com/en/rest/releases
Priority
Critical - Without this workflow, DOIs are created but never published, and datasets are not properly archived to Zenodo. This defeats the purpose of DOI registration.
Activity
Implement complete DOI publication workflow
Implement complete DOI publication workflow (#87)
neuromechanist commentedon Jan 30, 2026
Addressed in #87