Uploading Datasets
This guide walks you through uploading a BIDS dataset to NEMAR.
Prerequisites
Section titled “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) - Upload access granted (
nemar auth request-upload-access; see Upload access)
Step 1: Validate Your Dataset
Section titled “Step 1: Validate Your Dataset”Always validate before uploading:
nemar dataset validate ./my-datasetCommon Validation Issues
Section titled “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
Section titled “Step 2: Upload”nemar dataset upload ./my-datasetOptions
Section titled “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 |
--acknowledge-identifier-preflight <verdicts> |
Upload despite what the identifier preflight found, naming every condition it reports (for scripts). Direct identifiers cannot be acknowledged |
--restart |
Clear upload progress and re-upload all files |
-j, --jobs |
Number of parallel S3 copy streams (default: 4) |
--annex-jobs |
Number of parallel local git-annex add workers (default: 4) |
-y, --yes |
Skip confirmation and proceed |
Step 3: What Happens
Section titled “Step 3: What Happens”The upload process:
- Authentication Check - Verifies you’re logged in (
nemar auth login) - Sandbox Training Check - Confirms
nemar sandboxhas been completed. This is a hard stop for the CLI, with no equivalent on the web - Upload Access Check - Confirms upload access is granted,
and lists anything else your profile is still missing, before anything expensive runs.
A missing grant stops the run here;
--dry-runcontinues anyway, since it uploads nothing. See What your profile still needs - Identifier Preflight - Screens the files on your machine for information that identifies a participant, before anything is sent. Direct identifiers stop the upload; see Identifier preflight below. It first plans which acquisition dates the upload will set to 1 January, and changes nothing yet
- Prerequisite Check - Verifies required tools (git-annex, gh, aws) are installed with platform-specific install guidance if missing
- GitHub Authentication - Verifies GitHub authentication (HTTPS preferred, SSH as fallback)
- BIDS Validation - Runs the official BIDS validator (unless skipped)
- File Manifest - Collects files and co-author ORCIDs
- License Enforcement - Detects license from
dataset_description.jsonor LICENSE file; prompts to select one if missing. Validates the license allows research redistribution (see License Requirements below) - Data Provenance - For derived datasets, collects source dataset DOIs and checks license compatibility
- Confirmation - Shows upload plan for review
- Second Identifier Screen - Sets the acquisition dates the upload planned (see Dates the upload sets), then screens again right before anything is sent, because the steps above can take as long as you like and some write into the dataset directory
- 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 - Tracks files locally with git-annex (
--annex-jobsworkers), then copies the large ones to S3 in parallel (-jstreams; 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
Identifier preflight
Section titled “Identifier preflight”Before anything is sent, nemar dataset upload screens your dataset on your own machine for information that identifies a participant.
It makes no network request.
It prints kinds and counts only, never a value, a file name or a path, because an upload’s output can land in a public log.
It uses the same scanner as the screen that runs when you request publication;
Identifier screening says what is read and what each verdict word means.
The preflight screens the files the upload plan lists, which is everything except .git and .nemar at the top of the dataset and any file named .gitattributes.
A file that .gitignore keeps out of the commit is screened anyway.
It reads:
- the first 256 bytes of every European Data Format (EDF) and BioSemi Data Format (BDF) header, and never the recording itself;
- the participants table and the scans tables;
- JSON files that are not standard sidecars, and small text files under
sourcedata/andcode/; - every file and directory name.
A directory it cannot list, or a recording, table or side file it cannot open, makes the scan incomplete.
The verdict is then unchecked unless a finding outranks it, and an acknowledgment must name unchecked either way.
Recordings in other formats (BrainVision, EEGLAB, FIF and others) are counted by format and never opened.
What it decides
Section titled “What it decides”| Verdict | What the upload does |
|---|---|
clean, dates-only, no-recordings |
Goes on. dates-only prints the date warning and asks nothing. |
direct-identifiers |
Refused. Nothing is sent and the command exits with an error. No flag changes this, and --dry-run refuses too. |
review, unchecked, not-screened, clean-edf-only-others-unscreened |
Goes on only after you acknowledge it. |
When the preflight refuses, remove the identifying information from your files (for EDF and BDF files, the patient and recording fields of the header) and run the upload again. If you think a refusal is a false positive, report it so the scanner is fixed for every dataset; there is no override. Describe the kind and count the output gave, and never paste a value or a file name from your data into a public issue.
Acknowledging a verdict
Section titled “Acknowledging a verdict”Without an acknowledgment, a lesser verdict stops the upload. You give it in one of two ways:
- At a terminal, answer the prompt
Upload anyway?. It defaults to no, and Ctrl+C cancels the upload with exit status 130. - In a script, pass
--acknowledge-identifier-preflight, repeated or comma-separated. It must name exactly the conditions the preflight found: the verdict, plusuncheckedwhen the scan was incomplete, plusnot-screenedwhen there are recordings it cannot read. The accepted words arereview,clean-edf-only-others-unscreened,not-screenedandunchecked.
nemar dataset upload ./my-dataset --acknowledge-identifier-preflight review,uncheckedA flag that names fewer conditions is refused, so a newly incomplete read stops a pipeline instead of riding on an old acknowledgment.
A flag that names more is refused too, so a list of every word is not a standing waiver.
The kinds of finding inside review are not bound.
--yes never acknowledges anything, and --no declines.
--dry-run never prompts: it says what a real upload would need and goes on to show the plan.
Run without a terminal and without the flag, the upload stops and tells you what to pass.
Screened again, and recorded
Section titled “Screened again, and recorded”The prompts, the license and attestation questions and the final confirmation can take as long as you like, and some of them write into the dataset directory. So the dataset is screened again right before the create call, and the upload stops if that screen finds direct identifiers, or conditions that differ from the ones you acknowledged. If the second screen counts a different number of acquisition dates, it prints the verdict and the warning again.
That second result is recorded with your deposit attestation, as counts and fixed words, together with how you acknowledged it (prompt or flag) and no text.
It is stored with the attestation and is not shown on the dataset’s public page.
Nothing treats it as permission: a modified client can send anything, so the screen that runs when you request publication is the check that holds.
What it does not cover
Section titled “What it does not cover”The preflight does not cover later pushes (nemar dataset push, update and commit), the web upload or raw git-annex, and it never reads formats other than EDF and BDF.
It does not read git history or the text a symbolic link points to, and it does not see files the CLI writes after the final screen.
Identifier screening lists these limits in one place.
Dates the upload sets
Section titled “Dates the upload sets”Before the preflight screens your files, the upload works out which EDF and BDF headers carry an acquisition date it can change safely, and only reads. After you confirm the upload, it sets the day and month of those dates to 1 January of the same year. The year, the time of day and every other byte of the file stay. The preflight screens the headers as they will be written, so a date the upload will set is not warned about, and one it will leave is.
It changes your own files.
Each one is copied into the .nemar directory, the new header is written into the copy and checked, and the copy replaces the original.
The upload keeps no copy of the original, so a file that was your only copy loses its day and month; copy your recordings first if you need their dates.
--dry-run plans and screens, and changes no file.
When it has set at least one header, the upload prints one line:
Acquisition dates in N recording headers were set to 1 January of their year.
N is the number of headers actually set, and the line reads 1 recording header in the singular.
It is not a warning, it shows no date, value or path, and it asks for nothing.
The upload leaves a file as it is, and the preflight warns about its dates, when git tracks it (which includes every file git-annex tracks), when it is a symbolic link, when you cannot write it, or when it is on another filesystem than the dataset’s directory.
It never edits a scans table, and nemar dataset commit, push and update set no date.
Setting dates on new data lists every case, says which dates are set, and says what an analysis loses.
License Requirements
Section titled “License Requirements”Every dataset uploaded to NEMAR must have a license that allows research redistribution. The CLI will:
- Auto-detect your license from
dataset_description.json(theLicensefield) or a LICENSE file - Prompt you to choose if no license is found, offering recommended open data licenses
- Validate that the chosen license allows research use
- Create a LICENSE file if one does not exist
Recommended licenses (most permissive to most restrictive):
| License | Description |
|---|---|
| CC0-1.0 | Public domain dedication (no restrictions) |
| PDDL-1.0 | Public Domain Dedication and License |
| CC-BY-4.0 | Attribution only |
| CC-BY-SA-4.0 | Attribution + ShareAlike |
| CC-BY-NC-4.0 | Attribution + NonCommercial |
| CC-BY-NC-SA-4.0 | Attribution + NonCommercial + ShareAlike |
| ODC-By-1.0 | Open Data Commons Attribution |
| ODbL-1.0 | Open Database License |
You can also enter any valid SPDX license identifier manually if it allows research use.
GitHub Authentication
Section titled “GitHub Authentication”The CLI uses HTTPS-first authentication for GitHub operations:
- CI/CD: Uses
GH_TOKENenvironment variable if set - Local (preferred): Uses
gh auth tokenfrom GitHub CLI, so rungh auth loginfirst - Fallback: SSH key authentication (
nemar auth setup-ssh)
Step 4: Making Updates
Section titled “Step 4: Making Updates”A freshly uploaded dataset is private, and you can push to it directly. To bring in co-authors or hand off curation, see Collaboration & the Lifecycle.
After initial upload, push changes using the CLI:
cd nm000104 # Your dataset directory
# Make changes, then save and pushnemar dataset save -m "Add subjects 101-110"nemar dataset pushOr create a formal update PR:
nemar dataset update ./nm000104Pass the pull request title with -m, and make it say what changed in plain words. Pull Request Titles and Descriptions has the rules and an example.
Troubleshooting
Section titled “Troubleshooting”Upload Fails with Authentication Error
Section titled “Upload Fails with Authentication Error”# Check login statusnemar auth status --refresh
# Re-login if needednemar auth logingit-annex Errors
Section titled “git-annex Errors”# Ensure git-annex is configuredgit annex version
# Re-initialize if neededgit annex initUpload Interrupted or Timed Out
Section titled “Upload Interrupted or Timed Out”The upload tracks progress automatically. Re-run the same command to resume:
# Resume from where it left offnemar dataset upload ./my-dataset
# Or start fresh if resume failsnemar dataset upload ./my-dataset --restart