Changes for page Working with HDC Project Files in the Command Line Interface
                  Last modified by Dennis Segebarth on 2024/10/02 18:38
              
      
      To version  10.1 
    
    
              edited by Susan Evans
        
on 2023/09/22 18:36
     on 2023/09/22 18:36
      Change comment:
              There is no comment for this version
          
         Summary
- 
          Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
- 
      - Content
-   ... ... @@ -1,3 +1,7 @@ 1 +{{box cssClass="floatinginfobox" title="Table of Contents"}} 2 +{{toc depth="2"/}} 3 +{{/box}} 4 + 1 1 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>>url:https://learn.microsoft.com/en-us/windows/wsl/install]]) to support large file uploads. For convenience, pilotcli is also pre-deployed and installed in the users JupyterHub accessible via worskpace tools. 2 2 3 3 = Data Stewardship = ... ... @@ -4,10 +4,18 @@ 4 4 5 5 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. 6 6 11 +{{warning}} 12 +⚠ If you are using pilotcli in an environment or system where other users can access and read all your files, please make sure to always run pilotcli user logout as soon as you are done using pilotcli. This could be, for instance, if you are using pilotcli on a shared computer in your local institute, with system administrators of your University or Hospital having superuser privileges. You should not use pilotcli in an environment where users with such privileges are from an entity that is not trusted.e your warning message here. 13 +{{/warning}} 14 + 7 7 = Using the Pilot Command Line Interface in JupyterHub = 8 8 9 9 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. 10 10 19 += Using the Pilot Command Line Interface in Guacamole VMs = 20 + 21 +To get started with the Pilot Command Line Interface in the HDC Guacamole workspace tool, see //Using Guacamole in HDC// on how to launch a terminal, either in a Desktop VM or directly by establishing a connection to a Command Line VM. The Pilot Command Line Interface will be installed, configured, and ready to be used. Please refer to the remaining sections in this article for a full description of the pilotcli commands. 22 + 11 11 = Downloading the Pilot Command Line Interface = 12 12 13 13 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. ... ... @@ -102,7 +102,7 @@ 102 102 103 103 3) Device Login Successful message will appear and your authentication browser window can be closed. 104 104 105 -4) The output of the Command Line Tool will also be updated (see line 14 below)to notify you about the successful login:117 +4) The output of the Command Line Tool will also be updated to notify you about the successful login: 106 106 107 107 {{code language="none"}} 108 108 $ pilotcli user login ... ... @@ -338,7 +338,7 @@ 338 338 339 339 * User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 340 340 * Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again." 341 -* Requires the Project code, which can be retrieved via pilotcli project list. 353 +* Requires the Project code, which can be retrieved via {{code}}pilotcli project list{{/code}}. 342 342 * 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." 343 343 * pilotcli must have the permission to write a file in the directory, otherwise an error is returned. 344 344 ))) ... ... @@ -406,7 +406,7 @@ 406 406 407 407 * User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 408 408 * Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again." 409 -* Requires the Project code, which can be retrieved via pilotcli project list. 421 +* Requires the Project code, which can be retrieved via {{code}}pilotcli project list{{/code}}. 410 410 ))) 411 411 412 412 {{code language="none"}} ... ... @@ -614,7 +614,7 @@ 614 614 All uploading jobs have finished. 615 615 {{/code}} 616 616 617 - (10) upload with customized manifest name629 +Upload with customized manifest name 618 618 619 619 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 {{code}}--output-path{{/code}} option to specify the filepath and, thus, the filename of this JSON file: 620 620 ... ... @@ -721,13 +721,171 @@ 721 721 File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2 722 722 {{/code}} 723 723 724 --- --736 +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 {{code}}-z greenroom{{/code}} or by omitting the {{code}}-z{{/code}} option entirely, as “greenroom” is the default value: 725 725 726 -- 727 -{{code language="none"}}{{/code}} 738 +{{code language="none"}} 739 +$ pilotcli file sync cli/admin/sample_file2 cli/admin/sample_file7 ~/Downloads 740 +Preparing status: READY_FOR_DOWNLOADING 741 +/home/uname/Downloads/sample_file2 already exist, file will be saved as /home/uname/Downloads/sample_file2 (1) 742 +start downloading... 743 +Downloading sample_file2 (1) |██████████████████████████████ 100% 00:00 744 +File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2 (1) 745 +Preparing status: READY_FOR_DOWNLOADING 746 +start downloading... 747 +Downloading sample_file7 |██████████████████████████████ 100% 00:00 748 +File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file7 749 +{{/code}} 728 728 751 += Dataset Commands: pilotcli **dataset** = 752 + 753 +== Help == 754 + 755 +{{code language="none"}} 756 +$ pilotcli dataset --help 757 +Usage: pilotcli dataset [OPTIONS] COMMAND [ARGS]... 758 + 759 +Options: 760 + --help Show this message and exit. 761 + 762 +Commands: 763 + download Download a dataset or a particular version of a dataset. 764 + list List datasets belonging to logged in user. 765 + show-detail Show details of a dataset. 766 +{{/code}} 767 + 768 +== Command: **list** == 769 + 770 +* **Usage**: List all datasets for the logged in user 771 +* ((( 772 +**Prerequisite**: 773 + 774 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 775 +))) 776 + 777 +{{code language="none"}} 778 +$ pilotcli dataset list --help 779 +Usage: pilotcli dataset list [OPTIONS] 780 + 781 + List datasets belonging to logged in user. 782 + 783 +Options: 784 + --page INTEGER The page to be listed [default: 0] 785 + --page-size INTEGER number of objects per page [default: 10] 786 + -d, --detached whether run in detached mode 787 + --help Show this message and exit. 788 +{{/code}} 789 + 790 +=== Examples === 791 + 792 +List all datasets that are accessible for the user: 793 + 794 +{{code language="none"}} 795 +$ pilotcli dataset list 796 + Dataset Title Dataset Code 797 +--------------------------------------------------------------------------- 798 + dataset2 aug24202102 799 + dataset-01 aug242021 800 +Page: 0, Number of datasets: 2 801 +{{/code}} 802 + 803 +== Command: **show-detail** == 804 + 805 +* **Usage**: Show the detailed information of a dataset. 806 +* ((( 807 +**Prerequisite**: 808 + 809 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 810 +))) 811 + 812 +{{code language="none"}} 813 +$ pilotcli dataset show-detail --help 814 +Usage: pilotcli dataset show-detail [OPTIONS] CODE 815 + 816 + Show details of a dataset. 817 + 818 +Options: 819 + --page INTEGER The page to be listed [default: 0] 820 + --page-size INTEGER number of objects per page [default: 10] 821 + -d, --detached whether run in detached mode 822 + --help Show this message and exit. 823 +{{/code}} 824 + 825 +=== Examples === 826 + 827 +Show the details of the specified Dataset by providing the unique Dataset Code - “aug242021” in this case: 828 + 829 +{{code language="none"}} 830 +$ pilotcli dataset show-detail aug242021 831 +-------------------------------------------------------------------------------- 832 +| Title | dataset-01 | 833 +-------------------------------------------------------------------------------- 834 +| Code | aug242021 | 835 +-------------------------------------------------------------------------------- 836 +| Authors | uname, cli | 837 +-------------------------------------------------------------------------------- 838 +| Type | GENERAL | 839 +-------------------------------------------------------------------------------- 840 +| Modality | neuroimaging, microscopy, histological approach | 841 +-------------------------------------------------------------------------------- 842 +| Collection_method | import, test, upload | 843 +-------------------------------------------------------------------------------- 844 +| Tags | tag1, tag2, tag3 | 845 +-------------------------------------------------------------------------------- 846 +| Versions | 1.0, 1.1, 1.2 | 847 +-------------------------------------------------------------------------------- 848 +{{/code}} 849 + 850 +== Command: **download** == 851 + 852 +* **Usage**: Download a particular version of a dataset. 853 +* **Options**: -v ~-~-version 854 +* ((( 855 +**Prerequisite**: 856 + 857 +* User login is required, otherwise error is returned: "The current login session is invalid. Please login to continue." 858 +))) 859 + 860 +{{code language="none"}} 861 +$ pilotcli dataset download --help 862 +Usage: pilotcli dataset download [OPTIONS] [CODE]... OUTPUT_PATH 863 + 864 + Download a dataset or a particular version of a dataset. 865 + 866 +Options: 867 + -v, --version TEXT Download a particular version of a dataset. 868 + --help Show this message and exit. 869 +{{/code}} 870 + 871 + 872 +=== Examples === 873 + 874 +Download a Dataset with Code “aug242021”: 875 + 876 +{{code language="none"}} 877 +$ pilotcli dataset download aug242021 ~/Downloads/ 878 +Pre downloading dataset 879 +Preparing status: READY_FOR_DOWNLOADING 880 +start downloading... 881 +Downloading aug242021_1632342868.882398.zip |██████████████████████████████ 100% 00:00 882 +File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_163234 883 +2868.882398.zip 884 +{{/code}} 885 + 886 +Download the version 1.1 of a Dataset with Code “aug242021”: 887 + 888 +{{code language="none"}} 889 +$ pilotcli dataset download aug242021 ~/Downloads/ -v 1.1 890 +Current dataset version: 1.1 891 +Pre downloading dataset 892 +start downloading... 893 +Downloading aug242021_2021-08-24 11:10:00.042277.zip |██████████████████████████████ 100% 00:00 894 +File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_2021-08-24 11:10:00.042277.zip 895 +{{/code}} 896 + 897 + 898 + 729 729 ---- 730 730 731 -Copyright © 2023 [[Indoc Research>>url:https://www.indocresearch.org/]].901 +Copyright © 2023 [[Indoc Systems>>url:https://www.indocsystems.com]]. 732 732 733 -HealthDataCloud is powered by Pilot technology, a product of [[Indoc Research>>url:https://www.indocresearch.org/]].903 +HealthDataCloud is powered by Pilot technology, a product of [[Indoc Systems>>url:https://www.indocsystems.com]]. 
 
