Datasets Commands - pilotcli dataset

Datasets Commands - pilotcli dataset

Dataset commands for the pilotcli tool.

Dataset Commands: pilotcli dataset

Help

$ pilotcli dataset --help Usage: pilotcli dataset [OPTIONS] COMMAND [ARGS]... Options: --help Show this message and exit. Commands: download Download a dataset or a particular version of a dataset. list List datasets belonging to logged in user. show-detail Show details of a dataset.

Command: list

  • Usage: List all datasets for the logged in user

  • Prerequisite:

    • User login is required, otherwise error is returned: "The current login session is invalid. Please login to continue."

$ pilotcli dataset list --help Usage: pilotcli dataset list [OPTIONS] List datasets belonging to logged in user. Options: --page INTEGER The page to be listed [default: 0] --page-size INTEGER number of objects per page [default: 10] -d, --detached whether run in detached mode --help Show this message and exit.

Examples

(1) List all datasets that are accessible for the user:

$ pilotcli dataset list Dataset Title Dataset Code --------------------------------------------------------------------------- Dataset 1 data1 Dataset 2 data2 Page: 0, Number of datasets in page: 2, Total number of datasets: 2

By default, the table will only display the first ten elements. If you have access to more than ten Datasets, you will be prompted to use your arrow keys to select one of two options to either view the next ten items (next page), or to exit (exit) to return to the command line. The selected option is indicated by two arrows and can be confirmed by hitting enter:

Page: 0, Number of datasets in page: 10, Total number of datasets: 12 What do you want? (Use arrow keys) » next page exit

Command: show-detail

  • Usage: Show the detailed information of a dataset.

  • Prerequisite:

    • User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."

$ pilotcli dataset show-detail --help Usage: pilotcli dataset show-detail [OPTIONS] CODE Show details of a dataset. Options: --page INTEGER The page to be listed for dataset versions [default: 0] --page-size INTEGER number of objects per page [default: 10] -d, --detached whether run in detached mode --help Show this message and exit.

Examples

(1) Show the details of the specified Dataset by providing the unique Dataset Code - “data1” in this case:

$ pilotcli dataset show-detail data1 -------------------------------------------------------------------------------- | Title | Dataset 1 | -------------------------------------------------------------------------------- | Code | data1 | -------------------------------------------------------------------------------- | Authors | Bianca | -------------------------------------------------------------------------------- | Type | GENERAL | -------------------------------------------------------------------------------- | Modality | neuroimaging, microscopy, histological approach | -------------------------------------------------------------------------------- | Collection_method | import, test, upload | -------------------------------------------------------------------------------- | Tags | IMG, T1, T2, rsfMRI | -------------------------------------------------------------------------------- | Versions | 1.0, 1.1, 1.2 | --------------------------------------------------------------------------------

Command: download

  • Usage: Download a dataset. When a particular version specified, then the input version of the dataset will be downloaded.

  • Options: -v --version

  • Prerequisite:

    • User login is required, otherwise error is returned: "The current login session is invalid. Please login to continue."

$ pilotcli dataset download --help Usage: pilotcli dataset download [OPTIONS] [CODE]... OUTPUT_PATH Download a dataset or a particular version of a dataset. Options: -v, --version TEXT Download a particular version of a dataset. --help Show this message and exit.

Examples

(1) Download a Dataset with Code “data1”:

$ pilotcli dataset download data1 ~/Downloads Preparing status: SUCCEED start downloading... Downloading datasetdata1_1711137225.8504016.zip |██████████████████████████████ 100% 00:00 File has been downloaded successfully and saved to: /Downloads/datasetdata1_1711137225.8504016.zip

(2) Download the version 1.1 of a Dataset with Code “data1”:

$ pilotcli dataset download data1 ~/Downloads -v 1.1 Current dataset version: 1.1 start downloading... Downloading data1_1.1_2024-03-22 19:55:05.052492.zip |██████████████████████████████ 100% 00:00 File has been downloaded successfully and saved to: /Downloads/data1_1.1_2024-03-22 19:55:05.052492.zip

 Related articles