Working with HDC Project Files in the Command Line Interface
The Pilot Command Line Interface (pilotcli) is a binary executable program that provides a convenient way for users to perform file actions and platform-related tasks programmatically. The Pilot Command Line Interface can be downloaded and run on on your local Linux and Linux subsystems (as Windows user, see for instance the Windows Subsystem for Linux installation guide) to support large file uploads. For convenience, pilotcli is also pre-deployed and installed in the users JupyterHub accessible via worskpace tools.
Data Stewardship
Users are reminded to abide by the Platform Terms of Use and any Project-specific restrictions when using the Command Line Interface to access data and code.
Using the Pilot Command Line Interface in JupyterHub
To get started with the Pilot Command Line Interface in the HDC JupyterHub workspace tool, see the article Using JupyterHub in HDC and refer to the remaining sections in this article for a full description of the pilotcli commands.
Downloading the Pilot Command Line Interface
If you wish to use the Pilot Command Line Interface to upload large files from your local environment, it is necessary to download Pilot Command Line Interface tool on your Linux system. The recommended Linux version is Ubuntu 20.04.
- Download the pilotcli tool here.
After download, please grant execution permission to the binary file so that Pilot Command Line Interface can be used. To grant permission to the binary file, use the following command in the downloaded pilotcli directory.
If you have sudo permission, you can make the Pilot Command Line Interface more accessible in any directory by moving it to the /usr/local/bin directory:
Without sudo permission, you can still use the Pilot Command Line Interface in a different directory by referring the Command Line Interface path. For example, use a command line Interface in the Downloads folder:
Pilot Command Line Interface Command Summary
Commands are organized into main groups:
- User - User related actions such as login and logout
- Project - Project related actions, including list Project Names and Codes for all Projects accessible by the logged-in user.
- File - Actions on files. User could use file action commands to list files/folders, upload files/folders, list/export attribute, and download files as well.
- Dataset - Actions related to datasets.
User Commands: pilotcli user
Help
Usage: pilotcli user [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
login For user to login.
logout For user to logout.
Command: login
- Options: -u --username, -p --password
- Usage: Allows users to log into the platform through pilotcli. After login, the user must be actively using the Pilot Command Line Interface to remain logged in, or they will be logged out automatically after the session is idle for five minutes.
- Prerequisites: None.
Usage: pilotcli user login [OPTIONS]
For user to login.
Options:
--help Show this message and exit.
Example
User login:
1) Use the output device validation link or QR code to launch authentication validation:
Please, access https://iam.hdc.humanbrainproject.eu/realms/hdc/device?user_code=XXXX-XXXX to proceed
▄▄▄▄▄▄▄ ▄▄ ▄ ▄ ▄ ▄▄▄▄ ▄ ▄▄▄▄▄▄▄
█ ▄▄▄ █ ▄ ▄▄▀█ █▀▀▀▄▀█▀ ▀██▄ █ ▄▄▄ █
█ ███ █ ██▄ ▀▀▄▀▄▄█▄ ▄ ▀▀▀▄ █ ███ █
█▄▄▄▄▄█ █▀▄▀█▀▄▀█▀▄ █ ▄ ▄ █▀█ █▄▄▄▄▄█
▄▄▄▄▄▄▄ ▀█▀█▄▄█▄ █▀█ ▄▀▄▄ █ ▄ █▀▄▄▄
█ ▄▄▄ █ █▄█▄██ ▀ ▀█▀▀█ ▀▄█▄█▄▄▄█▀▄█
█ ███ █ █▀█ ▄▀██▄█▀▀█▄▀▀█▄▀█ ▀ ▀▄▀██
█▄▄▄▄▄█ ▄▀▄ ██▄▀▀▄ ▀▀▄ ▄▄▀▀▀▄ █▄▄▄█
Waiting validation finish...
2) Grant access by clicking Yes:
3) Device Login Successful message will appear and your authentication browser window can be closed.
4) The output of the Command Line Tool will also be updated to notify you about the successful login:
Please, access https://iam.hdc.humanbrainproject.eu/realms/hdc/device?user_code=XXXX-XXXX to proceed
▄▄▄▄▄▄▄ ▄▄ ▄ ▄ ▄ ▄▄▄▄ ▄ ▄▄▄▄▄▄▄
█ ▄▄▄ █ ▄ ▄▄▀█ █▀▀▀▄▀█▀ ▀██▄ █ ▄▄▄ █
█ ███ █ ██▄ ▀▀▄▀▄▄█▄ ▄ ▀▀▀▄ █ ███ █
█▄▄▄▄▄█ █▀▄▀█▀▄▀█▀▄ █ ▄ ▄ █▀█ █▄▄▄▄▄█
▄▄▄▄▄▄▄ ▀█▀█▄▄█▄ █▀█ ▄▀▄▄ █ ▄ █▀▄▄▄
█ ▄▄▄ █ █▄█▄██ ▀ ▀█▀▀█ ▀▄█▄█▄▄▄█▀▄█
█ ███ █ █▀█ ▄▀██▄█▀▀█▄▀▀█▄▀█ ▀ ▀▄▀██
█▄▄▄▄▄█ ▄▀▄ ██▄▀▀▄ ▀▀▄ ▄▄▀▀▀▄ █▄▄▄█
Waiting validation finish...
Welcome to Command Line Tool!
Command: logout
- Options: -y --yes
- Usage: Allows users to log out of the platform through pilotcli.
- Prerequisites: User login is required, otherwise an error is returned: ‘The current login session is invalid. Please login to continue.'.
Usage: pilotcli user logout [OPTIONS]
For user to logout.
Options:
-y, --yes Input Y/yes to confirm you want to logout, otherwise input N/no
to remain logged in.
--help Show this message and exit.
Examples
User logout:
Are you sure you want to logout? [y/N]: y
Logged out successfully. Bye!
User logout canceled:
Are you sure you want to logout? [y/N]: n
Logout canceled!
User logout with option to skip additional confirmation:
Logged out successfully. Bye!
Project Commands: pilotcli project
Help
Usage: pilotcli project [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
list List accessible projects.
Command: list
- Options: None
- Usage: List all Projects to which the user has access
- Prerequisite: User login is required, otherwise an error is returned: ‘The current login session is invalid. Please login to continue.'
Usage: pilotcli project list [OPTIONS]
List accessible projects.
Options:
--page INTEGER The page to be listed [default: 0]
--page-size INTEGER number of objects per page [default: 10]
--order [asc|desc] sorting order [default: desc]
--order-by [created_at|name|code]
sorting column [default: created_at]
-d, --detached whether run in detached mode
--help Show this message and exit.
Examples
Get a list of all Projects the user has access to:
Project Name Project Code
---------------------------------------------------------------------------
Test Project 02-13 | test230213byshan
Test1_Audit | test1audit
Test20221109 | test20220109
Indoc Test Project | indoctestproject
Page: 0, Number of projects: 4
By default, the table will only display the first ten elements. If the user has access to more than ten Projects, 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). The selected option is indicated by two arrows and can be confirmed by hitting enter:
What do you want? (Use arrow keys)
» next page
exit
File Commands: pilotcli file
Help
Usage: pilotcli file [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
attribute-export Export attribute template from a given Project.
attribute-list List attribute templates of a given Project.
list List files and folders inside a given Project/folder.
resume Resume the upload process with given manifest file.
sync Download files/folders from a given Project/folder/file...
upload Upload files/folders to a given Project path.
Command: attribute-list
- Options: -p --project-code
- Usage: List all attributes from a specified Project.
- Prerequisite:
- User login is required, otherwise an error is returned: ‘The current login session is invalid. Please login to continue.’
- Requires the Project code, which can be retrieved via pilotcli project list.
Usage: pilotcli file attribute-list [OPTIONS]
List attribute templates of a given Project.
Options:
-p, --project-code TEXT Project Code
--help Show this message and exit.
Examples
List attributes from a given Project by providing the Project Code at the prompt. In this example, “cli” is the corresponding Project Code:
ProjectCode: cli
Manifest1
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
--------------------------------------------------------------------------
Manifest2
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4 | True |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3 | True |
--------------------------------------------------------------------------
All Attributes fetched successfully.
List attributes from given a Project and provide the Project Code “cli” as an option in the same line -p cli:
Manifest1
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
--------------------------------------------------------------------------
Manifest2
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4 | True |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3 | True |
--------------------------------------------------------------------------
All Attributes fetched successfully.
Command: attribute-export
- Options: -p --project-code, -n --attribute-name
- Usage: Export an attribute template as JSON-file from a given Project
Prerequisite:
- User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
- Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
- Requires the Project code, which can be retrieved via pilotcli project list.
- Requires the Attribute template name. If the attribute template name does not exist or is spelled incorrectly, an error is returned: "Attribute 'sample-template' not found in Project. Please verify and try again."
- pilotcli must have the permission to write a file in the directory, otherwise an error is returned.
Usage: pilotcli file attribute-export [OPTIONS]
Export attribute template from a given Project.
Options:
-p, --project-code TEXT Project Code
-n, --attribute-name TEXT Attribute Template Name
--help Show this message and exit.
Examples
Export an attribute template from a given Project. The user is prompted to provide the Project Code (“cli”) and the Attribute Template Name (“Manifest1”):
ProjectCode: cli
AttributeName: Manifest1
Manifest1
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
--------------------------------------------------------------------------
Template saved successfully: cli_Manifest1_template.json
Attribute definition saved successfully: cli_Manifest1_definition.json
Export an attribute template from a given Project using options to provide both the Project Code (-p cli) and the Attribute Template Name (-n Manifest1), “cli” and “Manifest1” in this case, respectively:
Manifest1
--------------------------------------------------------------------------
| Attribute Name | Type | Value | Optional |
--------------------------------------------------------------------------
| attr1 | multiple_choice | a1,a2,a3,a4,a5 | False |
--------------------------------------------------------------------------
| attr2 | text | None | False |
--------------------------------------------------------------------------
| attr3 | multiple_choice | t1,t2,t3,t4,t5 | True |
--------------------------------------------------------------------------
Template saved successfully: cli_Manifest1_template.json
Attribute definition saved successfully: cli_Manifest1_definition.json
Command: list
- Options: -z --zone
- Usage: List files and folders in the specified directory within the Platform. Folders will be displayed in blue and files will be displayed in white (or black, depending on the background of your terminal). If no zone (i.e. Green Room or Core) is specified, Green Room will be used as default.
Prerequisite:
- User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
- Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
- Requires the Project code, which can be retrieved via pilotcli project list.
Usage: pilotcli file list [OPTIONS] PATHS
List files and folders inside a given Project/folder.
Options:
-z, --zone TEXT Target Zone (i.e., core/greenroom) [default:
greenroom] [default: greenroom]
--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
List folders in the directory “admin” in the Project with the Project Code “indoctestproject”. Since no zone was specified, the corresponding directory in the Green Room will be queried:
test_folder1 test_folder2 file1 file2 file3
To list the corresponding elements in the “indoctestproject/admin” directory in the Projects' Core, the zone needs to be specified (-z core):
folder1 folder2 test_folder.zip file.txt sample.txt large-file.json
Command: upload
- Options: -p --project, -a --attribute, -t --tag, -z --zone, -m --upload-message, -s --source-file, --zip, -td --thread, -o --output path
- Usage: Upload files/folders to the given project, with optional tags and attributes, to the target folder.
Prerequisite:
- User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
- Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
- When uploading file to the Project Core, the user must have access to the Core (Project Contributors cannot upload files/folders to the Project Core).
Usage: pilotcli file upload [OPTIONS] [PATHS]...
Upload files/folders to a given Project path.
Options:
-p, --project-path TEXT Project folder path starting from Project code.
(i.e., indoctestproject/user/folder) [required]
-a, --attribute TEXT File Attribute Template used for annotating files
during upload.
-t, --tag TEXT Add a tag to the file. This option could be used
multiple times for adding multiple tags.
-z, --zone TEXT Target Zone (i.e., core/greenroom) [default:
greenroom] [default: greenroom]
-m, --upload-message TEXT The message used to comment on the purpose of
uploading your processed file [default: ]
-s, --source-file TEXT The Project path of the source file of your
processed files.
--zip Upload folder as a compressed zip file.
-td, --thread INTEGER The number of thread for upload a file [default:
1]
-o, --output-path TEXT The output path for the manifest file of
resumable upload [default: ./manifest.json]
--help Show this message and exit.
Examples
Upload a file (or folder) to a specified directory of a Project’s Green Room, in this case the file located at ./sample_folder/sample_file1 will be uploaded to the folder “admin” in the Project with the Project Code “cli” (-p cli/admin):
Starting upload of: ./sample_folder/sample_file1
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: e958247c-ce05-48b2-9038-78b774836256-1627498771 resumable_relative_path admin/
Upload job is finalizing, please wait...
Upload job complete.
All files uploaded successfully.
In case the specified destination directory does not exist yet, you will be prompted to confirm its creation by entering “y”, or to abort the command by entering “N”:
In order to upload a file (or folder) to a destination directory in a Project's Core, core must be specified as corresponding zone (-z core) and you will be required to provide a message to that should describe the files` content and why you are uploading it directly into the Core (-m "sample message"). Moreover, you will be reminded about the Terms of Use of the Platform and additional considerations regarding the direct upload of data into the Core zone, and are prompted to confirm your intention to proceed with the upload by entering “y” or “Yes”:
You are about to transfer data directly to the Core! In accordance with the Terms of Use, please confirm that you
have made your best efforts to pseudonymize or anonymize the data and that you have the legal authority to transfer and make this
data available for dissemination and use within the Platform.To review the Terms of Use, please the Portal. If you
need to process the data to remove sensitive identifiers, please cancel this transfer and upload the data to the Green Room to
perform these actions.
To cancel this transfer, enter [n/No]
To confirm and proceed with the data transfer, enter [y/Yes]
[y/N]: y
Starting upload of: ./sample_folder/sample_file2
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: fa807a0f-ceb0-4fff-9c9e-563bdcbb309f-1627498851 resumable_relative_path admin/
Upload job is finalizing, please wait...
Upload job complete.
All files uploaded successfully.
Upload a folder to Project Green Room
Starting upload of: ./sample_folder/example_folder
Current version does not support folder tagging, any selected tags will be ignored
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: 4f0eee2e-70f4-4b03-9e72-040544ec7d3a-1627498907 resumable_relative_path admin/example_folder/
Starting finalization...
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: 41ec70e2-0859-4aba-9009-06e700c7c79e-1627498907 resumable_relative_path admin/example_folder/
Starting finalization...
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: 28454c51-ec9a-4dc5-ab3c-0f7e80e3050d-1627498907 resumable_relative_path admin/example_folder/
Upload job is finalizing, please wait...
Upload job complete.
All files uploaded successfully.
Upload file to existing folder in Green Room
- Specify a target folder to upload files by inputting folder name after the Project code separated by the '/'.
Starting upload of: ./sample_folder/sample_file5
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: 7ef58005-d408-4ad9-a741-fa938f58e67f-1627498977 resumable_relative_path admin/example_folder/
Upload job is finalizing, please wait...
Upload job complete.
All files uploaded successfully.
Upload folder as zip to a specified directory of a Project's Green Room by adding the --zip option.
- The specified folder will then be compressed as a zip file and subsequently be uploaded to the specified destination. Once the upload is completed, the compressed zip file will be removed from the directory. Note: pilotcli must have the permission to create and delete zip files in the corresponding directory of your local machine:
Starting upload of: ./sample_folder/example_folder
Started zipping files.
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 3595 total_chunks: 1 uniq_identifier: 61a729ce-cdd6-4a87-82b5-3f8ea63e6c4a-1627499012 resumable_relative_path admin/
Upload job is finalizing, please wait...
Upload job complete.
All files uploaded successfully.
Upload a file with tags and/or attributes.
- When entering the upload command, the user can add a maximum of ten tags to the file. For example, in order to add “sample_tag1” and “sample_tag2” to your file, simply add -t sample_tag1 -t sample_tag2 to the command (see example below using tag1 and tag2 as tags).
- In addition, you can also use attribute templates for a more enriched annotation of your files. Please note, that the corresponding attribute template file needs to be edited & saved prior to uploading. To get the blank template, see the attribute-export instructions above for more details. To attach a attribute JSON-file to your file upon uploading, use -a cli_Manifest1_template.json, where “cli_Manifest1_template.json" points to the location of the attributes JSON-file on your local machine.
- Upon uploading, pilotcli will also validate the content of the attached attribute JSON-file. Whenever a template is invalid, including missing non-optional fields, non-existing choice in multiple choice attribute, exceeding length text field and so on, pilotcli will raise error to user and user must update the attribute template and upload again:
File attribute validation passed: True
Starting upload of: ./sample_folder/sample_file6
Pre-upload complete.
uploader: admin container_id: 18061 total_size: 1048576 total_chunks: 1 uniq_identifier: bc47ec2a-1a4e-4f71-a37a-7ce6473e415a-1627499273 resumable_relative_path admin/
Upload job is finalizing, please wait...
Upload job complete.
Attribute attached
All files uploaded successfully.
Upload a file with specified number of threads, using the -td <thread_number> option.
- By default, the number of threads is 1. There will no UI difference when using threads. The maximal number of threads depends on your local machine and the recommend thread number is 3:
Target folder does not exist. Would you like to create a new folder? [y/N]: y
Starting upload of: /home/color/indoc/script/large_folder_test_data/gentoo_root_100M.img
Pre-upload complete.
Uploading gentoo_root_100M.img , resumable_id: c68752372b42c85d, job_id: 56de3632-58df-445c-bcb9-bddfe6be5bf7: |██████████████████████████████ 100% 00:00
Upload Time: 79.77s for 1 files
All uploading jobs have finished.
Upload with customized manifest name
When you upload a file using pilotcli, a JSON file with the details of your specific upload job will be created automatically and allows you to resume the upload at a later time, in case the process is aborted due to any reason. By default, this JSON file will be created as “manifest.json” in the current working directory (see Command: resume below for more details on how to resume the file upload). However, you can use the --output-path
option to specify the filepath and, thus, the filename of this JSON file:
Command: resume
- Options: -td --thread, -r --resumable-manifest
- Usage: Resume unfinished file uploading based on the manifest file.
Prerequisite:
- User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
- Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
- The resumable manifest JSON file is required, which is generated upon executing the pilotcli file upload command.
Example:
For instance upon disconnecting from the internet, or by accidentally closing the terminal, a currently running uploading process can be aborted. You can use the pilotcli file resume command in order to resume the uploading process right where you left off. Simply point to the manifest JSON file that was created upon executing the original upload command. Please note that the source files still have to be in the same location, otherwise resuming the uploading process will fail.
Resume the upload for 10 files.
Resumable upload check complete.
Uploading aggregated.py: |██████████████████████████████ 100% 00:00
Uploading __init__.py: |██████████████████████████████ 100% 00:00
Uploading service_meta_class.py: |██████████████████████████████ 100% 00:00
Uploading upload_form.py: |██████████████████████████████ 100% 00:00
Uploading convert_type.py: |██████████████████████████████ 100% 00:00
Uploading singleton.py: |██████████████████████████████ 100% 00:00
Uploading __init__.py: |██████████████████████████████ 100% 00:00
Uploading base_library.zip: |██████████████████████████████ 100% 00:00 0% ?
Uploading EXE-00.toc: |██████████████████████████████ 100% 00:00
Uploading xref-pilotcli_test20230227_3.html: |██████████████████████████████ 100% 00:00
Upload Time: 11.13s for 10 files
Command: sync
- Usage: Download a file or a folder from a Project. If pilotcli is used outside of the Platform, e.g. the users local machine, users can only download from Project’s Core. When pilotcli is used within the Platform, e.g. from one of the workspace tools, users will also be able to download from the Green Room of a Project as well.
Options: -z --zone, -i --geid, --zip
- To look up a file’s geid, or unique file ID, open the Project File Explorer in the Portal and inspect the File Properties for the ID.
Prerequisite:
- User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
- The specified file or folder must exist, otherwise an error is returned: “File does not exist or source file provided is invalid: folder_name/file_name.”
- If the user has no access to the specified file or folder on the Portal, an error is returned: “Permission denied. Please verify that your role in the Project has permission to perform this action.”
Usage: pilotcli file sync [OPTIONS] [PATHS]... OUTPUT_PATH
Download files/folders from a given Project/folder/file in core zone.
Options:
-z, --zone TEXT Target Zone (i.e., core/greenroom)
--zip Download files as a zip.
-i, --geid Enable downloading by geid.
--help Show this message and exit.
Examples
Download a file or a folder from the Core zone of a Project:
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading sample_file2 |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2
Download multiple files or folders as a compressed zip by simply providing all source files or folders and adding the --zip
option:
Preparing downloading
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading cli_1632340658.768384.zip |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/cli_1632340658.768384.zip
Download files or folders by their geid, instead of their location. To enable this, add -i or --geid
to the command:
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading sample_file7 |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file7
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading sample_file2 |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2
Download a file or folder from the Green Room of a Project. This will only be possible if pilotcli is used within the Platform, e.g. in one of the Workspace tools. It works the same way as downloading from Core, including all the additional options like zipping, by either adding -z greenroom or by omitting the -z option entirely, as “greenroom” is the default value:
Preparing status: READY_FOR_DOWNLOADING
/home/uname/Downloads/sample_file2 already exist, file will be saved as /home/uname/Downloads/sample_file2 (1)
start downloading...
Downloading sample_file2 (1) |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2 (1)
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading sample_file7 |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file7
Dataset Commands: 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 an error is returned: "The current login session is invalid. Please login to continue."
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
List all datasets that are accessible for the user:
Dataset Title Dataset Code
---------------------------------------------------------------------------
dataset2 aug24202102
dataset-01 aug242021
Page: 0, Number of datasets: 2
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."
Usage: pilotcli dataset show-detail [OPTIONS] CODE
Show details of a dataset.
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
Show the details of the specified Dataset by providing the unique Dataset Code - “aug242021” in this case:
--------------------------------------------------------------------------------
| Title | dataset-01 |
--------------------------------------------------------------------------------
| Code | aug242021 |
--------------------------------------------------------------------------------
| Authors | uname, cli |
--------------------------------------------------------------------------------
| Type | GENERAL |
--------------------------------------------------------------------------------
| Modality | neuroimaging, microscopy, histological approach |
--------------------------------------------------------------------------------
| Collection_method | import, test, upload |
--------------------------------------------------------------------------------
| Tags | tag1, tag2, tag3 |
--------------------------------------------------------------------------------
| Versions | 1.0, 1.1, 1.2 |
--------------------------------------------------------------------------------
Command: download
- Usage: Download a particular version of a dataset.
- Options: -v --version
Prerequisite:
- User login is required, otherwise error is returned: "The current login session is invalid. Please login to continue."
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
Download a Dataset with Code “aug242021”:
Pre downloading dataset
Preparing status: READY_FOR_DOWNLOADING
start downloading...
Downloading aug242021_1632342868.882398.zip |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_163234
2868.882398.zip
Download the version 1.1 of a Dataset with Code “aug242021”:
Current dataset version: 1.1
Pre downloading dataset
start downloading...
Downloading aug242021_2021-08-24 11:10:00.042277.zip |██████████████████████████████ 100% 00:00
File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_2021-08-24 11:10:00.042277.zip
Copyright © 2023 Indoc Systems.
HealthDataCloud is powered by Pilot technology, a product of Indoc Systems.