Skip to content

Uploading Datasets

This guide walks you through uploading a BIDS dataset to NEMAR.

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)

Always validate before uploading:

Terminal window
nemar dataset validate ./my-dataset
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
Terminal window
nemar dataset upload ./my-dataset
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

The upload process:

  1. Authentication Check - Verifies you’re logged in (nemar auth login)
  2. Sandbox Training Check - Confirms nemar sandbox has been completed. This is a hard stop for the CLI, with no equivalent on the web
  3. 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-run continues anyway, since it uploads nothing. See What your profile still needs
  4. 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
  5. Prerequisite Check - Verifies required tools (git-annex, gh, aws) are installed with platform-specific install guidance if missing
  6. GitHub Authentication - Verifies GitHub authentication (HTTPS preferred, SSH as fallback)
  7. BIDS Validation - Runs the official BIDS validator (unless skipped)
  8. File Manifest - Collects files and co-author ORCIDs
  9. License Enforcement - Detects license from dataset_description.json or LICENSE file; prompts to select one if missing. Validates the license allows research redistribution (see License Requirements below)
  10. Data Provenance - For derived datasets, collects source dataset DOIs and checks license compatibility
  11. Confirmation - Shows upload plan for review
  12. 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
  13. Dataset Registration - Creates dataset record and private GitHub repo
  14. GitHub Invitation - Accepts collaborator invitation to the repo
  15. git-annex Init - Initializes git-annex and configures S3 remote
  16. Data Upload - Tracks files locally with git-annex (--annex-jobs workers), then copies the large ones to S3 in parallel (-j streams; uses AWS CLI fast-path when available)
  17. Metadata and Push - Writes metadata, commits, and pushes to GitHub
  18. CI Deployment - Deploys GitHub Actions workflows for validation

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/ and code/;
  • 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.

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.

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, plus unchecked when the scan was incomplete, plus not-screened when there are recordings it cannot read. The accepted words are review, clean-edf-only-others-unscreened, not-screened and unchecked.
Terminal window
nemar dataset upload ./my-dataset --acknowledge-identifier-preflight review,unchecked

A 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.

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.

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.

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.

Every dataset uploaded to NEMAR must have a license that allows research redistribution. The CLI will:

  1. Auto-detect your license from dataset_description.json (the License field) or a LICENSE file
  2. Prompt you to choose if no license is found, offering recommended open data licenses
  3. Validate that the chosen license allows research use
  4. 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.

The CLI uses HTTPS-first authentication for GitHub operations:

  1. CI/CD: Uses GH_TOKEN environment variable if set
  2. Local (preferred): Uses gh auth token from GitHub CLI, so run gh auth login first
  3. Fallback: SSH key authentication (nemar auth setup-ssh)

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:

Terminal window
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:

Terminal window
nemar dataset update ./nm000104

Pass 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.

Terminal window
# Check login status
nemar auth status --refresh
# Re-login if needed
nemar auth login
Terminal window
# Ensure git-annex is configured
git annex version
# Re-initialize if needed
git annex init

The upload tracks progress automatically. Re-run the same command to resume:

Terminal window
# Resume from where it left off
nemar dataset upload ./my-dataset
# Or start fresh if resume fails
nemar dataset upload ./my-dataset --restart