Commandline Usage

Important

NeuroDataPub takes as principal input the path of your dataset. The input dataset is required to be in valid BIDS format. See BIDS standard for more information about BIDS.

Before using NeuroDataPub, your dataset should be validated with the free, online BIDS Validator, or its standalone version.

Note also that before using NeuroDataPub, the remote data server should provide at least an installation of git-annex. Please see Remote Data Server Setup for instructions.

Commandline Arguments

Command-line argument parser of NeuroDataPub (v0.2)

usage: neurodatapub [-h] --mode {all,create-only,publish-only} --bids_dir
                    BIDS_DIR --datalad_dir DATALAD_DIR
                    --git_annex_ssh_special_sibling_config
                    GIT_ANNEX_SSH_SPECIAL_SIBLING_CONFIG
                    --github_sibling_config GITHUB_SIBLING_CONFIG [--gui] [-v]

Named Arguments

--mode

Possible choices: all, create-only, publish-only

Mode in which neurodatapub is run: "create-only" creates the datalad dataset only, "publish-only" creates the datalad dataset only, "all" creates the datalad dataset only,

--bids_dir

The directory with the input dataset formatted according to the BIDS standard.

--datalad_dir

The local directory where the Datalad dataset should be.

--git_annex_ssh_special_sibling_config

Path to a JSON file containing configuration parameters for the git-annex SSH special remote dataset sibling

--github_sibling_config

Path to a JSON file containing configuration parameters for the GitHub dataset repository sibling

--gui

Run NeuroDataPub in GUI mode

Default: False

-v, --version

show program’s version number and exit

Sibling configuration files

Git-annex special remote sibling configuration file

The Git-annex special remote sibling configuration file specified by the input flag --git_annex_ssh_special_sibling_config adopts the following JSON schema:

{
    "remote_ssh_login": "user",
    "remote_ssh_url": "ssh://neurodatapub.server.org",
    "remote_sibling_dir": "/remote/path/of/dataset/sibling/.git"
}
where:
  • "remote_ssh_login" (mandatory): user login to the remote

  • "remote_ssh_url" (mandatory): SSH-URL of the remote in the form “ssh://…”

  • "remote_sibling_dir" (mandatory): Remote .git/ directory of the sibling dataset

GitHub sibling configuration file

The GitHub sibling configuration file specified by the input flag --github_sibling_config adopts the following JSON schema:

{
    "github_login": "GitHubUserName",
    "github_repo_name": "DatasetName"
}
where:
  • "github_login" (mandatory): user login to GitHub.

  • "github_repo_name" (mandatory): Dataset repository name on GitHub

Note

You will be asked to enter a token for authentication to create and publish the repository on GitHub. Please see “Creating a personal access token” Github documentation for more details on how to get one. Make also sure that the write:org and read:org options are enabled.

Running neurodatapub

The neurodatapub command-line interface can be run in in the “create-only”, “publish-only”, and “all” modes with the --mode option flag (as described in Commandline Arguments). For example, an invocation of the interface to create and publish a dataset (“all” mode) would be as follows:

$ neurodatapub --mode "all" \
     --bids_dir '/local/path/to/input/bids/dataset' \
     --datalad_dir  '/local/path/to/output/datalad/dataset' \
     --git_annex_ssh_special_sibling_config '/local/path/to/special_annex_sibling_config.json' \
     --github_sibling_config '/local/path/to/github_sibling_config.json'

Note

When you use directly the command-line interface, you would need to provide the JSON files with the option flags --git_annex_ssh_special_sibling_config and --github_sibling_config to describe the configuration of the special remote and GitHub dataset siblings.

Support, bugs and new feature requests

All bugs, concerns and enhancement requests for this software are managed on GitHub and can be submitted at https://github.com/NCCR-SYNAPSY/neurodatapub/issues.