Uploading Datasets¶
This guide walks you through uploading a BIDS dataset to NEMAR.
Prerequisites¶
Before uploading:
- [ ] Dataset is in valid BIDS format
- [ ] Logged in with
nemar auth login - [ ] git-annex installed
- [ ] GitHub CLI (
gh) installed and authenticated - [ ] Sandbox training completed (
nemar sandbox)
Step 1: Validate Your Dataset¶
Always validate before uploading:
Validation Must Pass
Datasets with validation errors cannot be uploaded. Fix all errors before proceeding.
Common Validation Issues¶
| Issue | Solution |
|---|---|
| Missing dataset_description.json | Create the required BIDS metadata file |
| Invalid JSON | Check for syntax errors in JSON files |
| Missing required fields | Add Name and BIDSVersion to dataset_description.json |
| Invalid modality data | Ensure data files match BIDS naming conventions |
Step 2: Upload¶
Options¶
| Option | Description |
|---|---|
--name, -n |
Dataset name (defaults to BIDS Name field, then directory name) |
--description |
Brief description |
--skip-validation |
Skip BIDS validation (not recommended) |
--skip-orcid |
Skip co-author ORCID collection |
--dry-run |
Show what would be uploaded without doing it |
--restart |
Clear upload progress and re-upload all files |
-j, --jobs |
Number of parallel upload jobs (default: 4) |
-y, --yes |
Skip confirmation and proceed |
Step 3: What Happens¶
The upload process:
- Auth and Prerequisites - Verifies login, git-annex, GitHub CLI
- BIDS Validation - Runs the official BIDS validator (unless skipped)
- File Manifest - Collects files and co-author ORCIDs
- Confirmation - Shows upload plan for review
- Dataset Registration - Creates dataset record and private GitHub repo
- GitHub Invitation - Accepts collaborator invitation to the repo
- git-annex Init - Initializes git-annex and configures S3 remote
- Data Upload - Uploads large files to S3 (uses AWS CLI fast-path when available)
- Metadata and Push - Writes metadata, commits, and pushes to GitHub
- CI Deployment - Deploys GitHub Actions workflows for validation
Step 4: Making Updates¶
After initial upload, push changes using the CLI:
cd nm000104 # Your dataset directory
# Make changes, then save and push
nemar dataset save -m "Add subjects 101-110"
nemar dataset push
Or create a formal update PR:
Troubleshooting¶
Upload Fails with Authentication Error¶
git-annex Errors¶
Upload Interrupted or Timed Out¶
The upload tracks progress automatically. Re-run the same command to resume: